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/trick77/agents-md-sync/agents-mdgit clone --depth 1 https://github.com/trick77/agents-md-syncWhat 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.01028 | $0.01028 |
| Opus 5 | $0.00514 | $0.00514 |
| Sonnet 5 | $0.00206 | $0.00206 |
| Haiku 4.5 | $0.00103 | $0.00103 |
Grade A, and why
agents-md-sync 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 2d 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 — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Instructions — agents-md-sync
Instructions for AI coding agents working on this repository. For what the tool itself does, see README.md.
Project
Node/TypeScript CLI that composes an AGENTS.md from markdown fragments held in a central Bitbucket template repo, commits and pushes the result to a tool-owned branch on each target Bitbucket Data Center repo, and — when --pr is passed — opens or updates a pull request for that branch. Greenfield — currently only README and this file exist.
Stack
- Language: TypeScript, Node 20+
- Runner:
tsxfor dev,tscfor build - CLI:
commander - Validation:
zod - HTTP:
undici(or built-infetch) - Tests:
vitest
Coding
- TypeScript strict mode. No
anywithout a written reason. - Prefer small, pure functions. Keep I/O (Bitbucket API, fs) at the edges; keep composition logic pure so it can be unit-tested without network.
- No comments that restate the code. Only comment non-obvious why.
- Use Node's built-in
fetchunless a specificundicifeature is needed. - Do NOT introduce a heavy templating engine. Include markers are
<!-- include: NAME.md -->and are resolved by simple string replacement. - Fragment resolution is profile-aware:
profiles/<profile>/NAME.mdwins overcommon/NAME.md. Keepcompose.tspure and test both paths. - The default
AGENTS.md.tmplskeleton lives as aDEFAULT_SKELETONconstant insrc/templateLoader.ts. A profile can opt into a bespoke skeleton by droppingAGENTS.md.tmplinto its directory; absent that file, the default is used. - v1 allows exactly ONE profile per target. Multi-profile (polyglot) support is out of scope. Do not add it without a design discussion.
Testing
- Unit tests go in
tests/and mirrorsrc/layout. src/compose.tsMUST be covered by unit tests — it is the only pure-logic module and the heart of the tool.- Network-touching code (
src/bitbucket.ts,src/sync.ts) is tested via mockedfetchor integration tests against a sandbox repo, never against real production Bitbucket repos. - Run tests with
npm test(vitest). Every PR must pass tests locally before opening. - Sample outputs are golden fixtures.
examples/sample-output-<profile>.mdis re-rendered on every build and test run by composing each profile inexamples/template-repo/profiles/againstexamples/template-repo/common/.npm run buildandnpm testboth invoke the render step. If a profile fragment changes, the sample file must be updated in the same commit. CI fails if committed samples drift from whatcompose.tsproduces.
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.
- 2d ago First seen · 65 lines · 1,028 tokens per session scan A 9722adb20ddd
agents-md-sync AGENTS.md is an instructions file published in the GitHub repository trick77/agents-md-sync (2 stars, last pushed 7d ago), licensed MIT. It adds 1,028 tokens to every session, about $0.0051 per session on Opus 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-31.
Other instructions, from other repositories
agentsmd AGENTS.md
AGENTS.md instructions for youwei792/agentsmd, covering agents.md, commands, build, testing and lint & static analysis.
agentsmd AGENTS.md
AGENTS.md instructions for daichunghy/agentsmd, covering agents.md, setup, build, test and conventions.
agentsmd CLAUDE.md
Claude Code instructions for youwei792/agentsmd, a project described as: CI for your AI agent's instructions — generate a grounded AGENTS.md, validate every command it references, audit token cost, bridge CLAUDE.md. Zero-dependency Go CLI.
cc-agents-md CLAUDE.md
Claude Code instructions for GeiserX/cc-agents-md, covering claude.md — cc-agents-md, tech stack, development, install dependencies and run tests.
agentsmd GEMINI.md
Gemini CLI instructions for youwei792/agentsmd, a project described as: CI for your AI agent's instructions — generate a grounded AGENTS.md, validate every command it references, audit token cost, bridge CLAUDE.md. Zero-dependency Go CLI.
ruleblast AGENTS.md
Instructions for Kpoiut/ruleblast, covering ruleblast repository instructions, evidence before confidence, change discipline and before a commit.