/coograph:coograph-rebuild-graph "build" for full rebuild (default), "update" for incremental update.from coograph
Rebuilds or incrementally updates the coograph code-graph SQLite database. For refreshing the dependency graph after major code changes.
Ships in coograph. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Rebuild or incrementally update the .code-graph/graph.db SQLite database.
IMPORTANT: This skill runs commands. Follow every step in order. Do not skip error handling.
Find server.py — it could be in several locations depending on the project setup:
.github/code-graph/server.py # standard location
coograph/.github/code-graph/server.py # monorepo with template as submodule
Search for it:
find . -path "*/code-graph/server.py" -not -path "*/node_modules/*" 2>/dev/null | head -5
If not found: stop and tell the user:
"No code-graph tooling found. Run the
coograph-initskill to set it up, or copy.github/code-graph/from the coograph."
If multiple found: use the one closest to the current working directory (shortest path). Report which one you're using.
Store the resolved path as $SERVER_PY.
python3 --version 2>/dev/null || python --version 2>/dev/null
If neither works: stop and tell the user Python 3.10+ is required.
If version is below 3.10: stop and tell the user Python 3.10+ is required.
Store the working Python command as $PYTHON (python3 preferred over python).
--update--build.code-graph/graph.db does not exist → always use --build (update requires an existing db)Execute from the project root (the directory where .code-graph/ should be created):
cd <project-root> && $PYTHON $SERVER_PY <--build or --update>
Expected success output includes lines like:
Detected stacks: java, structuredGraph built: N files -> .code-graph/graph.db (X.XXs)or for update:
Graph updated: updated N, dependents M, deleted DGraph up to date — no changes detected.Confirm the database exists and has data:
$PYTHON -c "
import sqlite3, os
db = '<project-root>/.code-graph/graph.db'
if not os.path.exists(db):
print('ERROR: graph.db was not created')
exit(1)
conn = sqlite3.connect(db)
nodes = conn.execute('SELECT COUNT(*) FROM nodes').fetchone()[0]
edges = conn.execute('SELECT COUNT(*) FROM edges').fetchone()[0]
stacks = conn.execute(\"SELECT value FROM meta WHERE key='stacks'\").fetchone()
print(f'Graph OK: {nodes:,} nodes, {edges:,} edges')
if stacks: print(f'Stacks: {stacks[0]}')
conn.close()
"
If nodes is 0: warn the user — the builder may not have detected the tech stack. Ask them to check if the project has recognizable stack markers (pom.xml, package.json, go.mod, etc.).
Tell the user:
If the build command fails:
ModuleNotFoundError: No module named 'parsers' — the script was run from the wrong directory. Ensure $PYTHON runs $SERVER_PY with the server.py's parent directory containing parsers/. The --build flag does NOT require mcp.
FileNotFoundError or permission errors — check the project root path is correct and writable.
Empty output / no files parsed — the stack detection found no recognized files. Check that the project root is correct (not a subdirectory).
Any other error — show the full error output to the user and suggest running manually:
cd <project-root> && uv run --with-requirements .github/code-graph/requirements.txt .github/code-graph/server.py --build
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
18 skills in this plugin
/coograph-applyImplement tasks from an OpenSpec change. Use when the user wants to start or continue implementing a proposed change./coograph-archiveArchive a completed change. Use when implementation is done and the change is ready to be moved to the archive./coograph-debugRoot-cause a bug or build error with minimal investigation, then apply the smallest fix. Reproduce, gather evidence, fix, verify, with a 3-attempt circuit breaker. Use for failing builds, tests, or runtime errors./coograph-disable-multi-modelsTurn off per-task model selection for this project. Every agent inherits the session model and Coograph stops suggesting mappings. Use when the user says they do not want multiple models, wants one model for everything, or wants the suggestions to stop./coograph-docs-restructureBring a project's instruction and map files back under the tier budgets. Takes stock with layout.py, works out the project's shape, writes a project-specific OpenSpec (areas, layout.json, gotcha extraction), and after approval migrates one area per agent with every kept fact checked against the code. Use when layout.py --budget or a retro reports STRUCTURAL, or when maps have turned into changelogs./coograph-doctorHealth check of a Coograph install. Runs a read-only script that checks the code graph, its server and MCP configs, unfilled placeholders, per-tool files, git and Claude Code hooks, openspec/config.yaml and pending sync copies, then offers the fix for each problem. Trigger when the user types `/coograph-doctor` or `$coograph-doctor`, or asks to "check the install", "run the doctor", or why coograph seems broken.npx claudepluginhub paullukic/coograph --plugin coographOther plugins' skills for the same job