
code-understand
Map the load-bearing files, symbols, callers, and dependencies of an unfamiliar codebase before making changes. Use for architecture orientation, impact analysis, what-would-break questions, or finding callers. Uses CodeGraph when available and a dependency-free builtin fallback.
- Installs
- 192
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/ar9av/obsidian-wiki --skill code-understand- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads code-understand automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Code Understand — On-Demand Architecture Focus Map
You are about to work in a codebase you don't fully know yet. Instead of grepping around or
reading files at random, ask the local extractor for a focus map: the ranked symbols the
architecture hangs on, each with a file:line citation and evidence type. Read only what it
points at — this is a map, not a substitute for reading the actual code it cites.
When to reach for this
- Before editing an unfamiliar module — see what calls it and what it calls before changing its shape.
- The user asks "how does X work", "what's the impact of changing Y", "who else uses this function" for a codebase, not the wiki.
- You're about to do a large refactor and want a ranked list of load-bearing files instead of reading the whole tree.
- You already have a diff or a set of changed files and want to know their blast radius before finishing the change.
Not for: summarizing what a project does for the wiki (that's wiki-update Step 3b, which
calls this same command as part of a bigger sync flow) — use this skill directly only when you
need the focus map for your own immediate work, not to persist knowledge.
Running it
obsidian-wiki code-understand --project <dir> [--backend auto|builtin|codegraph] \
[--changed <file>...] [--since <sha>] [--max-symbols N] [--pretty]
--project— defaults to the current directory.- No
--changed/--since— seeds from every tracked file (full-project scan). --changed <file>(repeatable) — seed from specific files you already know are relevant (e.g. files in the diff you're about to make).--since <sha>— seed from everything changed since a git ref (e.g.--since HEAD~5or a base branch).--backend—auto(default) uses CodeGraph when installed, falls back to the builtin extractor otherwise; forcebuiltinfor the dependency-free path, orcodegraphto require the enhanced backend (fails loudly if it's not installed rather than silently degrading).--max-symbols— cap the focus map size (default 50); keep this small for a quick orientation pass, raise it for a thorough one.
GUARD: if the command is unavailable or errors, skip it and fall back to your normal exploration (grep/read) — this is an accelerant, not a dependency. Don't block work on it.
Reading the output
- Evidence type matters. When
backend: codegraph, focus-map entries are structural facts (real call-graph edges) — cite them directly. Whenbackend: builtin,defines/imports/changed-fileentries are facts, butrg-referenceentries are text-match evidence only — open the file and confirm before treating it as a real relationship. - Open what it cites, nothing else first. The focus map tells you where to read; it
never contains source bodies. Go read those
file:linelocations before forming an opinion on the architecture. - Cite it in your own output. If you explain the architecture back to the user or write
it into a PR description/commit message, keep the
(file:lines)citations from the focus map or from the source you opened — don't assert structure without a pointer to it. - It's a cache, not a deliverable. Never write the raw JSON or
.codegraph/into the wiki vault, a PR description, or committed docs — it's a disposable sidecar in the project repo (git-ignored). Re-run it fresh next time rather than treating old output as durable.
If CodeGraph isn't installed
auto/builtin still work with zero setup (uses the regex AST extractor + rg). If you want
the enhanced cross-file call-graph evidence and the user is fine with installing something:
npm install -g @colbymchenry/codegraph
or point CODE_UNDERSTANDING_CODEGRAPH_BIN at an existing binary. Never install without the
user's go-ahead — ask first, then re-run the command.
Check obsidian-wiki doctor --project <dir> for the code-understanding.* capability lines
(builtin, rg, codegraph, codegraph-index, codegraph-fresh, codegraph-gitignore) to
see what's available before deciding which backend to request explicitly.
FAQ
What does the code-understand skill do?
Map the load-bearing files, symbols, callers, and dependencies of an unfamiliar codebase before making changes. Use for architecture orientation, impact analysis, what-would-break questions, or finding callers. Uses CodeGraph when available and a dependency-free builtin fallback.
How do I install code-understand?
Run npx skills add https://github.com/ar9av/obsidian-wiki --skill code-understand in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/code-understand/ (personal) or .claude/skills/code-understand/ (project).
Which AI agents can use code-understand?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is code-understand safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains code-understand?
It is published by ar9av in ar9av/obsidian-wiki. It has 192 recorded installs.
More from ar9av/obsidian-wiki
llm-wiki
ar9av/obsidian-wiki
Explain and apply the foundational LLM Wiki architecture and knowledge-management strategy. Use for setup, architecture, schema, or organization decisions; operational ingest/query/lint work uses dedicated skills.
wiki-ingest
ar9av/obsidian-wiki
Ingest new documents, raw text, folders, or URLs into the Obsidian wiki as distilled, linked knowledge. Use for general wiki ingestion when no more specific ingest skill applies, including processing raw/ staged content.
wiki-setup
ar9av/obsidian-wiki
Initialize or repair an Obsidian wiki vault's required structure and configuration. Use for new-vault setup, .env/config creation, reconfiguration, or broken setup recovery.
wiki-query
ar9av/obsidian-wiki
Search and synthesize answers from the compiled Obsidian wiki, including cited and multi-hop answers. Use for questions about existing wiki knowledge or fast index-only lookups, and for challenge requests ("challenge this", "argue against X", "poke holes in my plan") that look for the vault's own evidence against a plan. Supports named-vault routing such as wiki-query @work; not for ingesting new sources.
wiki-lint
ar9av/obsidian-wiki
Audit wiki health: broken links, orphans, contradictions, stale content, lifecycle and tag issues. Use for maintenance or health checks. Default is report-only; use wiki-dedup for page-identity merges.
wiki-status
ar9av/obsidian-wiki
Report wiki ingestion/completeness state, pending source delta, structural insights, or maintenance equilibrium. Use for remaining-work/status questions, hubs and bridges, or whether maintenance skills still have pending changes. wiki-digest summarizes learned knowledge instead.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.