From understand-anything
Ask questions about a codebase using both the structural knowledge graph and the domain graph. Enhanced replacement for /understand-chat that includes business flow context.
How this skill is triggered — by the user, by Claude, or both
Slash command
/understand-anything:ua-chatThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Answers questions about this codebase using both `.understand-anything/knowledge-graph.json` and `.understand-anything/domain-graph.json` (when present). Provides structural file/function answers AND business-flow answers with step-by-step file pointers.
Answers questions about this codebase using both .understand-anything/knowledge-graph.json and .understand-anything/domain-graph.json (when present). Provides structural file/function answers AND business-flow answers with step-by-step file pointers.
knowledge-graph.json:
nodes[] — file, function, class, config, document, service, table, endpoint, pipeline, schema, resource nodesedges[] — imports, calls, contains, deploys, configures, documents, tested_by, etc.layers[] — architectural layer assignmentstour[] — guided learning stepsdomain-graph.json (optional):
nodes[] — domain, flow, step nodesedges[] — contains_flow (domain→flow), flow_step (flow→step, weight=sequential order), cross_domainfilePath and lineRange pointing to implementing codeStaleness check (non-blocking — warn but continue):
STORED=$(node -p "require('fs').existsSync('.understand-anything/meta.json') && JSON.parse(require('fs').readFileSync('.understand-anything/meta.json','utf8')).gitCommitHash || ''" 2>/dev/null || echo "")
CURRENT=$(git rev-parse HEAD 2>/dev/null || echo "")
[ -n "$STORED" ] && [ -n "$CURRENT" ] && [ "$STORED" != "$CURRENT" ] && echo "⚠️ Note: Knowledge graph may be stale. Run /ua-status for details."
Check graph exists:
[ -f .understand-anything/knowledge-graph.json ] || { echo "No knowledge graph found. Run /understand first."; exit 1; }
Read project metadata — grep the top of knowledge-graph.json for the "project" section (name, description, languages, frameworks).
Search the structural graph for nodes matching the user's query: "$ARGUMENTS"
"name" fields: grep -i for query keywords"summary" fields for semantic matches"tags" arrays for topic matchesFind structural edges — for each matched node ID, grep the edges section for that ID as source or target. Find upstream callers (target matches) and downstream dependencies (source matches).
Find structural layers — grep matched node IDs in the "layers" section to identify which architectural layers are touched.
Search the domain graph (if it exists):
[ -f .understand-anything/domain-graph.json ] && DOMAIN_EXISTS=true || DOMAIN_EXISTS=false
If DOMAIN_EXISTS is true:
"name" and "summary" fields for the query keywordsflow node (type "flow"): find all flow_step edges with that flow as source, then retrieve the step nodes they point to — sorted by edge weight (weight encodes order: 0.1=first, 0.2=second, etc.)filePath and optionally lineRange — include these as direct code pointersAnswer the query combining both result sets:
1. {step.name} — {step.summary} → \{step.filePath}:{step.lineRange[0]}``**{query topic}** is handled by:
**Structural view:**
- `src/checkout/controller.ts` (API layer) — handles HTTP POST /checkout requests
- `src/checkout/validator.ts` (Service layer) — validates cart contents
**Business Flow — Checkout Process:**
1. Validate cart → `src/checkout/validator.ts:38`
2. Apply promotions → `src/promotions/service.ts:112`
3. Charge payment → `src/payments/stripe.ts:89`
4. Send confirmation → `src/email/transactional.ts:44`
npx claudepluginhub az9713/understand-anything-tutorial --plugin understand-anythingCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.