From c1844bead4d8336265de4012af3a022a459d71e4 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sat, 31 Jan 2026 18:56:46 +0000 Subject: [PATCH] feat(claude/commands): add claude-to-agents conversion command Provide a reusable command to convert a project's CLAUDE.md into an AGENTS.md file while replacing the original with a thin @-reference. Includes precondition checks, self-reference updating, and summary reporting steps. Co-Authored-By: Claude Opus 4.5 --- claude/commands/claude-to-agents.md | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 claude/commands/claude-to-agents.md diff --git a/claude/commands/claude-to-agents.md b/claude/commands/claude-to-agents.md new file mode 100644 index 0000000..c3bd618 --- /dev/null +++ b/claude/commands/claude-to-agents.md @@ -0,0 +1,36 @@ +# Task: Convert CLAUDE.md to AGENTS.md + +Convert this project's `CLAUDE.md` into an `AGENTS.md` file, and +replace `CLAUDE.md` with a thin reference to it. + +## Steps + +1. **Verify preconditions**: + - Confirm `CLAUDE.md` exists in the project root. If not, abort + with an error message. + - Confirm `AGENTS.md` does NOT already exist in the project root. + If it does, abort — suggest using it directly or removing it + first. + +2. **Read `CLAUDE.md`** content in full. + +3. **Review content for references that need updating**: + - Headings like `# CLAUDE.md` → `# AGENTS.md` + - Self-references like "this CLAUDE.md file" → + "this AGENTS.md file" + - Any other mentions of the filename that refer to the file + itself and should change to reflect the new name + - Do NOT change references to CLAUDE.md that refer to other + projects' files, Claude Code documentation, or external + concepts + +4. **Write `AGENTS.md`** with the updated content. + +5. **Replace `CLAUDE.md`** contents with just: + ``` + @AGENTS.md + ``` + This makes Claude Code load `AGENTS.md` via the `@`-reference. + +6. **Summary**: Report what was done, including any references that + were updated in step 3.