Borrowing it
Nothing to install: this file belongs to TorchedHat/torchtalk. 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/TorchedHat/torchtalk/main/AGENTS.mdgit clone --depth 1 https://github.com/TorchedHat/torchtalkWrote 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/torchedhat/torchtalk/agents-md)<a href="https://agentmods.dev/instructions/torchedhat/torchtalk/agents-md"><img src="https://agentmods.dev/badge/instructions/torchedhat/torchtalk/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/torchedhat/torchtalk/agents-md"><img src="https://agentmods.dev/badge/instructions/torchedhat/torchtalk/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.02114 | $0.02114 |
| Opus 5.5 | $0.00846 | $0.00846 |
| Sonnet 5.5 | $0.00423 | $0.00423 |
| Haiku 4.5 | $0.00211 | $0.00211 |
Grade A, and why
torchtalk 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 1mo 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 — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Instructions for any coding agent working in this repository. Claude Code,
Codex, Cursor, Gemini CLI and Copilot all read this file (see
docs/agent-setup.md for how each tool picks it up and registers the MCP
server).
What this project is
TorchTalk is an MCP server that answers structural questions about PyTorch
and PyTorch-based codebases with file and line evidence. It indexes a source
checkout once, caches the result, and exposes seven tools (get_status,
trace, search, graph, modules, tests, affected) over MCP.
Framework conventions live in TOML manifests ("harnesses"), not in code.
Commands
# Install
pip install -e ".[dev]"
# Test (what CI runs)
python -m pytest tests/ -v --cov=torchtalk --cov-report=term-missing
PYTORCH_SOURCE=/path/to/pytorch pytest tests/test_binding_detector_pytorch.py
# Lint and format (what CI runs)
ruff check src/torchtalk tests
ruff format --check src/torchtalk tests
# Harness smoke test against a real checkout
python scripts/harness_smoke.py --harness pytorch --source /path/to/pytorch
# Build the index, then serve
torchtalk index build --source /path/to/pytorch
torchtalk mcp-serve --source /path/to/pytorch
--harness <name> selects a manifest anywhere a source is indexed or served.
A repo can ship its own .torchtalk.toml to activate a harness automatically.
Project structure
src/torchtalk/
├── server.py # FastMCP app: the 7 tool definitions and run_server
├── cli.py # CLI: init, status, index, mcp-serve, snapshot, cursor-add
├── indexer.py # Index build, cache load/save, incremental update, _state
├── harness.py # ConventionManifest: TOML loading, extends, registry
├── manifests/ # Built-in harnesses: pytorch, torch-extension, vllm, torchvision
├── config.py # Source resolution (flag, env, config file, .torchtalk.toml)
├── snapshots.py # Named index snapshots: save/load/diff/export/import
├── symbols.py # Package-qualified symbol ids for cross-repo merging
├── integration_manifest.py # Strict loader for tests/integration/*.yml anchors
├── formatting.py # CompactText / Markdown response formatters
├── tools/ # Mode handlers behind each MCP tool
│ ├── ops.py # trace, search
│ ├── graph.py # graph (callers / calls / impact)
│ ├── modules.py # modules
│ ├── tests.py # tests
│ ├── affected.py # affected
│ └── common.py
└── analysis/
├── binding_detector.py # pybind11 / TORCH_LIBRARY detection (tree-sitter)
├── cpp_call_graph.py # C++ call graph extraction (libclang, parallel)
├── libclang_env.py # libclang discovery and version check
├── python_analyzer.py # Python module/class analysis (AST)
├── extractors.py # Manifest-driven registration extractors (Python AST)
├── external_refs.py # ExternalRef edges: imports into depends_on harnesses
├── affected.py # Changed C++ funcs -> impacted Python tests
├── alias_map.py # Python call -> C++ symbol aliases (native_functions.yaml)
├── backward_bridge.py # Backward ATen functions -> forward ops
├── decomp_aliases.py # @register_decomposition pairs
├── dispatch_stub_map.py # Kernel impl symbols -> ATen op
├── patterns.py # Shared constants and exclusion patterns
└── helpers.py
tests/ # pytest suite; tests/integration/*.yml are harness anchors
scripts/harness_smoke.py # Indexes a checkout and checks expected_minimums
docs/ # adding-a-framework.md, bridge-design.md, agent-setup.md
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.
- 1mo ago First seen · 166 lines · 2,114 tokens per session scan A b3d663c67070
torchtalk AGENTS.md is an instructions file published in the GitHub repository TorchedHat/torchtalk (12 stars, last pushed 28d ago), licensed MIT. It adds 2,114 tokens to every session, about $0.0085 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-10-08.
torchtalk AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| torchtalk AGENTS.mdTorchedHat/torchtalk | Instructions file | 12 | 28d ago | MIT | A | 2,114 | 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 | yesterday | 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 |