Back to Skills

understand

Analyze a codebase to produce an interactive knowledge graph for understanding architecture, components, and relationships

72,666stars6,063forksUpdated 7/11/2026

Security Assessment

Safe(90/100)

Detected risks:

Agent-reviewed override(Code-understanding skill: 'rm -rf' only appears in a safe cleanup that mv's scratch dirs to .trash/ 'rather than rm -rf'ing them', plus a cron purge of week-old .trash dirs; .bashrc/.zshrc are in a shell-language reference. Benign.)
Security Score90/100

About understand

Understand analyzes a codebase and produces a knowledge-graph.json file that powers an interactive dashboard for exploring the project's architecture, components, and their relationships. Invoked as /understand, it writes into the project's data directory, either .ua/ or the legacy .understand-anything/ when that already exists, and supports both full rebuilds and incremental updates. Command options include --full to force a complete rebuild ignoring any existing graph, --auto-update and --no-auto-update to toggle automatic graph updates on commit, --review to run a full LLM graph-reviewer instead of inline deterministic validation, --language to generate all textual content such as summaries, descriptions, tags, titles, and language notes in a chosen language via ISO 639-1 codes or friendly names, and an optional directory path to analyze a project other than the current working directory.

Execution is organized into seven phases with progress reporting at each transition and during batch processing, which keeps users informed on large codebases where analysis can take a long time. Phase 0 handles pre-flight setup: resolving the project root from arguments or the working directory, and redirecting output to the main repository root when the target is an ephemeral git worktree, detected by comparing the git dir against the git common dir, so the generated graph is not destroyed when the session ends. It also ensures the plugin is built, because later phases run Node scripts that import the core package; on a fresh install it locates the plugin root across several candidate paths, accounting for symlinked installations, and builds the core package with pnpm, requiring Node.js 22 or later and pnpm 10 or later.

Finally it resolves the data directory once for reuse across every read and write in later phases, preserving any existing legacy directory so established projects keep working without migration. The chosen language preference is stored in config.json for consistency across incremental updates, as is the auto-update setting. The overall aim is to give developers a navigable, always-refreshable map of an unfamiliar or large project rather than a static document, with deterministic validation by default and an optional deeper LLM review pass.

FAQ

What does it produce?

A knowledge-graph.json file in the project's data directory (.ua/, or the legacy .understand-anything/ when present) that powers an interactive dashboard for exploring the project's architecture, components, and relationships.

Can it generate content in another language?

Yes. The --language option accepts ISO 639-1 codes like zh, ja, or ko, or friendly names like chinese or korean, and applies to all summaries, descriptions, tags, titles, and language notes. The preference is stored in config.json for consistency across updates.

What are the runtime requirements?

Node.js 22 or later and pnpm 10 or later. Later phases import the understand-anything core package, so on a fresh install the skill builds that package with pnpm before proceeding.

Does it support incremental updates or only full rebuilds?

Both. Phase 0 decides between a full analysis and an incremental update; --full forces a complete rebuild, while --auto-update enables automatic updates on commit.

What happens if I run it inside a git worktree?

It redirects output to the main repository root, because those worktrees are ephemeral and the data directory written there would be destroyed when the session ends. Set UNDERSTAND_NO_WORKTREE_REDIRECT=1 to keep a per-worktree graph instead.

All Files

50 files
build-fingerprints.mjs3.4 KB
View
extract-structure.mjs6.0 KB
View
frameworks/flask.md3.4 KB
View
frameworks/react.md3.7 KB
View
languages/cpp.md2.5 KB
View
compute-batches.mjs23.2 KB
View
frameworks/django.md4.7 KB
View
frameworks/gin.md4.5 KB
View
frameworks/spring.md4.8 KB
View
languages/csharp.md2.6 KB
View
languages/graphql.md1.9 KB
View
extract-import-map.mjs75.0 KB
View
frameworks/express.md4.3 KB
View
frameworks/nextjs.md4.2 KB
View
frameworks/vue.md4.4 KB
View
languages/css.md2.0 KB
View
extract-structure-result.mjs3.8 KB
View
frameworks/fastapi.md4.2 KB
View
frameworks/rails.md5.3 KB
View
generate-ignore.mjs2.5 KB
View
languages/dockerfile.md1.9 KB
View
languages/yaml.md1.9 KB
View
languages/go.md2.4 KB
View
languages/javascript.md2.3 KB
View
languages/php.md2.4 KB
View
languages/rust.md2.4 KB
View
languages/html.md1.9 KB
View
languages/kotlin.md2.4 KB
View
languages/python.md2.6 KB
View
languages/shell.md1.8 KB
View
languages/java.md2.4 KB
View
languages/markdown.md1.9 KB
View
languages/ruby.md2.3 KB
View
languages/sql.md2.0 KB
View
languages/json.md1.7 KB
View
languages/protobuf.md1.8 KB
View
languages/scala.md3.1 KB
View
languages/terraform.md2.1 KB
View
locales/ja.md1.2 KB
View
languages/swift.md2.4 KB
View
locales/en.md1.5 KB
View
locales/zh-TW.md1.0 KB
View
scan-project.mjs27.7 KB
View
languages/typescript.md2.5 KB
View
locales/ko.md1.2 KB
View
merge-batch-graphs.py48.7 KB
View
locales/ru.md2.0 KB
View
merge-subdomain-graphs.py15.7 KB
View
locales/zh.md1.0 KB
View
SKILL.md44.4 KB
View

Install understand

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill