Skill: Axon Code Intelligence
Purpose
Guide the use of Axon's MCP tools for structural code analysis during planning, execution, and verification.
What Axon Provides
Axon indexes codebases into a knowledge graph — call graphs, type references, execution flows, communities, and dead code detection. It answers questions that text search can't: "what breaks if I change this?", "what calls this function?", "is this code reachable?"
MCP Tools Reference
| Tool | What it does | When to use |
|---|---|---|
axon_query |
Hybrid search (text + semantic + fuzzy) grouped by execution flow | Finding relevant code by concept, not just name |
axon_context |
360° view of a symbol — callers, callees, types, dead code status | Understanding a symbol's full dependency web before modifying it |
axon_impact |
Blast radius grouped by depth with confidence scores | Before changing a function/class — see what breaks |
axon_dead_code |
All unreachable symbols by file | Cleaning up after refactors, verifying nothing was orphaned |
axon_detect_changes |
Maps a git diff to affected symbols and flows | During verification — did the changes touch everything they needed to? |
axon_list_repos |
Lists indexed repositories with stats | Checking if a repo is indexed and current |
axon_cypher |
Read-only Cypher queries against the knowledge graph | Advanced structural queries not covered by other tools |
When to Use at Each Stage
Planning
axon_queryto explore the codebase by concept ("authentication", "payment processing")axon_contexton key symbols to understand existing architecture before designing changesaxon_impactto assess risk of proposed changes and inform phase ordering
Execution
axon_contextbefore modifying any symbol — understand callers, callees, and type dependenciesaxon_impactbefore changing a function's signature or behavior — check the blast radius- Use impact results to identify tests and call sites that need updating alongside your change
Verification
axon_detect_changesto map the phase's diff to affected symbols and execution flowsaxon_dead_codeto check if refactors orphaned any codeaxon_impactto verify all affected call sites were updated
Bug Fixing
axon_contextto trace callers and callees around the buggy symbolaxon_impactto understand what a fix might breakaxon_queryto find related code when the bug's root cause isn't in the obvious location
Re-indexing
If the MCP server runs with axon serve --watch, the index stays current automatically (file-local phases update immediately, global phases batch every 30 seconds). A full re-index is only needed after:
- A large merge or rebase while watch mode was not running
- Switching branches with significant structural changes
To re-index: axon analyze . (or axon analyze --full to skip incremental logic).
Checking Availability
Before relying on Axon tools, verify the index exists:
- Run
axon_list_reposto check if the current repo is indexed - If not indexed, inform the user and suggest running
axon analyze .