mcpbeat Sign in

Refactor Agents MD Skill for Codex

Use when refactoring a user-level or project-level AGENTS.md for progressive disclosure

874 tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
123
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/vinta/hal-9000 --skill refactor-agents-md

What comes with it

255 bytes besides the instruction
agents/openai.yaml

The instruction itself

2 sections, as written by the author

Refactor AGENTS.md

Refactor an AGENTS.md toward progressive disclosure. Every retained line enters each Codex session in its scope, so it must earn that attention. Move narrower guidance to the closest applicable scope or a reusable skill, and remove instructions that do not change behavior.

Instructions

  • Pick the target. Use a target named by the invocation. Otherwise ask the user to choose among the files that exist:
  • The user-level file at $CODEX_HOME/AGENTS.md, defaulting to ~/.codex/AGENTS.md when CODEX_HOME is unset.
  • The current project's root AGENTS.md.
  • Any nested AGENTS.md on the path from the project root to the current working directory.
  • Fetch the yardsticks. Fetch these pages to calibrate the audit:
  • https://developers.openai.com/api/docs/guides/latest-model?model=gpt-5.6
  • https://developers.openai.com/api/docs/guides/prompt-guidance-gpt-5p6
  • https://www.aihero.dev/a-complete-guide-to-agents-md
  • Audit. Read the target and applicable broader AGENTS.md files. Give every instruction in the target exactly one verdict against the target's bar below. Finish only when every instruction has a verdict.
  • contradiction: conflicts with another applicable instruction. Record both instructions and their source files.
  • delete: fails the no-op test because Codex would behave the same without it. This includes default behavior, vague directions, and platitudes such as "write clean code."
  • demote: changes behavior but applies only to a narrower directory or task. Choose and name its destination. Put directory-specific guidance in the closest nested AGENTS.md; put a multi-step task workflow in a skill; put reference material in a linked document.
  • rewrite: has the right scope and meaning, but its phrasing falls short of the fetched prompting guidance.
  • keep: earns its always-loaded cost as written.

Apply the bar for the target:

  • User-level: a keep must apply across all projects. Demote project or directory guidance to the applicable project's AGENTS.md, and task workflows to skills.
  • Project or nested: a keep must apply to every task and file in the target directory's subtree and be underivable from the repository. Keep concise project context, commands Codex would otherwise guess wrong, domain concepts, constraints, and gotchas. Delete restatements of the code and volatile inventories such as file trees. Demote narrower guidance to a closer nested AGENTS.md, a linked document, or a skill.
  • Get decisions. Ask the user to resolve each contradiction. Then present the delete and demote lists, including every proposed destination, for sign-off. Leave all files untouched until the user signs off.
  • Rewrite. Apply the signed-off verdicts in one pass. Place each new nested AGENTS.md in the nearest directory whose whole subtree shares its guidance. Finish only when every audited instruction is kept, rewritten, demoted to its named destination, or deleted as approved.

Other skills for the same job

different authors, same section of the catalogue
Gemini
by softaworks
×2

Use when the user asks to run Gemini CLI for code review, plan review, or big context (>200k) processing. Ideal for comprehensive analysis requiring large context windows. Uses Gemini 3 Pro by default for state-of-the-art reasoning and coding.

5k tokens
Claude Skills
by ComeOnOliver
×2

Claude Skills meta-skill: extract domain material (docs/APIs/code/specs) into a reusable Skill (SKILL.md + references/scripts/assets), and refactor existing Skills for clarity, activation reliability, and quality gates.

13k tokens scripts
Backend Atomic Commit
by ComeOnOliver
×1

> Pedantic backend pre-commit and atomic commit Skill for Django/Optimo-style repos. Enforces local AGENTS.md / CLAUDE.md, pre-commit hooks, .security/* helpers, and Monty’s backend engineering taste – with no AI signatures in commit messages.

14k tokens
Safe Edit
by ComeOnOliver
×1

Automatically backs up files, saves diffs, uses agents/skills, and ensures modular code (<200 lines) before any implementation. Use this skill for ALL code changes to ensure safe, reversible, and clean implementations.

11k tokens
Sharing Skills
by ComeOnOliver
×1

Use when you've developed a broadly useful skill and want to contribute it upstream via pull request - guides process of branching, committing, pushing, and creating PR to contribute skills back to upstream repository

4k tokens
Od Code Migration
by nexu-io

Default reference pipeline for the code-migration taskKind — code-import → design-extract → token-map → rewrite-plan → patch-edit ↔ build-test devloop → diff-review → handoff.

4k tokens
Review Agent Setup
by wshobson

Configure human-in-the-loop gating for AI agent review actions in Claude Code. Use when setting up a project where an agent may post PR reviews, comments, merges, or edit CI configuration, and you want a cryptographically auditable approval trail with Cedar-enforced gates.

1k tokens
Auto Updater
by anthropics
vendor

> Check installed community skills for updates. Shows a diff and requires explicit approval before applying. Use when the user says "check for updates", "update my skills", "anything new for my installed skills", or when invoked from the registry-sync agent.

2k tokens

How to use it

Copy the folder

Take vinta/refactor-agents-md from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.