agentleFS
josixjosix/agent-flow/skills/graphify-usage/SKILL.md

graphify-usage

Skill8 starsChanged 17 days agoMITView on GitHub

This skill should be used when querying the graphify knowledge graph for structural codebase information, choosing between graph tools and grep, or interpreting graph query results.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All 7 tools are accessed via the MCP prefix mcp__plugin_agent-flow_graphify__*.

    line 19
  2. Distinctive:

    Use the graph when you need structural relationships.

    line 25
  3. Distinctive:

    Rule of thumb: If the answer requires traversal (who calls what, what clusters together, how far apart are two concepts), use the graph.

    line 39
  4. Very specific:

    Always set top_k / top_n: when available. Default god_nodes returns 10 nodes — only request more if explicitly needed.

    line 64
  5. Very specific:

    Set depth conservatively: Default depth is 3; start at 1-2 for narrow questions, increase only if the result is insufficient.

    line 66
  6. Very specific:

    Chain calls, don't parallelize blindly: Run graph_stats first, then decide if god_nodes is needed.

    line 69
  7. Very specific:

    Every node in the graph carries a source_location field (file path, sometimes line range).

    line 79
  8. Very specific:

    Never report a concept without its source_location — downstream agents cannot verify unsourced claims.

    line 86
  9. Distinctive:

    When an edge is INFERRED or AMBIGUOUS, note this explicitly in your summary.

    line 98
  10. Distinctive:

    Use the graph for structural orientation only

    line 103
  11. Distinctive:

    Use Read or Grep for current content

    line 104

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Graphify Usage

Query the knowledge graph effectively, interpret results accurately, and stay within token budgets.

Overview

The graphify MCP server exposes the codebase as a pre-built knowledge graph stored in graphify-out/graph.json. The graph encodes structural relationships between concepts, modules, and files extracted by the graphify pipeline. This skill governs when, how, and with what discipline agents should query it.

Owner: Riko (Explorer Agent) — Riko is the primary graph query agent and owns interpretation of results. Consumers: Senku (Planner Agent), Lawliet (Reviewer Agent) — both may consult the graph during planning and review, but Riko is the preferred query agent for deep exploration. Out of scope: Loid (Executor) and Alphonse (Verifier) do NOT have graph access by design. Loid performs file writes and needs test output, not structural queries; Alphonse runs verification commands that cannot rely on graph freshness. This enforces the one-writer invariant: only agents that need structural context hold graph tool permissions.

All 7 tools are accessed via the MCP prefix mcp__plugin_agent-flow_graphify__*. See references/tool-reference.md for full signatures.


When to Query the Graph vs. Grep

Use the graph when you need structural relationships. Use grep when you need literal text matches.

Trigger conditionPreferred approach
"What modules import X?" / dependency mappingGraph: get_neighbors with relation_filter
"What is the main entry point?" / orientationGraph: graph_stats then god_nodes
"How does component A connect to component B?"Graph: shortest_path
"Which community does file F belong to?"Graph: get_community on node label
"Find the string literal TODO: fix"Grep
"Find all files that define function parse_args"Grep (pattern match)
"What does a specific config key say?"Read the file directly
File is freshly edited (within this session)Grep/Read — graph may be stale
Graph does not exist at graphify-out/graph.jsonGrep/Read only

Rule of thumb: If the answer requires traversal (who calls what, what clusters together, how far apart are two concepts), use the graph. If the answer is a literal substring or you need up-to-the-edit accuracy, use Grep or Read.


Tool Decision Table

Choose the right tool for the question type. See references/query-patterns.md for detailed decision sequences.

Question typePrimary toolFollow-up
How large is this codebase?graph_statsgod_nodes for core abstractions
What are the central concepts?god_nodesget_community to explore clusters
Which modules are in the same cluster?get_communityget_node on members
What does this node connect to?get_neighborsget_node on callers/callees
Blast radius of changing Xget_neighbors then shortest_pathManual review of connected files
Full structural/semantic questionquery_graph (BFS for broad, DFS for path)get_node on returned labels
Specific node detailsget_node—
Path between two conceptsshortest_pathget_node on intermediate nodes

Token Hygiene

Hard rules for staying within context budget:

  1. Always set top_k / top_n when available. Default god_nodes returns 10 nodes — only request more if explicitly needed.
  2. Set token_budget on query_graph calls. The default is 2000 tokens; lower it (e.g., 500) for quick orientation queries.
  3. Set depth conservatively. Default depth is 3; start at 1-2 for narrow questions, increase only if the result is insufficient.
  4. Do NOT paste raw subgraph JSON downstream into task prompts or summaries. Extract only node IDs, labels, and source_location fields.
  5. Summarize before handing off. Convert graph results to bullet lists of label → source_location pairs. Downstream agents (Senku, Lawliet) need names and file paths, not raw graph output.
  6. Chain calls, don't parallelize blindly. Run graph_stats first, then decide if god_nodes is needed. Avoid firing all 7 tools simultaneously.

Result Interpretation

How to read and trust what the graph returns:

Cite source_location fields

Every node in the graph carries a source_location field (file path, sometimes line range). When reporting a finding, always cite this field:

Node: AgentOrchestrator
source_location: commands/orchestrate.md:1

Never report a concept without its source_location — downstream agents cannot verify unsourced claims.

Surface confidence tags

The graph annotates edges with confidence labels:

TagMeaningTrust level
EXTRACTEDDirectly observed in source textHigh — treat as fact
INFERREDModel-reasoned relationshipMedium — verify if load-bearing
AMBIGUOUSMultiple interpretations possibleLow — always verify with Read/Grep

When an edge is INFERRED or AMBIGUOUS, note this explicitly in your summary. Do not present inferred relationships as certainties.

Trust-but-verify for freshly edited files

The graph is built once (at /graphify time) and is not updated during a session. If Loid has modified a file in the current session, graph data for that node is stale. For any file touched in this session:

  • Use the graph for structural orientation only
  • Use Read or Grep for current content

What NOT to Do

  • Do not query the graph on freshly edited files expecting current content — it will be stale.
  • Do not set depth > 4 without a specific reason — the output will overflow context.
  • Do not pass raw graph JSON blobs in task descriptions or summaries to other agents.
  • Do not fire query_graph for questions answerable by get_node or get_neighbors — cheaper specific tools first.
  • Do not report INFERRED edges as facts — always surface the confidence tag.
  • Do not skip source_location citations — every claimed relationship needs a file anchor.
  • Do not use graph results as a substitute for reading changed files — the graph captures structure, not current content.

Cross-References

  • docs/guides/using-graphify.md — installation, build steps, and how to run the graphify pipeline
  • references/tool-reference.md — full MCP tool signatures, parameters, cost profiles
  • references/query-patterns.md — decision table mapping question types to tool sequences
  • examples/worked-queries.md — end-to-end query scenarios with expected result shapes

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.