Agent skill

understand

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

Egonex-AIgithub.com/Egonex-AIGitHub ↗
claude-codecodexships scriptsMIT
Install
npx skills add Egonex-AI/Understand-Anything --skill understand --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 50
SKILL.md size: 45 KB
Bundled scripts: yes
Path: understand-anything-plugin/skills/understand/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 77,447
Language: TypeScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Analyzes a codebase to produce a knowledge-graph.json in the project's data directory, then optionally merges subdomain graphs, and manages incremental vs full analysis based on flags, existing graphs, and commit state. It supports language customization, auto-update config, and exclude patterns for analysis. It also collects project context (readme, manifests, directory tree, entry point) for subagent injection, and initializes or updates ignore configuration.

How it works

  • Analyzes the current codebase to create knowledge-graph.json in the project's data directory (.ua/ or .understand-anything/).
  • Supports options: --full, --auto-update, --no-auto-update, --review, --language <lang>, --exclude <patterns>, and a target directory argument.
  • Performs Phase 0 pre-flight, including determining PROJECT_ROOT, potential worktree redirection, and ensuring a plugin build.
  • Resolves UA_DIR as the data directory, then creates intermediate and tmp directories.
  • Handles auto-update flags by writing a JSON with autoUpdate true/false to config.json and stores OUTPUT_LANGUAGE for later phases.
  • Processes --language to set or persist language preferences, including a user-prompt flow when not specified and a detected language is non-English. Stores a LANGUAGE_DIRECTIVE note describing the chosen language behavior.
  • Parses --exclude to collect and pass exclude patterns to downstream steps, with patterns taking highest priority.
  • Merges any subdomain knowledge graphs found in $UA_DIR (excluding knowledge-graph.json) by running a Python script in the skill directory: python "<SKILL_DIR>/merge-subdomain-graphs.py" "$PROJECT_ROOT".
  • If a knowledge-graph.json already exists, loads it and, if applicable, uses a review path via --review or prompts for actions based on commit hash changes and --full.
  • For incremental updates, uses git diff to identify changed files since last commit and re-analyzes only those files; if none, reports up-to-date and stops.
  • Collects project context for subagent injection: README content, primary manifest content, a top-level directory tree excerpt, and detects an entry point by checking common file patterns.
  • Phase 0.5 establishes or verifies the .understandignore via a starter script if missing, invoking a bundled node script with plugin path injected.

When to use it

  • Use --full to force a complete re-analysis regardless of existing graphs or commit state.
  • Use --review to run a full LLM graph-reviewer instead of inline validation when a graph exists and commit unchanged.
  • Use --exclude to ignore specific files or directories during analysis, with highest priority over defaults.
  • Use --language to generate all textual content in a target language and persist the preference for future updates.
  • Use a target directory argument to analyze a different repository or path instead of the current one.

What it can touch

  • Executes Python script: "merge-subdomain-graphs.py" located next to the skill (path relative to the skill folder).
  • Writes and reads: knowledge-graph.json, config.json, intermediate/, tmp/, and possibly other UA_DIR files.
  • Reads: README.* files in the project root, manifest files like package.json, pyproject.toml, Cargo.toml, go.mod, pom.xml; directory listings via find.
  • Executes node-based ignore generation: generate-ignore.mjs, passing PLUGIN_ROOT via environment.

Caveats

  • Output is redirected when in a Git worktree unless UNDERSTAND_NO_WORKTREE_REDIRECT is set to 1.
  • The process may prompt for language confirmation when a non-English detected language is found and no explicit --language is provided.
  • Language templates and directives are stored for downstream reference and display.
  • If incremental updates detect no changed files, the process stops with a notice that the graph is up to date.
  • The merge-subdomain-graphs step relies on a helper script within the skill directory and may affect how the base knowledge graph is structured through deduplication of nodes and edges.
From the SKILL.md

# /understand Analyze the current codebase and produce a `knowledge-graph.json` file in the project's data directory (`.ua/`, or the legacy `.understand-anything/` when it already exists). 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 `$UA_DIR/config.json`) - `--no-auto-update` — Disable automatic graph updates (writes `autoUpdate: false` to `$UA_DIR/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 `$UA_DIR/config.json` for consistency across incremental updates. - `--exclude <patterns>` — Comma-separated gl

What's inside
Steps it walks through
  1. Options
  2. Progress Reporting
  3. Phase 0 — Pre-flight
  4. Phase 0.5 — Ignore Configuration
  5. Phase 1 — SCAN (Full analysis only)
  6. Phase 1.5 — BATCH
  7. Phase 2 — ANALYZE
  8. Full analysis path
  9. Incremental update path
  10. Phase 3 — ASSEMBLE REVIEW
  11. Phase 4 — ARCHITECTURE
  12. Phase 5 — TOUR
  13. Phase 6 — REVIEW
  14. Phase 7 — SAVE
Ships with 24 files
  • build-fingerprints.mjs
  • compute-batches.mjs
  • extract-import-map.mjs
  • extract-structure-result.mjs
  • extract-structure.mjs
  • frameworks/django.md
  • frameworks/express.md
  • frameworks/fastapi.md
  • frameworks/flask.md
  • frameworks/gin.md
  • frameworks/nextjs.md
  • frameworks/rails.md
  • frameworks/react.md
  • frameworks/spring.md
  • frameworks/vue.md
  • generate-ignore.mjs
  • languages/cpp.md
  • languages/csharp.md
  • languages/css.md
  • languages/dockerfile.md
  • languages/go.md
  • languages/graphql.md
  • languages/html.md
  • languages/java.md
first 24 of 50
Commands it runs
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
break
More from Understand-Anything
All skills →
About this skill
What 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 Egonex-AI/Understand-Anything --skill understand --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 Egonex-AI/Understand-Anything, a repository with 77,447 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.

Keep going