understand
Analyze a codebase to produce an interactive knowledge graph for understanding architecture, components, and relationships
Profile →npx skills add majiayu000/claude-skill-registry --skill understand-lum1104-understand-anything --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Analyze the current codebase and produce a knowledge-graph.json file in .understand-anything/. This file powers the interactive dashboard for exploring the project's architecture.
How it works
- Accepts arguments like --full, --auto-update, --no-auto-update, --review, and --language <lang> to control analysis scope, update behavior, and language of generated content.
- Performs Phase 0 (Pre-flight) to determine full vs incremental analysis, resolve PROJECT_ROOT, handle worktree redirects, ensure plugin build, and gather commit hash.
- Adjusts language settings by updating or reading
.understand-anything/config.json, and stores language directives for generated content. - Checks for and merges any
*knowledge-graph*.jsonsubdomain graphs into the mainknowledge-graph.jsonvia a bundled merge script. - Reads README and project manifests to assemble context (README_CONTENT, MANIFEST_CONTENT), captures a directory tree (DIR_TREE), and detects an ENTRY_POINT.
- Manages Phase 0.5 to establish an exclude list via
.understandignore, prompting user confirmation before scanning. - Phase 1 performs a full scan (for full analysis) by dispatching a subagent (
project-scanner), passing in additional context from the main session. - Uses a phase-based progress reporting scheme throughout execution.
When to use it
- Use --full to force a complete rebuild of the knowledge graph.
- Use --auto-update to enable automatic graph updates on commit; --no-auto-update to disable.
- Use --review to run an LLM-based graph-reviewer instead of inline validation.
- Use --language <lang> to generate textual content in a specific language and store the preference for incremental updates.
What it can touch
- Interacts with:
.understand-anything/knowledge-graph.json,.understand-anything/config.json,.understand-anything/intermediate,.understand-anything/tmp, and potentially other generated outputs. - Requires: Node-based tooling (plugin/core build), Python for merge-subdomain-graphs.py, and git for change detection.
Caveats
- Redirects output for git worktrees to the main repository root unless disabled with UNDERSTAND_NO_WORKTREE_REDIRECT.
- The merge of subdomain graphs deduplicates nodes and edges, reporting a summary before proceeding.
- Language changes persist in config and affect all subsequent phases.
# /understand Analyze the current codebase and produce a `knowledge-graph.json` file in `.understand-anything/`. This file powers the interactive dashboard for exploring the project's architecture. ## Options - `$ARGUMENTS` may contain: - `--full` — Force a full rebuild, ignoring any existing graph - `--auto-update` — Enable automatic graph updates on commit (writes `autoUpdate: true` to `.understand-anything/config.json`) - `--no-auto-update` — Disable automatic graph updates (writes `autoUpdate: false` to `.understand-anything/config.json`) - `--review` — Run full LLM graph-reviewer instead of inline deterministic validation - `--language <lang>` — Generate all textual content (summaries, descriptions, tags, titles, languageNotes, languageLesson) in the specified language. Accepts ISO 639-1 codes (`zh`, `ja`, `ko`, `en`, `es`, `fr`, `de`, etc.) or friendly names (`chinese`, `japanese`, `korean`, `english`, `spanish`, etc.). Locale variants supported: `zh-TW`, `zh-HK`, etc. Defaults to `en` (English). Stores preference in `.understand-anything/config.json` for consistency across incremental updates. - A directory path (e.g. `/path/to/repo` or `../other-project`) — Analyze the give
- Options
- Progress Reporting
- Phase 0 — Pre-flight
- Phase 0.5 — Ignore Configuration
- Phase 1 — SCAN (Full analysis only)
- Phase 1.5 — BATCH
- Phase 2 — ANALYZE
- Full analysis path
- Incremental update path
- Phase 3 — ASSEMBLE REVIEW
- Phase 4 — ARCHITECTURE
- Phase 5 — TOUR
- Phase 6 — REVIEW
- Phase 7 — SAVE
if [ -n "$COMMON_DIR" ] && [ -n "$GIT_DIR" ]; then
if [ -n "$COMMON_ABS" ] && [ "$COMMON_ABS" != "$GIT_ABS" ]; then
if [ -d "$MAIN_ROOT" ] && [ "${UNDERSTAND_NO_WORKTREE_REDIRECT:-0}" != "1" ]; then
echo "[understand] Detected git worktree at $PROJECT_ROOT"
echo "[understand] Redirecting output to main repo root: $MAIN_ROOT"
echo "[understand] (Set UNDERSTAND_NO_WORKTREE_REDIRECT=1 to keep PROJECT_ROOT as the worktree.)"
fi
for candidate in \
if [ -n "$candidate" ] && [ -f "$candidate/package.json" ] && [ -f "$candidate/pnpm-workspace.yaml" ]; then
breakWhat does the understand skill do?
Analyze a codebase to produce an interactive knowledge graph for understanding architecture, components, and relationships
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill understand-lum1104-understand-anything --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.