SPEC

SPEC is a command for Claude Code from JetBrains/thinkrail. It costs 0 tokens per session (1,337 once invoked), scanned A, original, Apache-2.0.

A typed contract that describes actions an application can expose in a command palette, menus, and keyboard shortcuts. It defines their names, groups, shortcuts, enabled state, and supplied action handler, but does not implement the handlers.

In plain words
What is it for?
Use it when defining invocable application commands and command groups. It helps control when actions are available, mark changes that require an online connection, and let the command palette call existing handlers.
Why use it?
A shared contract keeps the same actions discoverable and consistently gated across different parts of the application. It also prevents command definitions from taking ownership of unrelated UI, transport, or keyboard-handling code.

Command for Claude Code ✓ vendor

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: mentions subagents.

Good fit Use it when defining invocable application commands and command groups. It helps control when actions are available, mark changes that require an online connection, and let the command palette call existing handlers.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/jetbrains/thinkrail/spec
About the project

JetBrains/thinkrail is a desktop and mobile client that embeds the pi coding agent inside an interface for editing code and managing development workspaces. Developers use it to work on Git repositories through separate worktrees, a Monaco editor, terminals, Git views, specifications, and concurrent agent sessions. The catalogue entries are skills and instructions for its agent-based development workflow.

JetBrains/thinkrail · 7,763 stars · on GitHub · thinkrail.ai

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.

Clone the repo
git clone --depth 1 https://github.com/JetBrains/thinkrail

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 SPEC

