code-intelligence

A codebase-structure lookup tool for answering questions about relationships between code symbols. It can investigate callers, uses, imports, inheritance, and the likely impact of changing a symbol.

In plain words
What is it for?
Use it to find who calls a function, where a class or variable is used, what imports a module, or what code may be affected by a change.
Why use it?
It reduces the need to search many files manually when you need to understand how code is connected. It uses a code graph when available and falls back to text search when necessary.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/event4u-app/agent-config/code-intelligence
Any agent
npx skills add event4u-app/agent-config --skill code-intelligence
Clone the repo
git clone --depth 1 https://github.com/event4u-app/agent-config

Made for: Claude Code, Codex.

Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,061 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00050 $0.02061
Opus 5 $0.00025 $0.01030
Sonnet 5 $0.00010 $0.00412
Haiku 4.5 $0.00005 $0.00206

Measured 2d ago against content hash 9e87a7ac1c09, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-intelligence scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/skills/code-intelligence/SKILL.md · 154 lines

How it starts

The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 of external-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/Read across 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

  1. Detect the source. agent-config code-graph detect — is a fresh consumer graph.json or native cache present? (A consumer-shipped fresh index wins; the native engine covers stale-or-absent — ADR-124 § 2.)
  2. Build if absent and worthwhile. No graph + a repo in the launch set (PHP / TS / JS)? agent-config code-graph build (deterministic, LLM-free, ~seconds). Skip for a one-off question in an unsupported stack — grep instead.
  3. Query. Pick the verb:
    • agent-config code-graph query <symbol> — direct relations of a symbol.
    • agent-config code-graph affected <symbol> — reverse: who calls / references it (the "impact of changing X" question). --since <ref> seeds from a git diff.
    • agent-config code-graph path <a> <b> — how two symbols connect.
    • agent-config code-graph explain <symbol> — 2-hop neighbourhood. Pass --budget <tokens> to cap output.
  4. 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.
  5. 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." If this command is not available, grep and say so.

Read the full file on GitHub · 154 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 154 lines · 50 tokens per session scan A 9e87a7ac1c09

Subscribe to this mod's changes

code-intelligence is a skill published in the GitHub repository event4u-app/agent-config (10 stars, last pushed 2d ago), licensed MIT. It adds 50 tokens to every session and 2,061 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

save-progress

Save current project task progress to local task state file for cross-session continuity. Use when the user asks to save progress, uses an equivalent localized trigger phrase, the session is interrupted, or the user wants to resume work later. Writes to .claude/project-task-state.json so next session can load it via…

KimYx0207/Meta_Kim · 65 tokens

meta-theory

MetaKim executable governance dispatcher. It classifies the run, loads only needed references, preserves foundational capabilities and runtime-native abilities, routes owner + weapon + dependency + runtime + OS + verification, and closes only with evidence, intent acceptance, and writeback decision.

KimYx0207/Meta_Kim · 57 tokens

same-set-reusable-flow-for-project-file-inventor

Reusable MetaKim file inventory classification flow. It helps separate durable sources, generated evidence, runtime mirrors, temporary state, and risky unknowns before cleanup or commit.

KimYx0207/Meta_Kim · 45 tokens

starreel-drama-production

Operating skill for any AI agent driving the StarReel short-drama production pipeline (script → rewrite → extract → portraits + sheets → storyboards → frames → video → voiceover → final cut) over MCP or REST. Covers the ordered workflow, the eleven operating disciplines (prepaid billing, quote-before-spend, retryable…

waydaxp/starreel-mcp · 87 tokens

seedance-20

Generate and direct cinematic AI videos with Seedance 2.0 (ByteDance/Dreamina/Jimeng). Covers text-to-video, image-to-video, video-to-video, and reference-to-video workflows with @Tag asset references, multi-character scenes, audio design, and post-processing. Use when making AI video, writing Seedance prompts…

Kingdaddy007/my-os · 96 tokens

human-approval

Request human approval before performing a SAFETY-CRITICAL, IRREVERSIBLE, or SCOPE-EXPANDING action — submit a structured context (action, scope, risk, consequence) plus options, then STOP the current turn. The platform redispatches the agent after the human decides. NEVER use for routine deliverables (writing docs /…

Prismer-AI/PrismerCloud · 168 tokens