Code intelligence
Skill event4u-app/agent-config/dist/agent-src/skills/code-intelligence
Route codebase-structure questions (who calls X, where used, what imports, change-impact) to a code-graph first, grep fallback. Triggers 'who calls', 'where is this used', 'call graph'.From its SKILL.md
npx -y skills add event4u-app/agent-config --skill code-intelligenceAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 19 stars19 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.2 KB, 983 tokens by cl100k_base, as published. Nobody here has run it
code-intelligence
For a structure question — who calls X, where is Y used, what imports Z, what breaks if I change this symbol — a code-graph answers far more precisely than a blind
grep, at a fraction of the tokens. This skill routes such questions to the native code-graph engine (ADR-124, Class A) or a consumer-shipped index first, and falls back to grep with a stated reason when the graph cannot answer. It is the executable side ofexternal-code-graph-interop: orchestrator first, owner where it wins.
When to use
- The question is about relationships between code symbols, not content: callers/callees, references, imports, inheritance, change-impact.
- You are about to
grep/Readacross many files to reconstruct a call or import graph by hand.
When NOT to use: content/semantic questions ("what does this function
mean", "find the string 'password'"), single-file edits, or a repo with no
code-graph and no appetite to build one — plain grep/read is right there.
Procedure
- Detect the source.
code_graph detect— is a fresh consumergraph.jsonor native cache present? (A consumer-shipped fresh index wins; the native engine covers stale-or-absent — ADR-124 § 2.) - Build if absent and worthwhile. No graph + a repo in the launch set
(PHP / TS / JS)?
code_graph build(deterministic, LLM-free, ~seconds). Skip for a one-off question in an unsupported stack — grep instead. - Query. Pick the verb:
code_graph query <symbol>— direct relations of a symbol.code_graph affected <symbol>— reverse: who calls / references it (the "impact of changing X" question).--since <ref>seeds from a git diff.code_graph path <a> <b>— how two symbols connect.code_graph explain <symbol>— 2-hop neighbourhood. Pass--budget <tokens>to cap output.
- Read the confidence.
EXTRACTED= syntactic fact;INFERRED= hierarchy-resolved;AMBIGUOUS= dynamic dispatch / facade, carries candidates — treat its target as one of the candidates, never as certain. - Fall back honestly. If the graph has no entry for the symbol, grep — and say so: "the graph has no entry for X, so I grepped."
Output
Every answer built with this skill MUST:
- Name the source that answered —
native,consumer, orgrep-fallback— so the reader knows the provenance and freshness of the relationship claim. - Preserve the confidence class for each relationship surfaced — never
present an
AMBIGUOUSedge as a definite call; list its candidates or say "ambiguous (dynamic dispatch)".
Gotcha
- A stale graph lies confidently. If
detectreports the index is N commits behind, rebuild (code_graph build --update) before trusting relationship answers, or say the answer is from a stale index. - Dynamic dispatch is honestly ambiguous. On a Laravel/JS codebase most
method-call edges are
AMBIGUOUS(facades, injected services,$obj->m()). That is the engine being honest, not broken — do not "resolve" them yourself by guessing.
Do NOT
- Do NOT rebuild a fresh consumer-shipped index — query it (interop courtesy).
- Do NOT block or defer a read waiting on the graph — it is an accelerator, not a gate.
- Do NOT treat the cache as a source of truth for anything beyond the last build; it is a rebuildable artifact.
See also
external-code-graph-interop— the rule that routes structure questions here.source-discovery— evidence-before-structure discipline; the graph is one evidence source, still confirmed against the real code when load-bearing.src/scripts/code_graph/— the engine (build / query / detect / affected).
What ships with it: 1 file
2.5 KB alongside SKILL.md
evals/
- triggers.json2.5 KB