README.md
[![agentmods](https://agentmods.dev/badge/commands/jetbrains/thinkrail/spec/github.svg)](https://agentmods.dev/commands/jetbrains/thinkrail/spec)
Your own site
<a href="https://agentmods.dev/commands/jetbrains/thinkrail/spec"><img src="https://agentmods.dev/badge/commands/jetbrains/thinkrail/spec/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 SPEC

Your own site · 80×15
<a href="https://agentmods.dev/commands/jetbrains/thinkrail/spec"><img src="https://agentmods.dev/badge/commands/jetbrains/thinkrail/spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,337 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.00000 $0.01337
Opus 5.5 $0.00000 $0.00535
Sonnet 5.5 $0.00000 $0.00267
Haiku 4.5 $0.00000 $0.00134

Measured 4d ago against content hash 33ede566669a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

SPEC 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 4d 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.

apps/web/src/commands/SPEC.md · 70 lines

How it starts

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

Responsibility

The typed contract an invocable app action is described with, so the search palette can list, gate and run the same actions the menus and chords run. It owns no handlers: a command's run is supplied by whoever composes the catalog, today shell.

Boundary

  • Public surface: Command, CommandGroup, CommandShortcut, COMMAND_GROUP_LABELS, isCommandEnabled, shortcutKeys.
  • Allowed deps: lib (platform family), @thinkrail/locales (the group-label MessageKeys), @remixicon/react types.
  • Forbidden: importing store, transport, panels, chat, shell or search; binding keys. A command's shortcut is display-only — the chord keeps its single owner (useGlobalHotkeys, shortcutCommands, the native menu, or a feature's own key map) and the palette calls the same handler.

Contract

  • A command exists only where it applies: the composer builds the catalog for the current context (no active workspace, no workspace commands), so run takes no arguments and re-checks nothing. mutates marks a host mutation, which isCommandEnabled refuses while offline — the transport replays pending requests on reconnect, so a mutation is never issued blind. disabledReason (already translated) lists a command that applies but cannot run right now, with the reason its owning surface shows; the offline reason wins over it.
  • title is already in the user's language: the composer builds the catalog with useT()'s translator (so the palette matches what the user reads), and COMMAND_GROUP_LABELS carries the group keys it translates the same way.
  • shortcutKeys renders macOS glyphs in the system order (⌃⌥⇧⌘) and Ctrl/Alt/Shift elsewhere.

Coverage

Every existing action, where it lives, and whether the palette runs it. "Row UI" marks actions that keep their own surface because they need a selection, an inline editor, or a confirmation the palette does not reproduce.

Command Handler Context / gate Palette
workspace.new New workspace… (Mod+N; Mod+Alt+N shown in a browser) shell NewWorkspaceDialog context project yes
workspace.openDefault Work in project folder panels/defaultWorkspace.enterDefaultWorkspace context project yes
chat.new New chat panels/openChat.startChatInTab active workspace, online yes
project.open Open project… panels/useOpenProject.pickAndOpen (dialogs mounted by shell) online yes
project.openPath Open a path on the host… panels/useOpenProject.enterHostPath online yes
project.create Start a new project… panels/useOpenProject.startNewProject (CreateProjectDialog; a setup intent starts the setup chat) a host serving project.create (v94), online yes
Reopen a recent project AddProjectMenu recents a recent path Row UI
chat.history Search chat history (Ctrl+R) shell/chordActions.openChatHistory a chat tab yes
view.show.{specs,files,review,plan} (every LayoutToolId but projects) store.requestToolView active workspace yes
view.toggleLeft/Right/Bottom (Mod+B/Mod+J/Mod+Shift+J) shell/chordActions (the functions the chords run) right/bottom need a workspace yes
settings.open and every Settings section (incl. Keyboard's double-Shift row, Extensions, MCP servers) store.openSettings(section); the native menu's Mod+, is shown where it exists protocol-gated sections only yes
Theme, extension and MCP server switches their Settings sections — the palette opens them, never flips them in place — Settings
workspace.markRead / markUnread panels/workspaceActions supportsWorkspaceReadState + selectWorkspaceReadAction yes
workspace.settle / unsettle panels/workspaceActions canSettleWorkspace; Settle disabled while an agent works or a chat needs you (selectWorkspaceSettleBlocked), as in the tree yes
workspace.reveal, workspace.copyPath, workspace.openIn.<editor> panels/workspaceActions, lib.copyText active workspace yes
terminal.new New terminal store.addTerminal active workspace, online (placement reserves on the host) yes
Remove workspace, close project, stop trusting, layout apply/reset, clear review, MCP approve/remove, stop all subagents, delete template their confirm dialogs confirmation Row UI
Publish / push / open, mark ready, merge, reopen a pull request, delete the remote branch, hand checks or a diverged branch to the agent shell/locationBar topbar review card branch status + GitHub facts Row UI
Rename workspace/project/chat inline editors an inline editor Row UI
Split/move/fold tabs and groups, focus adjacent group Workbench internals a tab or group Row UI
/compact, /model, effort, Stop, resources inspector, PR flows, plan review, review fixes lazy ChatView, PlanPane, ChangesReviewPane a mounted surface Row UI
Open/revert a file or hunk, review comment actions selection surfaces a selection Row UI

Read the full file on GitHub · 70 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. 4d ago First seen · 70 lines · 0 tokens per session scan A 33ede566669a

Subscribe to this mod's changes

SPEC is a command published in the GitHub repository JetBrains/thinkrail (7,763 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,337 tokens. 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-11-02.

Related

SPEC compared with commands from other repositories

SPEC next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
SPECJetBrains/thinkrailCommand7.8kyesterdayApache-2.0A0Claude Code
test-featureLykhoyda/rn-dev-agentCommand2012d agoMITA30Claude Code
nav-graphLykhoyda/rn-dev-agentCommand2012d agoMITA21Claude Code
check-envLykhoyda/rn-dev-agentCommand2012d agoMITA21Claude Code
run-workflowLykhoyda/rn-dev-agentCommand2012d agoMITA49Claude Code
observeLykhoyda/rn-dev-agentCommand2012d agoMITA21Claude Code
rn-feature-devLykhoyda/rn-dev-agentCommand2012d agoMITA26Claude Code