spec-graph

A connected collection of project specification documents describing architecture, design decisions, contracts, and boundaries. It treats these specifications as the project’s source of truth before code is examined.

In plain words
What is it for?
Use it when exploring a project, planning or starting a task, checking an architectural decision, changing a contract or boundary, or updating specifications alongside code.
Why use it?
It helps prevent plans and code changes from drifting away from recorded decisions or crossing boundaries that the project has already defined.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/jetbrains/thinkrail/spec-graph
Any agent
npx skills add JetBrains/thinkrail --skill spec-graph
Clone the repo
git clone --depth 1 https://github.com/JetBrains/thinkrail

Made for: Claude Code, Codex.

Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,417 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00097 $0.01417
Opus 5 $0.00048 $0.00709
Sonnet 5 $0.00019 $0.00283
Haiku 4.5 $0.00010 $0.00142

Measured 3d ago against content hash bb74f11086c4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

spec-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 3d 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.

packages/spec-graph/skills/spec-graph/SKILL.md · 97 lines

How it starts

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

Spec graph

Specs are the ground truth

  • Specs describe the architecture, decisions, contracts, and boundaries behind the code — the intent that the code alone does not reveal. Treat them as authoritative.
  • Reach for the spec tools first. Whenever you set out to explore the project, plan a change, investigate an area, or work with specs in any way, your first move is the spec tools (spec_grep / spec_get / spec_graph) — before grep, find, or reading source. The specs are the map; the code is the territory you confirm against it.
  • Start from the specs, not the code. To understand an area or plan a change, read the relevant specs first and use them as the map; read code second, to confirm details.
  • Check work against them. Before introducing a decision, a contract, or a boundary change, find what the specs already say and align with it. If a change contradicts a recorded decision, surface the contradiction and reconcile it — update the spec or change the approach — rather than silently diverging.
  • Keep them honest. A change that moves or blurs a boundary, or overturns a decision, updates the spec as part of the same change. Specs that drift from the code stop being ground truth.

What a spec is

  • A durable, declarative document. It states the world as it is — the intent, decisions, contracts, and boundaries behind the code — not plans, tasks, phases, or a work journey.
  • Concise and readable. It captures what is not obvious from the code; it never restates the code.
  • The bar: reading the relevant specs should be enough to understand an area and to formulate a task to improve it.

Keep specs lean

  • Explain intent, not inventory. Describe what a module is for, what it owns, and where its boundaries are — not a file-by-file transcript of its directory. The reader can see the files; the spec exists for what the files don't say.
  • Record the edges that matter. State the module's boundary (allowed / forbidden deps) and the dependency edges between its sub-modules. List a part only when its role or its edges aren't obvious from its name — e.g. a small table that carries a real dependency DAG earns its place; a table that just pairs foo.ts with "the foo tool" is noise, so say it in a sentence instead.
  • Say each thing once. A fact lives in exactly one spec; others link to it by id rather than restate it. If a paragraph is being copied between specs, move it to the spec that owns the concept and point at it. Duplicated prose drifts and turns into contradictions.
  • Prefer prose to exhaustive tables, and cut anything that only paraphrases code, filenames, or a sibling spec.

Read the full file on GitHub · 97 lines

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. 3d ago First seen · 97 lines · 97 tokens per session scan A bb74f11086c4

Subscribe to this mod's changes

spec-graph is a skill published in the GitHub repository JetBrains/thinkrail (340 stars, last pushed 3d ago), licensed Apache-2.0. It adds 97 tokens to every session and 1,417 once invoked, about $0.0005 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.

Related

Other skills, from other repositories

skill-creator

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

CreminiAI/skillpack · 64 tokens

file-a-task

File work into nohuman (taskadd) and check on it (taskstatus) via the nohuman MCP bridge, instead of doing the work inline.

no-human-ai/no_human · 37 tokens

commit

Atomic git commit with conventional message. Use when the user says "commit", "save my changes", "commit this", or wants to create a git commit. Stages specific files, writes a conventional commit message with body explaining non-obvious decisions. Never uses git add -A.

congchuanling-dot/Cohort · 59 tokens

python-run

Run and debug Python scripts in the project. Use when the user says "run python", "execute this script", "debug this py file", or wants to run/modify a .py file. Handles dependency checks, linting, execution, and error analysis.

congchuanling-dot/Cohort · 56 tokens

grix-code-review

Audit Grix diffs and pull requests for correctness, regressions, security, lifecycle safety, and cross-component contract consistency. Use when reviewing backend, Flutter frontend or admin, voicebridge, database migration, Kubernetes, protocol, agent-adapter, bug-fix, feature, or refactor changes in the Grix…

askie/grix · 70 tokens

skill-packager

Authors Agent Skills v1.0 packages (SKILL.md plus references/scripts), runs packageskill to produce a standards-compliant zip, and uses installskill to add skills from HTTPS, registry, workspace, or an uploaded archive. Use when the user wants to turn documentation, workflows, or code into a portable skill, export a…

vixues/LeAgent · 87 tokens