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 skills/youdotcom-oss/dx-toolkit/optimize-agents-mdnpx skills add youdotcom-oss/dx-toolkit --skill optimize-agents-mdgit clone --depth 1 https://github.com/youdotcom-oss/dx-toolkitWrote 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/skills/youdotcom-oss/dx-toolkit/optimize-agents-md)<a href="https://agentmods.dev/skills/youdotcom-oss/dx-toolkit/optimize-agents-md"><img src="https://agentmods.dev/badge/skills/youdotcom-oss/dx-toolkit/optimize-agents-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.1 | $0.00038 | $0.00850 |
| Opus 5 | $0.00019 | $0.00425 |
| Sonnet 5 | $0.00008 | $0.00170 |
| Haiku 4.5 | $0.00004 | $0.00085 |
Grade A, and why
optimize-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 5d 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 — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Optimize AGENTS.md
Purpose
Improve AGENTS.md and scoped agent instruction files without weakening the
repo's operational contract.
Use this skill when the user asks to:
- reduce instruction bloat
- clarify confusing workflow rules
- add a lesson learned from a recent mistake
- remove stale or duplicate guidance
- reorganize agent instructions for better retrieval
- update commit, PR, validation, skill, or evidence-collection rules
Do not optimize by chasing a fixed token target. Preserve rules that encode repo-specific safety, validation, or workflow constraints even when they are verbose.
Authority
Before editing instructions, collect current evidence:
git log --oneline -20
git diff main...HEAD --stat
git log --oneline -- AGENTS.md
find .agents/skills -name 'SKILL.md' | sort
When sources conflict, use the repo hierarchy:
src/code and executable behavior- git history
AGENTS.mdby scope- docs and skills
Update stale prose rather than making code conform to stale docs.
Editing Rules
- Keep concrete rules that prevent real failures, even if they cost tokens.
- Prefer one precise rule over several overlapping reminders.
- Preserve current repo conventions: Bun-first workflow,
ghfor GitHub, conventional commits, scoped validation, directory boundaries, module naming, and skill-trigger guidance. - Remove references to retired surfaces only after verifying with
rg. - Do not introduce a public validation CLI unless it exists in the repo.
- Do not replace operational rules with generic advice agents already know.
- Do not add broad "always run everything" gates when AGENTS.md already requires area-aware validation.
Workflow
-
Identify the target scope:
- root
AGENTS.md - nested
AGENTS.md - skill-local instructions
- all of the above
- root
-
Search before changing:
rg -n "stale-term|removed-command|old-path" AGENTS.md docs skills src package.json
git log --oneline -- AGENTS.md
- Classify each candidate edit:
remove: stale, duplicated, or generic instructionmerge: repeated project-specific ruleclarify: correct rule that caused confusionadd: recent failure mode or missing project constraint
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.
- 5d ago First seen · 135 lines · 38 tokens per session scan A d51d14b71955
optimize-agents-md is a skill published in the GitHub repository youdotcom-oss/dx-toolkit (25 stars, last pushed 15d ago), licensed MIT. It adds 38 tokens to every session and 850 once invoked, about $0.0002 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-30.
Other skills, from other repositories
gameobject-component-destroy
Destroy one or more Components from a target GameObject. Missing (null) components are skipped — they cannot be destroyed. Use 'gameobject-find' and 'gameobject-component-get' to identify the components first.
unity-version-split
Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).
assets-create-folder
Create a new folder under a parent folder inside 'Assets/'. The parent path must start with 'Assets/' and every intermediate folder in it must already exist. Refreshes the AssetDatabase at the end and returns the GUID(s) of the created folder(s).
console-get-logs
Retrieve Unity Editor logs from the MCP plugin's LogCollector, optionally filtered by log type or time window. Useful for debugging and monitoring Editor activity.
assets-prefab-save
Save the currently opened prefab edit stage back to its prefab asset without exiting the stage. Pair with 'assets-prefab-open' to enter the edit mode first.
opik-diagnose
Surface the Opik traces worth a developer's attention, ranked by signal — errors, failed tool calls, latency, regressions, and low online-eval scores — plus Diagnostics issues. Reads live/production traces via the SDK (searchtraces and agentinsights) and works with no MCP; uses the MCP issue entity when connected.…