graph
Skill40 starsChanged 4 months agoMITView on GitHub
Initialize or refresh the knowledge-graph snapshot for a repository. Ensures the codebase-memory-mcp engine is present (fetching it if needed), then builds draft/graph/ and reports engine, counts, hotspots, and cycles. Accepts an optional repo path.
14 other projects use a version of this.
Adopted by
Most recently taken up by
- 9Ashwin/let-it-gotheir own version, first seen Sep 28, 2026
- Yeachan-Heo/oh-my-claudecodetheir own version, first seen Sep 22, 2026
- AraneaDev/knossostheir own version, first seen Sep 15, 2026
- renzrollon/interlocktheir own version, first seen Sep 10, 2026
- factor241/ketos-bottheir own version, first seen Sep 3, 2026
- nikshostudios/uni-claude-skillstheir own version, first seen Aug 31, 2026
Used with
Projects with it also use watch, lint and 3 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.
hidai25Skillwatch
Start EvalView watch mode to automatically re-run regression checks whenever project files change.
Also in 3 projects that use this
Microsoft AzureSkilllint
Run all linting and spell checking for TypeScript and Rust code. Run this before committing to catch style issues, clippy warnings, and misspellings.
Also in 3 projects that use this
raven-souravSkillingest
Also in 3 projects that use this
DockerSkillresearch
Research a documentation topic — locate affected files, understand the problem, identify what to change. Use when investigating an issue, a question, or a topic before writing a fix. Triggers on: "research issue 1234", "investigate what needs changing for #500", "what files are affected by #200", "where is X documented", "is our docs page about Y accurate", "look into how we document Z".
Also in 4 projects that use this
Google CloudSkilltriage
Gather context on a change or bug and plan the implementation.
Also in 3 projects that use this
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- Yeachan-Heo/oh-my-claudecode★ 40ksame name
- smallnest/goal-workflow★ 287same name
- romarayt/raytsystem-public-os★ 150same name
- alirezarezvani/gaios★ 45same name
- renzrollon/interlock★ 17same name
- iwe-org/skills★ 13same name
- AraneaDev/knossos★ 2same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- geronimo-iia/llm-wiki-skills★ 2same name
- modeled-information-format/research-harness-template★ 2same name
4 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 repository35 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- web/llms-full.txtllms.txt
- web/llms.txtllms.txt
- adrSkill
- assist-reviewSkill
- bughuntSkill
- changeSkill
- coverageSkill
- debugSkill
- decomposeSkill
- deep-reviewSkill
- deploy-checklistSkill
- discoverSkill
- docsSkill
- documentationSkill
- draftSkill
- impactSkill
- implementSkill
- incident-responseSkill
- initSkill
- integrationsSkill
- jiraSkill
- learnSkill
- new-trackSkill
- opsSkill
- planSkill
- quick-reviewSkill
- revertSkill
- reviewSkill
- standupSkill
- statusSkill
- tech-debtSkill
- testing-strategySkill
- tourSkill
- uploadSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
No argument → use the current directory (.).
- Distinctive: line 73
If this exits non-zero, the engine became unavailable mid-run — report it and stop.
“Common” is measured: kept by at least 6 in 10 of the 11 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
Draft Graph
Initialize or refresh the draft/graph/ knowledge-graph snapshot for a single repository. This is the narrow "give me a fresh structural graph" command — it does not generate architecture.md/.ai-context.md and does not re-inject doc diagram slots (both are /draft:init). For scope-aware, root-first graph memory across a monorepo (root spine + module→root links), use /draft:init --graph-only.
Red Flags - STOP if you're
- Reporting counts without actually running
graph-snapshot.sh - Claiming the graph is built when the engine was unavailable
- Treating an engine-unavailable result as a hard failure (it degrades gracefully)
- Running against a path that isn't a directory
Build, then report what the tools actually returned.
Step 1: Resolve the target repo
The command takes an optional path argument: /draft:graph [path].
- No argument → use the current directory (
.). - With a path → use it as the repo root.
REPO="${1:-.}"
if [ ! -d "$REPO" ]; then
echo "ERROR: '$REPO' is not a directory."
exit 1
fi
REPO_ABS="$(cd "$REPO" && pwd)"
echo "Target repo: $REPO_ABS"
# Locate Draft's bundled helpers. Skills run with cwd = the user's project and
# ${CLAUDE_PLUGIN_ROOT} is not exported into skill Bash, so resolve DRAFT_TOOLS here
# and call helpers as "$DRAFT_TOOLS/<tool>.sh". See core/shared/tool-resolver.md.
DRAFT_TOOLS="${DRAFT_PLUGIN_ROOT:-$(cat ~/.cache/draft/plugin-root 2>/dev/null)}/scripts/tools"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/cache/*/draft/*/scripts/tools 2>/dev/null | sort -V | tail -1)"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/marketplaces/*draft*/scripts/tools 2>/dev/null | tail -1)"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$PWD/scripts/tools"
DRAFT_SCRIPTS="${DRAFT_TOOLS%/tools}" # parent dir holds fetch-memory-engine.shStep 2: Ensure the engine is present
Resolve the engine; if it is missing, fetch it once, then re-check. If it is still unavailable (e.g. offline, opted out via DRAFT_MEMORY_DISABLE), report and stop gracefully — graph features are optional everywhere in Draft.
if ! "$DRAFT_TOOLS/verify-graph-binary.sh" --repo "$REPO_ABS" --json 2>/dev/null | grep -q '"status":"ok"'; then
echo "Graph engine not found — attempting to fetch it..."
"$DRAFT_SCRIPTS/fetch-memory-engine.sh" || true
fi
ENGINE="$("$DRAFT_TOOLS/verify-graph-binary.sh" --repo "$REPO_ABS" --json 2>/dev/null || true)"
if ! echo "$ENGINE" | grep -q '"status":"ok"'; then
echo "Graph engine unavailable — skipping. Install with scripts/fetch-memory-engine.sh, or unset DRAFT_MEMORY_DISABLE."
exit 0
fi
echo "Engine: $ENGINE"Step 3: Build / refresh the snapshot
One call resolves the engine, indexes the repo (incrementally on refresh), and updates the gate marker <repo>/draft/graph/schema.yaml (engine metadata + point-of-index counts; access: engine-live). All structural graph data is queried live from the engine — no snapshot files are committed beyond schema.yaml.
"$DRAFT_TOOLS/graph-snapshot.sh" --repo "$REPO_ABS"If this exits non-zero, the engine became unavailable mid-run — report it and stop; do not fabricate results.
Step 4: Report
Summarize what the snapshot contains. Read draft/graph/schema.yaml for engine/version/counts, and use the live tools for a quick health view:
echo "--- Snapshot ---"
cat "$REPO_ABS/draft/graph/schema.yaml"
echo "--- Top hotspots ---"
"$DRAFT_TOOLS/hotspot-rank.sh" --repo "$REPO_ABS" --top 5
echo "--- Cycles ---"
"$DRAFT_TOOLS/cycle-detect.sh" --repo "$REPO_ABS"
echo "--- Snapshot state ---"
git -C "$REPO_ABS" rev-parse --short HEAD 2>/dev/null \
&& { git -C "$REPO_ABS" diff --quiet 2>/dev/null || echo "(working tree dirty — snapshot reflects uncommitted changes)"; }Present a concise summary:
- Engine: version + resolution source (path / managed / bundled / override)
- Graph: node and edge counts (from
schema.yaml) - Top hotspots: the highest fan-in symbols
- Cycles: count, or
None ✓ - Freshness: the commit the snapshot reflects, and whether the tree was dirty
Then point the user at the natural next steps:
- To re-inject the refreshed diagrams/hotspot tables into
architecture.md/.ai-context.md: run/draft:init refresh(or/draft:init --graph-onlyto rebuild just the graph memory). - For a first-time full context bootstrap (architecture + profiles): run
/draft:init.
Graceful Degradation
| Scenario | Behavior |
| Engine resolvable | Build snapshot, report counts/hotspots/cycles |
| Engine missing, fetch succeeds | Build proceeds after fetch |
Engine missing, fetch fails / DRAFT_MEMORY_DISABLE=1 | Report unavailable and exit 0 — no error, no partial snapshot |
| Path not a directory | Exit 1 with a clear message |
See core/shared/graph-query.md and bin/README.md for the query contract and engine resolution.
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.

