# Codebase Knowledge Graph

Maps a codebase into an interactive knowledge graph of its architecture and components.

- Repository: https://github.com/Egonex-AI/Understand-Anything (89616 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-26
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add Egonex-AI/Understand-Anything --skill understand -g -a claude-code -y`
Codex: `npx skills add Egonex-AI/Understand-Anything --skill understand -g -a codex -y`
Cursor: `npx skills add Egonex-AI/Understand-Anything --skill understand -g -a cursor -y`
Gemini CLI: `npx skills add Egonex-AI/Understand-Anything --skill understand -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Egonex-AI/Understand-Anything`

## Description

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

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# /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 glob patterns for additional files/directories to exclude from analysis (e.g., `--exclude "tests/*,docs/*"`). These patterns take highest priority over built-in defaults and `.understandignore` rules. Supports gitignore syntax including `!` negation.
  - A directory path (e.g. `/path/to/repo` or `../other-project`), Analyze the given directory instead of the current working directory

---

## Progress Reporting

Throughout execution, report progress to the user at each phase transition and during batch processing. This keeps users informed on large codebases where analysis can take a long time.

- **Phase transitions:** At the start of each phase, print a status line:
  > `[Phase N/7] <phase name>...`
  >
  > Example: `[Phase 2/7] Analyzing files (12 batches)...`

The rest: https://github.com/Egonex-AI/Understand-Anything/blob/HEAD/understand-anything-plugin/skills/understand/SKILL.md
