code-discovery

code-discovery is a skill for Claude Code from HigorAlves/orc. It costs 59 tokens per session (836 once invoked), scanned A, original, MIT.

A code-discovery skill for finding the parts of a codebase relevant to a task before planning or changing it. A code graph is used when available, with ordinary file search as a fallback.

In plain words
What is it for?
Use it before implementing, debugging, refactoring, or planning changes to locate related files, symbols, and dependencies.
Why use it?
It reduces the time and context needed to navigate unfamiliar code while still working when the graph is missing or outdated.

Skill for Claude Code

Written for Claude Code: SessionStart hook event.

Good fit Use it before implementing, debugging, refactoring, or planning changes to locate related files, symbols, and dependencies.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/higoralves/orc/code-discovery
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.

Any agent
npx skills add HigorAlves/orc --skill code-discovery
Clone the repo
git clone --depth 1 https://github.com/HigorAlves/orc

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-discovery

README.md
[![agentmods](https://agentmods.dev/badge/skills/higoralves/orc/code-discovery/github.svg)](https://agentmods.dev/skills/higoralves/orc/code-discovery)
Your own site
<a href="https://agentmods.dev/skills/higoralves/orc/code-discovery"><img src="https://agentmods.dev/badge/skills/higoralves/orc/code-discovery/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-discovery

Your own site · 80×15
<a href="https://agentmods.dev/skills/higoralves/orc/code-discovery"><img src="https://agentmods.dev/badge/skills/higoralves/orc/code-discovery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 836 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00059 $0.00836
Opus 5.5 $0.00024 $0.00334
Sonnet 5.5 $0.00012 $0.00167
Haiku 4.5 $0.00006 $0.00084

Measured 3mo ago against content hash 37f023fe8cc7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-discovery 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 3mo 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.

codex/orc/content/skills/code-discovery/SKILL.md · 36 lines

How it starts

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

Code Discovery

Discovery — finding the code relevant to a task before changing it — is the largest easily-wasted token cost in a session. When Graphify is available, query the pre-built code graph and Read only the cited source_locations instead of grepping the tree. Graphify is optional and pre-1.0: every step below is guarded and falls back to plain Glob/Grep/Read — discovery never hard-blocks on it.

The protocol

  1. Detect + health-check. command -v graphify; graph exists at graphify-out/graph.json; graph fresh (built_at_commit in graph.json == git rev-parse HEAD, or graphify check-update . is clean). Binary absent → step 5; never prompt to install (SessionStart tool-check already surfaces it).
  2. Build/refresh when missing or stale — pure local AST, no API key, seconds: graphify extract . --code-only (missing) or graphify update . (stale). Mention it in interactive commands; just do it in dispatched agents. Build fails → step 5, no retry loop. Never run a semantic (non---code-only) build for discovery.
  3. Load lessons once, if present. Read graphify-out/reflections/LESSONS.md before the first query (bounded ≈1500 tokens); prefer its listed nodes, skip its dead ends. Lessons are hints, not ground truth. Absent → skip silently. You only consume lessons — the orchestrating command records outcomes at a verified gate, so surface which graph nodes you relied on.
  4. Query-first. Answer structural questions by traversal, most-specific verb first:
    graphify query "where is auth wired to the database?" --budget 1500
    graphify explain "RateLimiter"          # one symbol and its connections
    graphify path "UserService" "DatabasePool"
    graphify affected "processRefund" --depth 2   # reverse blast radius — leads, not verdicts
    
    Then Read only the cited source_locations. Noisy answer → raise --budget or rephrase before abandoning the graph. Verify every cited caller by reading it — never claim "all callers handled" from graph output alone, least of all from a stale graph. A verb that errors or emits unparseable output → treat the graph as unavailable for that question and fall back (probe new verbs with graphify <verb> --help).
  5. Fallback (absent / stale / failed / empty): Glob candidates, Grep symbols, Read immediate dependencies. Graceful degradation, not an error — say nothing alarming.
  6. Keep the graph out of version control (repo-local exclude, no tracked-file diff):
    grep -qxF 'graphify-out/' .git/info/exclude 2>/dev/null || echo 'graphify-out/' >> .git/info/exclude
    

Read the full file on GitHub · 36 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. 3mo ago First seen · 36 lines · 59 tokens per session scan A 37f023fe8cc7

Subscribe to this mod's changes

code-discovery is a skill published in the GitHub repository HigorAlves/orc (7 stars, last pushed 3d ago), licensed MIT. It adds 59 tokens to every session and 836 once invoked, about $0.0002 per session on Opus 5.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

code-discovery compared with skills from other repositories

code-discovery next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
code-discoveryHigorAlves/orcSkill73d agoMITA59Claude Code
clean-code-coreCassetteTapeCrackle/claude-startersSkill128d agoMITA70Claude Code
agent-orchestrationCassetteTapeCrackle/claude-startersSkill128d agoMITA59Claude Code
clean-code-audioCassetteTapeCrackle/claude-startersSkill128d agoMITA52Claude Code
clean-code-cppCassetteTapeCrackle/claude-startersSkill128d agoMITA42Claude Code
clean-code-rustCassetteTapeCrackle/claude-startersSkill128d agoMITA44Claude Code
clean-code-cCassetteTapeCrackle/claude-startersSkill128d agoMITA34Claude Code