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.
npx agentmods add instructions/binpash/trai/claude-mdgit clone --depth 1 https://github.com/binpash/traiWrote 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/binpash/trai/claude-md)<a href="https://agentmods.dev/instructions/binpash/trai/claude-md"><img src="https://agentmods.dev/badge/instructions/binpash/trai/claude-md.svg" alt="Measured on agentmods" 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 | $0.02387 | $0.02387 |
| Opus 5 | $0.01193 | $0.01193 |
| Sonnet 5 | $0.00477 | $0.00477 |
| Haiku 4.5 | $0.00239 | $0.00239 |
Grade D, and why
trai CLAUDE.md scanned grade D with 3 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- **Do NOT** modify the user's `~/.claude/settings.json`. Plugin state lives in `${CLAUDE_PLUGIN_DATA}` only. Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
- **Do NOT** delete or rewrite an overlay dir without user confirmation. Programmatic `rm -rf` on `$XDG_STATE_HOME/trai/sessions/*` without the `--yes` interaction is a data-loss event. (Wiping `overlay/temproot/` conten Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
3. **Plugin-only distribution.** Installed via `/plugin marketplace add <git-url>`. No curl-pipe-sh, no wrapper binary. How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
trai — repo context
This repo is a Claude Code plugin that sandboxes each Bash tool call through binpash/try so the user can review the accumulated filesystem diff after Claude finishes and choose to commit or discard.
Scope decisions (locked; see docs/claude/design-notes.md for why)
- Per-Bash hook, not outer wrapper.
PreToolUse(Bash)rewrites eachBash(x)→Bash(try -D $overlay 'x')— passing the full command as a single arg (notbash -c '...') becausetryinternals doecho "$@"which collapses multi-args.-Dimplies-n. - Edit / Write / MultiEdit are NOT sandboxed. They write through Node directly; hooks can't intercept them. Users rely on git for that half.
- Plugin-only distribution. Installed via
/plugin marketplace add <git-url>. No curl-pipe-sh, no wrapper binary. - All-or-nothing commit in v1.
/trai:commitor/trai:discard --yes. Partial commits defer togit add -ppost-commit. - Linux-only. Doctor refuses to start on macOS/Windows.
- Shared overlay per session. One
-Ddir across all Bash calls so state accumulates.pre-bash.shpre-cleanstemproot/before each call because upstreamtry's validity check (sandbox_valid_or_empty) refuses sandboxes with non-directory entries intemproot/. git/sudo/docker/ read-only commands are passthrough (not wrapped).- No default network isolation (
-xnot passed). Claude needs the API. - Plugin-internal scripts self-exempt. Any command starting with
$CLAUDE_PLUGIN_ROOT/is passthrough. Required so/trai:doctorsees the real host,/trai:passthroughwrites its token to the real FS, etc. SessionStartis idempotent. Claude Code fires it on startup,/clear,/compact,/resume, and auto-compact.session-start.shreuses an existing overlay if one is live; otherwise creates a fresh one.
Load-bearing files
hooks/pre-bash.sh— the rewriter. Reads Claude'sPreToolUseJSON on stdin, emits{hookSpecificOutput.updatedInput.command}with thetry-wrapped command. If you break this, nothing is sandboxed.hooks/session-start.sh— creates the overlay dir, writes$XDG_STATE_HOME/trai/current-session, runsscripts/doctor.shin quiet mode. If doctor fails, writes emptycurrent-sessionso the pre-bash hook self-disables.hooks/session-end.sh— prints a reminder banner if the overlay is uncommitted.scripts/doctor.sh— kernel /unprivileged_userns_clone/try-installed /unshare/ FS-type preflight. Single source of truth for "is this environment compatible."scripts/is-passthrough.sh— matches a command against the passthrough patterns fromconfig/defaults.json. Called frompre-bash.sh.config/defaults.json— default passthrough + ignore patterns. Users override via$CLAUDE_PLUGIN_DATA/config.json..claude-plugin/plugin.json— plugin manifest..claude-plugin/marketplace.json— single-plugin marketplace so/plugin marketplace add <git-url>works.commands/*.md— seven slash commands (/trai:diff,/trai:commit,/trai:discard,/trai:explore,/trai:status,/trai:doctor,/trai:passthrough).
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.
- 3d ago First seen · 80 lines · 2,387 tokens per session scan D b19377bfae20
trai CLAUDE.md is an instructions file published in the GitHub repository binpash/trai (5 stars, last pushed 3mo ago), licensed MIT. It adds 2,387 tokens to every session, about $0.0119 per session on Opus 5. A static security scan graded it D with 3 findings (reads agent configuration directories, recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.