Prompts · TypeScript · v0.1.0
Use when you need to ask questions about a codebase or understand code using a knowledge graph
#antigravity-skills#business-knowledge#claude-code
Analyze a Karpathy-pattern LLM wiki knowledge base and generate an interactive knowledge graph with entity extraction, implicit relationships, and topic clustering.
by Egonex-AI · updated 13d ago · imported from GitHub
Analyzes a Karpathy-pattern LLM wiki — a three-layer knowledge base with raw sources, wiki markdown, and a schema file — and produces an interactive knowledge graph dashboard.
The Karpathy LLM wiki pattern (see https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f):
[[target]] syntax)Detection signals: has index.md + multiple .md files with wikilinks. May have raw/ directory and schema file.
Determine the target directory:
$UA_DIR once, and reuse it for every read and write below: UA_DIR="<TARGET_DIR>/$([ -d "<TARGET_DIR>/.understand-anything" ] && echo .understand-anything || echo .ua)" — this selects the legacy .understand-anything/ when it already exists, otherwise the new .ua/.Run the format detection script bundled with this skill:
python3 "<SKILL_DIR>/parse-knowledge-base.py" "<TARGET_DIR>"
scan-manifest.json to $UA_DIR/intermediate/Read the scan-manifest.json and announce the results:
The parse script in Phase 1 already performed the deterministic scan. The scan-manifest.json contains:
related edges (from wikilinks)categorized_under edges (from index.md sections)No additional scanning is needed. Proceed to Phase 3.
Dispatch article-analyzer subagents to extract implicit knowledge:
Read the scan-manifest.json to get the article list
Prepare batches of 10-15 articles each, grouped by category when possible (articles in the same category are more likely to have implicit cross-references)
For each batch, dispatch an article-analyzer subagent with:
$INTERMEDIATE_DIR = $UA_DIR/intermediateThe agent will write analysis-batch-{N}.json to the intermediate directory.
Run up to 3 batches concurrently. Wait for all batches to complete.
If any batch fails, log a warning but continue — the scan-manifest provides a solid base graph even without LLM analysis.
Run the merge script bundled with this skill:
python3 "<SKILL_DIR>/merge-knowledge-graph.py" "<TARGET_DIR>"
The script:
assembled-graph.json to the intermediate directoryRead the merge report from stderr and announce:
Read the assembled-graph.json
Run basic validation:
Copy the validated graph to $UA_DIR/knowledge-graph.json
Write metadata to $UA_DIR/meta.json:
{
"lastAnalyzedAt": "<ISO timestamp>",
"gitCommitHash": "<from git rev-parse HEAD or empty>",
"version": "1.0.0",
"analyzedFiles": <number of wiki articles>
}
Clean up intermediate files. Resolve $UA_DIR into a shell variable and guard it so an empty or unresolved path can never expand to rm -rf /intermediate (deleting from the filesystem root):
TARGET_DIR="<TARGET_DIR>"
UA_DIR="$TARGET_DIR/$([ -d "$TARGET_DIR/.understand-anything" ] && echo .understand-anything || echo .ua)"
if [ -n "$TARGET_DIR" ] && [ -d "$UA_DIR/intermediate" ]; then
rm -rf "$UA_DIR/intermediate"
fi
Report summary to the user:
Auto-trigger the dashboard:
/understand-dashboard <TARGET_DIR>
kind: "knowledge" to signal the dashboard to use force-directed layout instead of hierarchical dagre.No comments yet — start the thread.
Sign in to join the discussion.
Prompts · TypeScript · v0.1.0
Use when you need to ask questions about a codebase or understand code using a knowledge graph
#antigravity-skills#business-knowledge#claude-code
Prompts · TypeScript · v0.1.0
Launch the interactive web dashboard to visualize a codebase's knowledge graph
#antigravity-skills#business-knowledge#claude-code
Prompts · TypeScript · v0.1.0
Use when you need to analyze git diffs or pull requests to understand what changed, affected components, and risks
#antigravity-skills#business-knowledge#claude-code
Prompts · TypeScript · v0.1.0
Extract business domain knowledge from a codebase and generate an interactive domain flow graph. Works standalone (lightweight scan) or derives from an existing /understand knowledge graph.
#antigravity-skills#business-knowledge#claude-code