graph

Solid

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.

Code & Development 40 stars 6 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
54
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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. ```bash 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_T...

Details

Author
drafthq
Repository
drafthq/draft
Created
7 months ago
Last Updated
2 days ago
Language
HTML
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category