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.
Borrowing it
Nothing to install: this file belongs to JetBrains/thinkrail. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/JetBrains/thinkrail/main/AGENTS.mdgit clone --depth 1 https://github.com/JetBrains/thinkrailWrote 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.
[](https://agentmods.dev/instructions/jetbrains/thinkrail/agents-md)<a href="https://agentmods.dev/instructions/jetbrains/thinkrail/agents-md"><img src="https://agentmods.dev/badge/instructions/jetbrains/thinkrail/agents-md/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.
<a href="https://agentmods.dev/instructions/jetbrains/thinkrail/agents-md"><img src="https://agentmods.dev/badge/instructions/jetbrains/thinkrail/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02153 | $0.02153 |
| Opus 5.5 | $0.00861 | $0.00861 |
| Sonnet 5.5 | $0.00431 | $0.00431 |
| Haiku 4.5 | $0.00215 | $0.00215 |
Grade A, and why
thinkrail AGENTS.md 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 14d 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.
How it starts
The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ThinkRail
The agentic IDE that gets better every time you use it, built around the pi coding agent. The app is
a thin host that runs pi and bridges it to a rich UI; pi owns models, skills, compaction, cost, and
session state.
Read context proportionally
- Use
goal-and-requirements.mdfor the product's goal, principles, capabilities, and non-goals. - Use
architecture.mdfor system topology, cross-module decisions, and repo-wide invariants. - For a pi upgrade or a host workaround around pi, read
pi-compatibility.md: verify every applicable removal gate against the installed SDK, update the registry, and report what was removed or retained. - Read the owning
SPEC.mdwhen work is governed by or may alter a module boundary, contract, invariant, documented behavior, or architecture decision. - Localized work does not require unrelated specs or a full repository map.
Module structure and boundaries
Clear, fractal module boundaries are a top-priority requirement:
- Every package and meaningful directory-level sub-module has a
SPEC.mdstating its responsibility, public surface, allowed dependencies, and forbidden reaches. - A sub-module exposes an
index.tsbarrel as its only public surface; siblings import through the barrel, never internals. Per-file imports remain only where a barrel would defeat code-splitting or a library convention, such asapps/web/src/panelsandpackages/ui. - Dependency edges between sibling sub-modules live in the parent module's
SPEC.md, not each leaf. - A change that moves or blurs a boundary updates the owning spec first. Cover public surfaces and boundary rules with tests where practical, but do not manufacture coverage for a localized change.
Engine and architecture
- Run
piin-process through@earendil-works/pi-coding-agent(createAgentSession), never as a subprocess and never through a second agent runtime. Fatal provider/agent faults can take down the host; that lack of crash isolation is accepted. - The three rings are engine host (
packages/server+packages/shared), typed wire (packages/contracts), and independently shippable UI (apps/web).apps/cliandapps/desktopare thin launchers over the same host. - Use only the
@earendil-works/*package scope.@mariozechner/*is deprecated.
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.
- 14d ago Changed · +5 lines · +102 tokens per session b56675347cb8
- 15d ago Changed · +2 lines · +43 tokens per session 534ac1d86809
- 16d ago Changed · +1 lines · +13 tokens per session 3af3ff80eef2
- 23d ago Changed · +2 lines · +44 tokens per session d061964f5c18
- 26d ago Changed · +1 lines · +33 tokens per session ddc58a2a3e8f
- 29d ago Changed · +7 lines · +129 tokens per session f3fd89e861d7
- 1mo ago Changed · +1 lines · +32 tokens per session 22be7c133417
- 1mo ago Changed · +1 lines · +6 tokens per session 542882acebb9
- 1mo ago Changed · +5 tokens per session cbafbd8a9e78
- 1mo ago First seen · 126 lines · 1,746 tokens per session scan A 02757f133eb6
thinkrail AGENTS.md is an instructions file published in the GitHub repository JetBrains/thinkrail (7,763 stars, last pushed yesterday), licensed Apache-2.0. It adds 2,153 tokens to every session, about $0.0086 per session on Opus 5.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.
thinkrail AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| thinkrail AGENTS.mdJetBrains/thinkrail | Instructions file | 7.8k | yesterday | Apache-2.0 | A | 2,153 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |