From smart-mcps
Explore, search, and understand code structure using the codegraph CLI. Use when asked to find symbols, trace call flows, understand architecture, or assess change impact.
How this skill is triggered — by the user, by Claude, or both
Slash command
/smart-mcps:codegraph [query or symbol name][query or symbol name]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use the `codegraph` CLI via bash to answer code structure questions.
Use the codegraph CLI via bash to answer code structure questions.
| Need | Command |
|---|---|
| Map the area / what matters here? | codegraph context "<query>" — always first |
| Where is symbol X defined? | codegraph context "<symbol>" — also handles symbol lookup |
| Don't know exact symbol name? | codegraph query "<partial name>" — fuzzy symbol search |
| What calls this function? | codegraph callers "<symbol>" |
| What does this call? | codegraph callees "<symbol>" |
| What breaks if I change this? | codegraph impact "<symbol>" |
| What tests cover this file? | codegraph affected <file> [<file>...] |
| What files are in a directory? | codegraph files --filter <dir> — not ls or find |
| Is the index healthy / empty? | codegraph status |
contextcodegraph context "authentication flow"
codegraph context "_call"
codegraph context "session hooks"
context already composes search + node details + callers + callees in one call. Do not stack three separate calls when one context call covers it. Only follow up with callers/callees when context output is truncated or you need to trace a specific edge deeper.
Empty output: if context returns only the header line and no symbols, the query matched nothing — fall back to codegraph query with a shorter or partial name to find the exact symbol first.
Useful options:
--max-nodes <n> — cap how many nodes are returned (default 50)--max-code <n> — cap how many code blocks are shown (default 10)--no-code — skip code blocks entirely for a faster overviewquerycodegraph query "_call"
codegraph query "memory" --kind function
codegraph query "BASE_URL" --kind constant
Use query when you don't know the exact symbol name. It does fuzzy matching and shows signatures and locations. Filter by kind: function, class, method, variable, constant, import.
codegraph callers "_call"
codegraph callees "main"
Use only as a follow-up to context when you need to trace a specific path that was cut off.
codegraph impact "_call"
codegraph impact "BASE_URL"
Run this before modifying any widely-used function or constant — it shows what would break.
codegraph affected agentmemory/proxy.py
git diff --name-only HEAD | xargs codegraph affected
Given one or more source files, lists the test files that transitively depend on them. Useful before a focused change to know which tests to run.
codegraph files
codegraph files --filter agentmemory/
codegraph files --pattern "**/*.test.*"
Prefer this over ls/find when exploring what's in the index. Use --filter <dir> to scope to a subdirectory — positional path arguments are not supported and will error.
codegraph status
If status shows no index, run codegraph init && codegraph index before using any other command. The Setup hook runs codegraph index automatically on session start, but only if codegraph was installed before the session began.
context for any exploration question — it is the richest single call.context returns nothing, use codegraph query with a shorter symbol name before assuming the symbol is unindexed.codegraph index run. Read the file directly if you need to see recent edits.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub giovani-merlin/smart_mcps --plugin smart-mcps