knowledge-graph
Skill4 starsChanged 4 months agoMITView on GitHub
Build, update, and query a persistent project knowledge graph from skills, memory, docs, and code structure — stdlib Python only, no external tools. Dual-mode: skill-library (agent-loom) or application (any consumer repo). Load when the user asks for a knowledge graph, project map, skill relationships, query the graph, update the graph, or trace how components connect. Auto-runs on memory-handoff and project-setup bootstrap. Also triggers on "build the graph", "what connects to X", "map this project".
- Reads credentials
- Installs packages
26 other projects use a version of this.
Adopted by
Most recently taken up by
- HridayKapoor/syntopiktheir own version, first seen Nov 29, 2026
- digitalgym/aipathway-standardstheir own version, first seen Nov 24, 2026
- AragornZJF/knowledge-graph-maptheir own version, first seen Nov 22, 2026
- urmzd/saigetheir own version, first seen Nov 20, 2026
- revealui-studio/revskillstheir own version, first seen Nov 16, 2026
- RevealUIStudio/revskillstheir own version, first seen Nov 16, 2026
Used with
Projects with it also use metrics, push and 4 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GoogleSkillmetrics
Expertise in analyzing time-series repository health metrics, investigating root causes, and proposing proactive workflow improvements.
Also in 3 projects that use this
OpenAISkillpush
Also in 3 projects that use this
MicrosoftSkillretrospective
Review how work went and improve the next round. USE WHEN asked for a retro, delays, or process lessons. DO NOT USE for code review or transcript replay.
Also in 3 projects that use this
VercelSkilldeploy
Deploy applications to Vercel. Use when the user says "deploy", "deploy to Vercel", "push to production", "deploy my app", or "go live".
Also in 3 projects that use this
nicolasestremSkillbrainstorm
Structured idea generation and solution exploration with systematic analysis.
Also in 3 projects that use this
varun29ankuSSkillorchestrate
This skill should be used when the user asks to 'orchestrate a task', 'break down work into parallel agents', 'coordinate subtasks', 'run agents in parallel', or mentions 'multi-agent'. Decomposes complex tasks into tracked subtasks, dispatches parallel subagents, and coordinates until completion.
Also in 3 projects that use this
Other versions26 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 26
- llopresto87/Cypress★ 121same name
- AsiaOstrich/universal-dev-standards★ 86same name
- Happy-Technologies-LLC/happy-platform-skills★ 41same name
- ariaxhan/kernel-claude★ 16same name
- iagocavalcante/claude-turbo-search★ 16same name
- iuiaoin/agent-skills★ 16same name
- Alexander-Tyagunov/magician★ 14same name
- AragornZJF/knowledge-graph-map★ 9same name
- nikhilw/structured-agentic-workflow★ 7same name
- cirwel/unitares★ 6same name
16 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository125 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/agent-loom-routing.mdcCursor rule
- .cursor/rules/agent-loom-skills-index.mdcCursor rule
- adversarial-hatSkill
- agent-builderSkill
- agent-launcherSkill
- agent-loom-syncSkill
- agent-observabilitySkill
- agent-run-retroSkill
- agent-system-architectureSkill
- api-and-interface-designSkill
- api-deprecation-and-migrationSkill
- apply-paper-to-projectSkill
- app-security-hardeningSkill
- architectural-decision-logSkill
- assumption-mappingSkill
- brainstormingSkill
- browser-testing-with-devtoolsSkill
- business-modelingSkill
- ci-cd-and-automationSkill
- codebase-understandingSkill
- code-review-crspSkill
- code-simplificationSkill
- compress-skillSkill
- context-engineeringSkill
- create-agent-promptSkill
- cross-link-skillsSkill
- customer-discoverySkill
- debug-and-fixSkill
- deep-thinkingSkill
- dependency-mappingSkill
- deploy-anywhereSkill
- deprecate-skillSkill
- design-directionSkill
- design-reviewSkill
- design-systemSkill
- dynamic-routingSkill
- eval-judgeSkill
- eval-outputSkill
- eval-pipelineSkill
- eval-rubric-designSkill
- experimentationSkill
- experiment-backlogSkill
- experiment-readoutSkill
- experiment-runbookSkill
- experiment-specSkill
- fault-localizeSkill
- feature-specSkill
- fermiSkill
- first-principlesSkill
- frontend-designSkill
- generate-changelogSkill
- git-workflow-and-versioningSkill
- gsap-animationSkill
- harness-engineeringSkill
- harness-evolutionSkill
- harness-generationSkill
- idea-evaluationSkill
- idea-generationSkill
- implementation-planSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.
0
Common
Most of the 21 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 47
Handoff sync: Every memory-handoff → --incremental build.
- Very specific: line 67
Read GRAPH_INDEX.md and GRAPH_REPORT.md when present.
- Very specific: line 98
After appending to agent-handoffs.md:
- Very specific: line 102
If build fails, note in handoff ### Graph — do not block save.
- Distinctive: line 179
No changes — citation audit passed.
“Common” is measured: kept by at least 6 in 10 of the 21 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Knowledge Graph
You maintain a queryable project graph at docs/knowledge-graph/. Stdlib Python only — no Graphify, no pip deps, no external URLs in outputs.
Deployment Context
| Host | Mode | Typical use |
| agent-loom (skill library) | skill-library | Map skill invoke chains, memory, handoffs |
| Any consumer project | application | Map modules, docs, memory for GRAPHIFY-style project management |
Mode auto-detects from authoritative skill-library files: docs/skill-graph.md and docs/SKILL-INDEX.md → skill-library label; otherwise application. Both modes always perform a repo-wide scan — skills, all application source (any path), packages, config, docs, memory, directories. Never skills-only.
Hard Rules
- Full repo, always.
build_graph.pywalks the entire repository for source files..agents/skills/is indexed as skills, not skipped — but application code inpackages/,artifacts/,lib/, etc. must appear asmodulenodes. - Query before rebuild. Relational questions →
query_graph.pyfirst. - Authoritative > inferred.
invokesfromdocs/skill-graph.md+SKILL-INDEX.mdCalls: lines are authoritative;referencesedges are hypotheses. - Shrink guard. No
--forceunless user confirms or graph is corrupt. - Handoff sync. Every
memory-handoff→--incrementalbuild. - No secrets. Skip
.env, credentials, tokens by path name.
Common Rationalizations
| Excuse | Reality |
| "I'll just grep" | Grep misses invoke chains and handoff lineage. Query the graph. |
| "Graph is stale, full rebuild" | Try --incremental first; authoritative sources may be unchanged. |
| "INFERRED edge = fact" | Read source_file / provenance before acting. |
| "Skip graph on handoff" | Next agent loses relational context. |
| "Need Graphify pip package" | Native stdlib scripts; patterns only, no install. |
| "Only for agent-loom" | Bootstrap in every project via project-setup. |
| "Many skills = skills-only graph" | Wrong — repo-wide scan always runs; read build stdout Why: line. |
Workflow
Step 1 — Check existing graph
Read GRAPH_INDEX.md and GRAPH_REPORT.md when present.
Step 2 — Build or update
python3 .agents/skills/knowledge-graph/scripts/build_graph.py # full repo scan
python3 .agents/skills/knowledge-graph/scripts/build_graph.py --incremental # handoff/default
python3 .agents/skills/knowledge-graph/scripts/build_graph.py --force # override shrink guard
python3 .agents/skills/knowledge-graph/scripts/build_graph.py --strict # fail if source on disk but 0 modulesStdout always prints: auto mode label, why that label was chosen, and scan layers (skills, code dirs, docs, memory). Read it before assuming skills-only — both modes scan the full repository.
Step 3 — Query
python3 .agents/skills/knowledge-graph/scripts/query_graph.py query "memory handoff connections"
python3 .agents/skills/knowledge-graph/scripts/query_graph.py path memory-handoff knowledge-graph
python3 .agents/skills/knowledge-graph/scripts/query_graph.py explain validate-skillsCite path, confidence, and provenance for every hit. routing_note in JSON output confirms authoritative-first ordering — prefer invokes edges from skill-graph.md over INFERRED heuristics when choosing skills.
Step 4 — Health audit (optional / validate-skills hook)
python3 .agents/skills/knowledge-graph/scripts/graph_health.pyStep 5 — Report
Summarize: mode, node/edge counts, authoritative vs inferred ratio, hub nodes, communities, top query results.
Handoff Hook (mandatory for memory-handoff)
After appending to agent-handoffs.md:
python3 .agents/skills/knowledge-graph/scripts/build_graph.py --incrementalIf build fails, note in handoff ### Graph — do not block save.
Output Format
## Knowledge graph — [full | incremental | query | health]
Mode: [skill-library | application]
Stats: [N] nodes, [E] edges ([A] authoritative invokes)
Hub nodes: [top 3]
Query: "[question]" → [matches with confidence tags]
Files: graph.json, call-graph.json, GRAPH_INDEX.md, GRAPH_REPORT.mdVerification
graph.json,GRAPH_INDEX.md,GRAPH_REPORT.mdexist underdocs/knowledge-graph/- Build stdout shows
repo-wide sourcelayer (not skills-only) - Consumer repos with code have
modulenodes ingraph.jsonstats call-graph.jsonpresent when mode=skill-library- Shrink guard respected (or
--forceapproved) - Query results cite path + confidence + provenance
- Handoff hook ran
--incrementalwhen invoked frommemory-handoff - No secrets or external URLs in graph artifacts
Red Flags
- Full graph rebuild run before query_graph for relational ask
- Inferred edges override authoritative Calls: from SKILL-INDEX
- Repo walk skipped — partial graph presented as complete
- graph.json stale versus latest handoff not rebuilt
Reference Files
references/schema.md— node/edge types, provenance priorityreferences/integration.md— producers/consumers, project-setup bootstrapscripts/build_graph.py— full/incremental buildscripts/query_graph.py— query, path, explainscripts/graph_health.py— dangling invokes, stale graph, orphan skills
File Output
Append to docs/skill-outputs/SKILL-OUTPUTS.md:
| YYYY-MM-DD HH:MM | knowledge-graph | docs/knowledge-graph/ | [N] nodes, [E] edges, mode=[mode] |Examples
<examples>
<example>
<input>Build a knowledge graph for this project.</input>
<output>
Ran `build_graph.py` → mode=skill-library, 120 nodes, 412 edges (164 authoritative invokes). Hubs: universal-skill-creator, validate-skills, secure-skill. Saved to `docs/knowledge-graph/`. See `GRAPH_REPORT.md` for communities and suggested questions.
</output>
</example>
<example>
<input>How does memory-handoff connect to knowledge-graph?</input>
<output>
`query_graph.py path memory-handoff knowledge-graph` → 1 hop via `invokes` [EXTRACTED, provenance: memory-handoff/SKILL.md]. Neighbors: memory-capture, agent-handoffs [recorded_in].
</output>
</example>
</examples>Prune Log
Last pruned: 2026-07-04
- No changes — citation audit passed; content current (improve-skills full pass 2026-07-04)
Impact Report
Knowledge graph: [full/incremental/query/health]
Mode: [skill-library|application] | Nodes: [N] | Edges: [E]
Authoritative invokes: [A] | EXTRACTED: [E] | INFERRED: [I]
Shrink guard: [ok/refused/forced] | Handoff sync: [yes/no]
Consumers notified: [list or n/a]Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

