optimize-agent-instructions

A tool for improving persistent instructions that guide coding agents, such as CLAUDE.md or AGENTS.md files. It makes those instructions shorter, clearer, and easier to follow.

In plain words
What is it for?
Use it to review, clean up, and improve project-specific agent instructions. It is for instruction files, not ordinary documentation or code reviews.
Why use it?
It helps prevent agents from overlooking vague, repetitive, or unreliable project guidance on future tasks.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/benthamite/dotfiles/optimize-agent-instructions
Any agent
npx skills add benthamite/dotfiles --skill optimize-agent-instructions
Clone the repo
git clone --depth 1 https://github.com/benthamite/dotfiles

Made for: Claude Code, Codex.

Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,804 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00052 $0.02804
Opus 5 $0.00026 $0.01402
Sonnet 5 $0.00010 $0.00561
Haiku 4.5 $0.00005 $0.00280

Measured 2d ago against content hash a651912b3cf3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

optimize-agent-instructions 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.

.claude/skills/optimize-agent-instructions/SKILL.md · 191 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

Changes

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.

  1. 2d ago First seen · 191 lines · 52 tokens per session scan A a651912b3cf3

Subscribe to this mod's changes

optimize-agent-instructions is a skill published in the GitHub repository benthamite/dotfiles (11 stars, last pushed 1mo ago), with no licence file. It adds 52 tokens to every session and 2,804 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

autopilot-batch

Fan out a batch of autopilot-queued issues to parallel background worktree subagents — each runs /autopilot at the build model from its 'model:' label — with a gating review at Opus 5 or above and never below the build (Opus reviews Sonnet and Opus builds, Fable reviews Fable builds).

joshukraine/dotfiles · 75 tokens

vibe

Delegate a coding task to a cheap AI model (Mistral Vibe by default, but any provider Vibe knows about — DeepSeek, Gemini Flash, etc.) and supervise the result via git diff. Claude orchestrates, the cheap model codes. Claude consumes 500-1500 tokens per delegation regardless of how many file reads the delegate does…

sebastienrousseau/dotfiles · 137 tokens

handoff

Compact the current conversation into a handoff document for another agent to pick up.

GrimLink/dotfiles · 19 tokens

skill-finder

Find high-quality Claude Code skills for a topic by spawning parallel subagents that audit each candidate's AUTHOR (not the SKILL.md text, which is gameable in five minutes by a slop generator). Use whenever the user asks to find, search for, recommend, or pick a skill for a topic - phrases like "find me a skill for…

pkarpovich/environment · 192 tokens

agent-builder

Build multi-step LLM agents for the Continuum system. Use when creating agent definitions with nodes, edges, tools, and execution flows. Triggers on requests to "create an agent", "build a workflow", "design an agent graph", or when discussing Continuum agent architecture. Supports parallel execution, conditional…

pkarpovich/environment · 74 tokens

skill-audit

Audit one or more Claude Code skills against best practices and report violations. A Python script runs mechanical checks (1024-char description limit, name format and dir match, frontmatter required fields, body 500-line target, ASCII hyphens, bilingual trigger padding, reference-file ToC, allowed-tools syntax). The…

pkarpovich/environment · 172 tokens