graphlisted
Install: claude install-skill drafthq/draft
# 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