Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
lum1104 avatar

Understand Knowledge

  • 1.1k installs
  • 77.5k repo stars
  • Updated July 30, 2026
  • lum1104/understand-anything

understand-knowledge is a Python agent skill that merges deterministic scans and LLM-generated analysis into a clean, queryable knowledge graph for any codebase or wiki.

About

understand-knowledge is part of the understand-anything project and runs merge-knowledge-graph.py to combine a deterministic scan-manifest.json with LLM analysis batches (analysis-batch-*.json) into a final assembled knowledge graph. The script handles entity deduplication, edge normalization, layer building from index.md categories, and tour generation from index.md section ordering. Output is written to assembled-graph.json under .understand-anything/intermediate/ inside the wiki directory. Developers reach for understand-knowledge after codebase scans and LLM analysis batches exist and they need one merged, queryable graph instead of fragmented JSON artifacts.

  • Merges scan-manifest.json with multiple analysis-batch-*.json files
  • Performs entity deduplication and edge normalization
  • Builds layered graph from index.md category hierarchy
  • Generates guided tour from index.md section ordering
  • Outputs assembled-graph.json ready for agent consumption

Understand Knowledge by the numbers

  • 1,063 all-time installs (skills.sh)
  • +24 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #988 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/lum1104/understand-anything --skill understand-knowledge

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.1k
repo stars77.5k
Security audit3 / 3 scanners passed
Last updatedJuly 30, 2026
Repositorylum1104/understand-anything

How do you merge codebase scans into a knowledge graph?

Merge deterministic scans and LLM-generated analysis into a clean, queryable knowledge graph for any codebase or wiki.

Who is it for?

Developers using understand-anything who have scan manifests and LLM analysis batches ready to merge into one queryable graph.

Skip if: Developers who need live IDE symbol navigation without running Python merge scripts on wiki artifacts.

When should I use this skill?

scan-manifest.json and analysis-batch-*.json files exist in a wiki directory and need merging into assembled-graph.json.

What you get

assembled-graph.json with deduplicated entities, normalized edges, index.md layers, and generated codebase tours.

  • assembled-graph.json
  • codebase tour layers

Files

SKILL.mdMarkdownGitHub ↗

/understand-knowledge

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.

What It Detects

The Karpathy LLM wiki pattern (see https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f):

  • Raw sources — immutable source documents (articles, papers, data files)
  • Wiki — LLM-generated markdown files with wikilinks ([[target]] syntax)
  • Schema — CLAUDE.md, AGENTS.md, or similar configuration file
  • index.md — content catalog organized by categories
  • log.md — chronological operation log

Detection signals: has index.md + multiple .md files with wikilinks. May have raw/ directory and schema file.

Instructions

Phase 1: DETECT

1. Determine the target directory:

  • If the user provided a path argument, use that
  • Otherwise, use the current working directory

2. Run the format detection script bundled with this skill:

   python3 <SKILL_DIR>/parse-knowledge-base.py <TARGET_DIR>
  • If the script exits with an error, tell the user this doesn't appear to be a Karpathy-pattern wiki and explain what was expected
  • If successful, proceed. The script writes scan-manifest.json to <TARGET_DIR>/.understand-anything/intermediate/

3. Read the scan-manifest.json and announce the results:

  • "Detected Karpathy wiki: N articles, N sources, N topics, N wikilinks (N unresolved)"
  • List the categories found from index.md

Phase 2: SCAN (already done)

The parse script in Phase 1 already performed the deterministic scan. The scan-manifest.json contains:

  • Article nodes (one per wiki .md file) with extracted wikilinks, headings, frontmatter
  • Source nodes (one per raw/ file)
  • Topic nodes (from index.md section headings)
  • related edges (from wikilinks)
  • categorized_under edges (from index.md sections)

No additional scanning is needed. Proceed to Phase 3.

Phase 3: ANALYZE

Dispatch article-analyzer subagents to extract implicit knowledge:

1. Read the scan-manifest.json to get the article list

2. 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)

3. For each batch, dispatch an article-analyzer subagent with:

  • The batch of articles (id, name, summary, wikilinks, category, content from knowledgeMeta)
  • The full list of existing node IDs (so the agent can reference them)
  • The batch number for output file naming
  • The intermediate directory path: $INTERMEDIATE_DIR = <TARGET_DIR>/.understand-anything/intermediate

The agent will write analysis-batch-{N}.json to the intermediate directory.

4. Run up to 3 batches concurrently. Wait for all batches to complete.

5. If any batch fails, log a warning but continue — the scan-manifest provides a solid base graph even without LLM analysis.

Phase 4: MERGE

1. Run the merge script bundled with this skill:

   python3 <SKILL_DIR>/merge-knowledge-graph.py <TARGET_DIR>

2. The script:

  • Combines scan-manifest.json + all analysis-batch-*.json files
  • Deduplicates entities (case-insensitive name matching)
  • Normalizes node/edge types via alias maps
  • Builds layers from index.md categories
  • Builds a tour from index.md section ordering
  • Writes assembled-graph.json to the intermediate directory

3. Read the merge report from stderr and announce:

  • Total nodes, edges, layers, tour steps
  • How many entities/claims the LLM analysis added

Phase 5: SAVE

1. Read the assembled-graph.json

2. Run basic validation:

  • Every edge source/target must reference an existing node
  • Every node must have: id, type, name, summary, tags, complexity
  • Remove any edges with dangling references

3. Copy the validated graph to <TARGET_DIR>/.understand-anything/knowledge-graph.json

4. Write metadata to <TARGET_DIR>/.understand-anything/meta.json:

   {
     "lastAnalyzedAt": "<ISO timestamp>",
     "gitCommitHash": "<from git rev-parse HEAD or empty>",
     "version": "1.0.0",
     "analyzedFiles": <number of wiki articles>
   }

5. Clean up intermediate files:

   rm -rf <TARGET_DIR>/.understand-anything/intermediate

6. Report summary to the user:

  • "Knowledge graph saved: N articles, N entities, N topics, N claims, N sources"
  • "N edges (N wikilink, N categorized, N implicit)"
  • "N layers, N tour steps"

7. Auto-trigger the dashboard:

   /understand-dashboard <TARGET_DIR>

Notes

  • The parse script handles ALL deterministic extraction (wikilinks, headings, frontmatter, categories from index.md). The LLM agents only add implicit knowledge that requires inference.
  • Categories and taxonomy come from index.md section headings, NOT from filename prefixes. The Karpathy spec is intentionally abstract about naming conventions.
  • The graph uses kind: "knowledge" to signal the dashboard to use force-directed layout instead of hierarchical dagre.
  • Source nodes from raw/ are lightweight (filename + size only) — we don't parse PDFs or binary files.

Related skills

FAQ

What inputs does understand-knowledge require?

understand-knowledge expects a wiki directory containing scan-manifest.json from deterministic scans and one or more analysis-batch-*.json files from LLM analysis. The merge-knowledge-graph.py script combines both into a single graph.

Where does understand-knowledge write its output?

understand-knowledge writes assembled-graph.json to the .understand-anything/intermediate/ directory inside the target wiki directory, with deduplicated entities, normalized edges, layers, and tours.

Is Understand Knowledge safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

AI & Agent Buildingagentsresearchautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.