Borrowing it
Nothing to install: this file belongs to Thru-Echoes/TRACE. 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/Thru-Echoes/TRACE/main/CLAUDE.mdgit clone --depth 1 https://github.com/Thru-Echoes/TRACEWrote 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/thru-echoes/trace/claude-md)<a href="https://agentmods.dev/instructions/thru-echoes/trace/claude-md"><img src="https://agentmods.dev/badge/instructions/thru-echoes/trace/claude-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/thru-echoes/trace/claude-md"><img src="https://agentmods.dev/badge/instructions/thru-echoes/trace/claude-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.03738 | $0.03738 |
| Opus 5.5 | $0.01495 | $0.01495 |
| Sonnet 5.5 | $0.00748 | $0.00748 |
| Haiku 4.5 | $0.00374 | $0.00374 |
Grade A, and why
TRACE CLAUDE.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 23d 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 — 244 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TRACE — Project Instructions
Full documentation: README.md (architecture, tools, configuration, changelog) Orientation: docs/ONBOARDING.md (dev + user onboarding) · docs/WHAT-IS-TRACE.md (non-technical explainer) Formal specification: docs/specification.md Version: 0.5.2.dev0 (package, unreleased; latest release 0.5.1) · protocol/schema v0.5.1 TRACE project name: "trace-mcp" (canonical project key:
trace-mcp)
Development
uv pip install -e ".[dev]" # Install with dev dependencies
uv run pytest # Run full test suite (1240+ tests)
uv run pytest tests/test_invariants.py # Invariant-registry guard (docs/INVARIANTS.md) — fast
uv run pytest -k llm # Run real LLM integration tests
uv run ruff check src/ # Lint
uv run pyright src/ # Type check
python scripts/generate_schema.py # Regenerate JSON Schema from Pydantic models
uv build && uv run pytest tests/test_packaging_artifacts.py # Verify the shipped wheel/sdist before tagging
trace-mcp identity check # Report project-identity drift (non-zero exit on findings)
trace-mcp doctor [DIR] [--live] # Report deployed-state drift for one project (non-zero exit on findings)
trace-mcp fleet-check [ROOTS...] # Same check across every TRACE project under the given roots
Two console scripts ship with the package: trace-mcp (the MCP server) and
trace-mcp-init (writes .mcp.json, the TRACE_PROJECT pin, and host adapter
assets into a consumer project). trace-mcp identity dispatches to the
migration tooling (snapshot, scan, apply, check, merge-stores,
adopt, bundle) — see docs/adr/006-project-identity-and-isolation.md.
Key Patterns
- Pydantic v2 for all data models:
model_dump(),model_validate(),model_rebuild() - Forward refs across files: Import both models in
schema/__init__.py, callmodel_rebuild()after - All modules import
Sessionfromtrace_mcp.schema(not.schema.session) to trigger rebuild from datetime import UTC(nottimezone.utc) — ruff UP017- MCPServer (mcp 2.x)
@mcp.tool()needs parentheses asyncio_mode = "auto"in pytest config for async tests- Atomic writes (temp file +
os.replace) for all JSON writes — nofcntldependency (cross-platform) - Session writes go through
storage.locked.locked_disk_session— the single fail-closed, disk-truth read-modify-write path (INV-1,docs/INVARIANTS.md). Never hand-roll a lock block; never let a write proceed on a lock timeout. - Fail closed on integrity primitives: the per-session lock raises
TimeoutErrorrather than writing unlocked; stale-lock theft is gated on holder-PID liveness. A missed lock must be visible, not silent. - Read aggregates skip-and-report:
project_summary/health_checkcatch per-sessionValidationError/JSONDecodeErrorand surface askipped_sessionslist rather than aborting the whole aggregate. - Schema models preserve unknown fields (
extra="allow"via theTraceModelbase) for forward-compat;Environmentis the one closed exception (legacytrace_versiondrop). - A project is identified by its canonical key, never by its free-text label —
metadata.project_keyis authoritative when present; a document without one resolves through the alias registry (~/.trace/projects.json).projectstays an unconstrained display label. All matching and filtering goes throughproject_identity(INV-4, INV-9); never compare labels directly. - Label repair is alias-table-first — a mislabelled project is fixed by adding an alias, never by rewriting a capture record.
autoandsharedare reserved keys. - Cross-project reads and writes fail closed when the server is pinned via
TRACE_PROJECT;TRACE_REQUIRE_PINadditionally refuses both session-creation paths on an unpinned process. server.pyimports__version__fromtrace_mcpfor startup log- Per-project OpenAI key: the key lives in the project's own
.env, which overrides the machine-global~/.trace/.env(an exported env var still wins over both).TRACE_LOCAL_ONLYis the one exception — a restrict-only ratchet ORed across sources, so no project can switch a machine-wide kill switch off. Config is read once at server start; a.envedit needs a server restart. - A missing or refused key is loud: reported in the
trace_start_sessionbanner and in the affectedtrace_learn_*responses, and a provider 401/403 raisesApiKeyRejectedErrorregardless ofTRACE_STRICT_LLM. A backend that cannot be built degrades to keyword matching with a notice rather than failing registration — an unregistered extension is indistinguishable from an uninstalled one. - Line length: 120 (ruff configured)
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.
- 23d ago Changed · +2 lines · +43 tokens per session ab3e915909ce
- 1mo ago Changed · +9 lines · +113 tokens per session 7ee91d03c858
- 1mo ago Changed · +14 tokens per session 21f554a34b62
- 1mo ago Changed · +14 lines · +257 tokens per session 16ca3c15c998
- 1mo ago Changed · +1 lines · +7 tokens per session b78057fca61c
- 1mo ago First seen · 218 lines · 3,304 tokens per session scan A 8c2554716991
TRACE CLAUDE.md is an instructions file published in the GitHub repository Thru-Echoes/TRACE (25 stars, last pushed 15d ago), licensed Apache-2.0. It adds 3,738 tokens to every session, about $0.0150 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.
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).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
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 copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.