Borrowing it
Nothing to install: this file belongs to ston-fi/ton-rs. 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/ston-fi/ton-rs/main/AGENTS.mdgit clone --depth 1 https://github.com/ston-fi/ton-rsWrote 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/ston-fi/ton-rs/agents-md)<a href="https://agentmods.dev/instructions/ston-fi/ton-rs/agents-md"><img src="https://agentmods.dev/badge/instructions/ston-fi/ton-rs/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/ston-fi/ton-rs/agents-md"><img src="https://agentmods.dev/badge/instructions/ston-fi/ton-rs/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.01926 | $0.01926 |
| Opus 5.5 | $0.00770 | $0.00770 |
| Sonnet 5.5 | $0.00385 | $0.00385 |
| Haiku 4.5 | $0.00193 | $0.00193 |
Grade A, and why
ton-rs 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 9d 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 — 157 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ton-rs agent guide
Using ton-rs from another project
Before writing a custom codec, adapter, get-method wrapper, or wallet helper, check the capability map below and read the relevant crate guide. Prefer the existing implementation when its wire format and behavior match the task; explain the missing capability before introducing a replacement.
Use the dependency version/revision resolved by the consuming project's
Cargo.lock, not an arbitrary checkout or the latest online documentation.
cargo metadata --format-version 1 in that project exposes each resolved
package's manifest_path; read AGENTS.md beside the relevant manifest and
inspect its src/ and tests. Crate guides are included in published packages.
Paths in each crate guide are relative to that crate unless stated otherwise.
Do not assume dependency instructions are loaded automatically. In the consuming
project's agent instructions, explicitly ask agents to read the resolved
ton_core, ton_macros, and (when used) ton/ton_ledger guides. This repository's
CLAUDE.md imports this guide so the shared entry point stays in one place.
Repository maintenance commands below apply when changing ton-rs; downstream
work should run the consuming project's checks and deterministic wire fixtures.
| Task | Reuse first | Details |
|---|---|---|
| Typed cells, opcodes, fixed-width fields, strict cell parsing | TLB derive; prefix, bits_len, adapter, ensure_empty |
Macro options |
| Required internal or nullable Tolk addresses | InternalAddress, NullableAddress; raw MsgAddress for other wire variants |
Core recipes |
| Maybe, referenced or either payloads, coin/variable lengths | Option<T>, TLBRef, TLBEither, TLBEitherRef, TLBCoins, VarLenBits/VarLenBytes |
Core recipes |
| TON dictionaries in Rust maps | TLBHashMapE/TLBHashMap with existing key/value adapters |
Dictionary recipe |
| Typed TVM results and get methods | FromTVMStack, ton_methods, ton_contract! |
Macro options, contract helpers |
| Standard messages, Jetton/NFT/SBT contracts, metadata | block_tlb, contracts::tep, SnakeData, MetaLoader |
ton guide |
| Provider integration without native tonlib | StateProvider, EmulationProvider, ContractClient::builder(...) |
ton guide |
| Software or hardware wallet signing | TonWallet or TonLedgerWallet::builder(...) |
Wallet guide, Ledger guide |
| JSON address/hash encodings | ton_core::serde field adapters, behind serde |
Core recipes |
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.
- 9d ago Changed · +5 lines · +71 tokens per session 3f84ad59b9e1
- 10d ago Changed · +33 lines · +702 tokens per session f1577e6c22a5
- 1mo ago Changed · +27 lines · +389 tokens per session 90ce99173f56
- 2mo ago First seen · 92 lines · 764 tokens per session scan A 83cf69ba1090
ton-rs AGENTS.md is an instructions file published in the GitHub repository ston-fi/ton-rs (175 stars, last pushed 8d ago), licensed Apache-2.0. It adds 1,926 tokens to every session, about $0.0077 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.
ton-rs AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ton-rs AGENTS.mdston-fi/ton-rs | Instructions file | 175 | 8d ago | Apache-2.0 | A | 1,926 | 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 |