coograph: Skill for Claude Code

.github/skills/coograph-rebuild-graph/SKILL.md

coograph-rebuild-graph is a skill for Claude Code from paullukic/coograph. It costs 40 tokens per session (1,056 once invoked), scanned A, original, MIT.

A procedure for rebuilding or incrementally updating the SQLite database used by a code graph, which records relationships in a codebase.

In plain words
What is it for?
It is for locating the graph tooling, checking that Python is available, and rebuilding or updating the project’s .code-graph/graph.db database.
Why use it?
It refreshes the graph after substantial code changes or when its information is out of date, so graph-based analysis reflects the current files.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

This is paullukic/coograph's own configuration. It tells Claude Code how to work on coograph itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything coograph configures →

Reuse

Borrowing it

Nothing to install: this file belongs to paullukic/coograph. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/paullukic/coograph/main/.github/skills/coograph-rebuild-graph/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/paullukic/coograph

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for coograph-rebuild-graph

README.md
[![agentmods](https://agentmods.dev/badge/skills/paullukic/coograph/coograph-rebuild-graph/github.svg)](https://agentmods.dev/skills/paullukic/coograph/coograph-rebuild-graph)
Your own site
<a href="https://agentmods.dev/skills/paullukic/coograph/coograph-rebuild-graph"><img src="https://agentmods.dev/badge/skills/paullukic/coograph/coograph-rebuild-graph/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for coograph-rebuild-graph

Your own site · 80×15
<a href="https://agentmods.dev/skills/paullukic/coograph/coograph-rebuild-graph"><img src="https://agentmods.dev/badge/skills/paullukic/coograph/coograph-rebuild-graph.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,056 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.01056
Opus 5 $0.00020 $0.00528
Sonnet 5 $0.00008 $0.00211
Haiku 4.5 $0.00004 $0.00106

Measured 11d ago against content hash 69726ac027b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

coograph-rebuild-graph scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/coograph-rebuild-graph/SKILL.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.


Step 1: Locate the code-graph tooling

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-init skill 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.

Step 2: Check Python

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).

Step 3: Determine build mode

  • If the user said "update" or "incremental" → use --update
  • If the user said "build", "rebuild", "full", or gave no argument → use --build
  • If .code-graph/graph.db does not exist → always use --build (update requires an existing db)

Step 4: Run the build

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, structured
  • Graph built: N files -> .code-graph/graph.db (X.XXs)

or for update:

  • Graph updated: updated N, dependents M, deleted D
  • Graph up to date — no changes detected.

Step 5: Verify

Confirm the database exists and has data:

Read the full file on GitHub · 117 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 117 lines · 40 tokens per session scan A 69726ac027b8

Subscribe to this mod's changes

coograph-rebuild-graph is a skill published in the GitHub repository paullukic/coograph (17 stars, last pushed 1mo ago), licensed MIT. It adds 40 tokens to every session and 1,056 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.