
Agentsmd optimize
Audits and cleans up AGENTS.md, CLAUDE.md, skills and agent definitions for coding agents
Agentsmd optimize is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 303
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Agentsmd optimize
This skill reviews the instruction files that shape a coding agent's behavior, including AGENTS.md and CLAUDE.md files, installed skills and agent definitions. It looks for conflicting rules, unnecessary approval pauses, overly broad skill triggers, duplicated guidance and references that point to missing files. Inspection is read-only by default, and edits are made only when the user authorizes them.
When changes are authorized, the skill asks for an explicit backup of original files, records paths, symlink targets and hashes, and then applies small, evidence-backed edits. It reports a readable diff and verification steps, and it separates confirmed structural facts from inferred behavioral effects. It also guides the agent to preserve managed blocks, owner preferences and approval boundaries rather than rewriting every file for consistency.
The skill ships as a folder with a single SKILL.md and a review examples reference file, and it runs no bundled scripts. It works with the file system and whatever access path the user specifies, and it does not require a particular shell, account or plugin.
When your agent uses it
Audit and organize AI coding-agent instructions, including AGENTS.md, CLAUDE.md, skills, and agent definitions. Use when the user asks to diagnose conflicting instructions, excessive approval pauses, broad skill triggers, duplicate guidance, or broken instruction references, or to clean up that instruction set. Ordinary code review, Markdown editing, or application debugging alone does not trigger this workflow. Inspection stays read-only; apply changes when authorized.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 3 files (25 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
Copy the skill folder to ~/.claude/skills/agentsmd-optimize to use it in all your projects:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/majiayu000/spellbook.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/agentsmd-optimize &&
cp -R "$tmp/skills/agentsmd-optimize" ~/.claude/skills/agentsmd-optimize &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/agentsmd-optimize inside it instead.
Copy the skill folder to ~/.agents/skills/agentsmd-optimize to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/majiayu000/spellbook.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/agentsmd-optimize &&
cp -R "$tmp/skills/agentsmd-optimize" ~/.agents/skills/agentsmd-optimize &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/agentsmd-optimize inside it instead.
Copy the skill folder to ~/.cursor/skills/agentsmd-optimize to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/majiayu000/spellbook.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/agentsmd-optimize &&
cp -R "$tmp/skills/agentsmd-optimize" ~/.cursor/skills/agentsmd-optimize &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/agentsmd-optimize inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/majiayu000/spellbook.git --path skills/agentsmd-optimizeOr copy the folder to ~/.gemini/skills/agentsmd-optimize yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/agentsmd-optimize:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/majiayu000/spellbook.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/agentsmd-optimize &&
cp -R "$tmp/skills/agentsmd-optimize" ~/.copilot/skills/agentsmd-optimize &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/agentsmd-optimize inside it instead.
Get the folder:
git clone --depth 1 https://github.com/majiayu000/spellbook.gitThen copy spellbook/skills/agentsmd-optimize into your agent's skills folder as agentsmd-optimize. Agents that support SKILL.md read one folder per skill.
What it does
- Instruction conflict detection
- Finds rules across instruction files that disagree about scope, precedence, when to ask or allowed actions.
- Approval pause review
- Spots workflows that repeatedly ask for permission the user already granted, while keeping real approval gates.
- Skill trigger precision
- Checks whether skill descriptions match the actual capability or fire on ordinary work too broadly.
- Duplicate and drift checks
- Compares same-name files and repeated guidance to find inconsistent copies without deleting intentional host differences.
- Broken reference repair
- Verifies paths and links in instructions and repairs them only with a verified source, never by substituting unrelated files.
- Backup and diff workflow
- Saves originals with hashes before edits and reports a diff with restore steps for the changed files.
Good for
- Analyze my project's AGENTS.md and CLAUDE.md for conflicting instructions without editing them
- Find skills whose descriptions trigger too broadly on ordinary coding tasks
- Remove duplicate guidance from my personal instructions while keeping my approval rules
- Fix broken file references in my agent instruction set and show me the diff
- Check which instruction and skill files are actually present and where symlinks point
Agentsmd optimize FAQ
Does Agentsmd optimize change my files when I run it?
No. Inspection is read-only, and edits are made only when the user authorizes changes. Before editing, it saves originals and records hashes and symlink targets.
Which AI clients does Agentsmd optimize cover?
It is built around AI coding-agent instruction files such as AGENTS.md, CLAUDE.md, skills and agent definitions, with checks that depend on the host's documented discovery rules.
Does Agentsmd optimize need any scripts or extra tools?
The package contains no scripts. It uses the available file system and does not require a particular shell, account, plugin or memory service.
When does Agentsmd optimize trigger?
It triggers when the user asks to diagnose conflicting instructions, excessive approval pauses, broad skill triggers, duplicate guidance or broken references, or to clean up that instruction set. Ordinary code review or Markdown editing does not trigger it.
How do I install Agentsmd optimize in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/agentsmd-optimize to use it in all your projects, or to .claude/skills/agentsmd-optimize in one project.
Does Agentsmd optimize run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Agentsmd optimize?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Agentsmd optimize?
The closest alternatives to Agentsmd optimize are Agents md improver, Agents md, Agents md, Agentsmd scaffold and Skill author.
Where this comes from
- Description: from the skill's own SKILL.md.
More from majiayu000/spellbook

Gives your agent cross-domain analogies and yes-and extensions to spark new ideas
- Open source
- 303 GitHub stars
- Productivity

Stress-tests an idea by hunting hidden assumptions, counterexamples and failure points
- Open source
- 303 GitHub stars
- Productivity

Gathers sourced facts, competitors and 2026 data on an idea without judging it
- Open source
- 303 GitHub stars
- Research workflow

Runs a three-role AI group chat that surfaces blind spots in a one-line idea
- Open source
- 303 GitHub stars
- Productivity

Coaches you from a one-line idea to a PRD and clickable HTML prototype
- Open source
- 303 GitHub stars
- Productivity

Guides an agent through mobile app UI design for iOS and Android
- Open source
- 303 GitHub stars
- Design and media




