Skip to content

Guide · Agent skill

How to use the Spec Graph agent skill: setup and examples

Updated · written with AI from the project's own documentation and checked against our catalogue data

The spec-graph skill is an instruction package for an AI agent that treats a project's specification documents as the authoritative record of its architecture, decisions, contracts and boundaries. This guide explains what the skill changes about the agent's behaviour, how to install it, how to trigger it and what it needs to work. After reading it you will be able to install the skill, ask for work that uses it, and know what to check when it does not behave as expected.

Spec GraphJetBrains/thinkrail · Apache-2.0

Quick start

  1. 1Download the ZIP. Download the spec-graph ZIP from this page.
  2. 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder for one repository.
  3. 3Or upload in the Claude apps. Alternatively, go to Settings → Capabilities → Skills in the Claude apps and upload the ZIP.
  4. 4Confirm the spec tools exist. Make sure the ThinkRail spec tools spec_grep, spec_get, spec_graph, spec_create, spec_update, spec_delete and spec_validate are available to the agent.
  5. 5Make a request that involves a boundary or decision. Describe the work in terms of a spec, boundary, contract or architecture decision so the skill is selected.
  6. 6Review contradictions and spec updates. Check any contradiction the agent reports and the spec updates it proposes, then run spec_validate after structural changes.

What the spec-graph skill makes the agent do

An agent skill is a set of instructions that an AI agent loads when a task matches the skill's description. The spec-graph skill applies when work involves locating, reading, creating, updating or validating project specs, or when a change may alter a documented boundary, contract, invariant, behavior or architecture decision.

In that situation the skill tells the agent to look up the owning spec first, align its work with the decisions recorded there, and surface any contradiction instead of silently diverging. When a change does move a boundary or overturn a decision, the agent is told to update the spec in the same change so the specs do not drift from the code.

  • Consults the relevant spec before changing a documented boundary or decision.
  • Flags contradictions between a requested change and a recorded decision.
  • Keeps specs current, including their status field, when a change alters them.
  • Uses spec tools to search, read, create, update, delete and validate specs and their links.

Install the spec-graph skill

You can install the skill in one of two ways. The first is to download the ZIP from this page and unzip it into a skills folder. Use ~/.claude/skills/ to make it available to all your projects, or the .claude/skills/ folder inside a single project to share it with that repository.

The second is to upload the ZIP in the Claude apps. Open Settings, go to Capabilities, then Skills, and upload the file there.

The skill package contains one file, SKILL.md, so after unzipping you should see a spec-graph folder containing that file.

  • Option A: download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use.
  • Option B: unzip it into a project's .claude/skills/ folder to apply it to that repository.
  • Option C: in the Claude apps, go to Settings → Capabilities → Skills and upload the ZIP.

Check the requirements before you rely on it

The skill assumes that the ThinkRail spec tools exist and that the repository contains spec documents. Without them the skill is not useful on its own. A spec is a markdown file whose frontmatter carries an id and a type, so the repository needs files like that, typically named SPEC.md and placed beside the module they describe.

The skill expects these tools: spec_grep, spec_get, spec_graph, spec_create, spec_update, spec_delete and spec_validate. It runs no scripts and uses no network access, according to its listing.

  • ThinkRail spec tools: spec_grep, spec_get, spec_graph, spec_create, spec_update, spec_delete, spec_validate.
  • A repository containing spec documents with frontmatter that includes id and type.
  • The skill runs no scripts and uses no network access.

How to trigger the skill with natural requests

You do not need a special command. The skill is selected when your request matches its description, so describe the work in terms of specs, decisions and boundaries. Requests that name a boundary, a contract or an architecture decision are the most likely to load it.

For a localized fix or a quick explanation, the skill tells the agent to keep lookup minimal and read only the files it needs. If you want the spec consulted, say so explicitly.

  • Check whether this change respects the spec for the auth module before you edit it.
  • Find the spec that records why we chose a queue over direct database writes.
  • Update the spec for the billing package, since we are moving the boundary to the new service.
  • Validate the spec graph after we restructured these modules.

Example workflow: a change that moves a boundary

Suppose you ask the agent to move a module's dependency across a boundary the specs define. With the skill active, the agent follows the working order the skill sets out: orient from the module using the graph and metadata tools, read the relevant spec bodies, align the change with the recorded decisions, and surface any conflict before continuing.

If the change is accepted, the agent updates the affected spec frontmatter with spec_update, edits the prose with the normal edit tool, adds a spec_create record for any new module, and runs spec_validate to catch dangling links, duplicate ids or parent cycles.

  • Orient: spec_graph for the neighbourhood, spec_get for metadata, read for the body.
  • Align: reconcile the change with recorded decisions and contracts.
  • Update: spec_update for frontmatter including status, edit for prose, spec_create for new modules.
  • Check: run spec_validate after structural changes.

Tips for getting good results

The skill works best when the specs are short and honest. It explains that specs should capture intent and the edges that matter, not a file-by-file inventory, and that each fact should live in one spec with others linking to it by id. Keeping status current helps the agent judge whether a spec is in force, drifting or finished.

Keep requests proportional. Asking for a large architectural review will load more specs than a one-line fix needs, and the skill itself warns that reading unrelated specs adds noise.

  • Keep the status field current: draft, active, stale, done or deprecated.
  • Use spec_validate after moving or renaming specs.
  • Ask for a narrow check when you only need one area reviewed.

What people use it for

  • Checking that a change to a module respects the boundary its SPEC.md records.
  • Finding the recorded decision behind a design choice before proposing a different approach.
  • Updating a spec in the same change that moves a boundary or contract.
  • Validating the spec graph for dangling links, duplicate ids or parent cycles after restructuring.

Frequently asked questions

What is the spec-graph agent skill?

It is an instruction package for an AI agent that treats project spec documents as the authoritative record of architecture, decisions, contracts and boundaries. The agent consults the relevant spec before changing those areas and flags contradictions. It also keeps specs updated when a change alters them.

What do I need to use the spec-graph skill?

You need the ThinkRail spec tools (spec_grep, spec_get, spec_graph, spec_create, spec_update, spec_delete and spec_validate) and a repository containing spec documents whose frontmatter includes id and type. The skill is not useful on a project without these.

Where do I install the spec-graph skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. You can also upload the ZIP in the Claude apps under Settings → Capabilities → Skills.

Does the spec-graph skill run scripts or use the network?

According to its listing, it runs no scripts and uses no network access. It ships as a single SKILL.md file.

Is the spec-graph skill free?

The skill is licensed under Apache-2.0. This page does not state any price, so check the repository for the licence terms that apply to you.

When should I not use the spec-graph skill?

Skip it for projects without spec documents or the spec tools, and for quick one-off scripts or localized fixes. The skill itself says lookup should stay minimal in those cases, because reading unrelated specs adds noise.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

The spec-graph skill suits engineering teams that already keep architecture in SPEC.md-style documents and want agents to respect recorded decisions and update specs alongside code changes. It is a poor fit for projects with no specs or no ThinkRail spec tools, and for small one-off fixes where it adds lookup without benefit.

Download the skill