From claude-to-agents
Migrate a project from Claude-specific instruction files (CLAUDE.md, .claude/skills/) to the universal AGENTS.md standard, creating symlinks so every configured AI agent shares one source of truth. Handles four starting states: CLAUDE.md only, AGENTS.md only, both (conflict), or neither (scaffold). Use this skill whenever the user wants to convert to agents.md, make project instructions universal or agent-agnostic, set up or adopt the agents.md standard, migrate from CLAUDE.md, share instructions across multiple AI tools (Augment, Claude, Gemini, Copilot, Cursor, Windsurf), or move .claude/skills to .agents/skills. Also triggers on phrases like "make instructions work for other agents", "new dev uses a different AI tool", or any mention of the agents.md spec. Do NOT use this skill when the user just wants to edit CLAUDE.md/AGENTS.md content, review existing instructions, or configure .claude/settings.json — those are content editing tasks, not migration.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-to-agents:claude-to-agentsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Migrate a project from Claude-specific instruction files to the universal [AGENTS.md](https://agents.md) standard.
Migrate a project from Claude-specific instruction files to the universal AGENTS.md standard. AGENTS.md becomes the single source of truth, with symlinks so each agent's native config file points back to it.
The migration has two parts:
Ask the user which project to migrate if not already clear. Confirm the project root path.
Run the helper script to detect the current state:
bash ~/.claude/skills/claude-to-agents/scripts/setup-agents.sh --project-dir <path> --detect
The script reports one of four states:
| State | Condition | Action |
|---|---|---|
| A | CLAUDE.md exists, no AGENTS.md | Full migration: transform content + create structure |
| B | AGENTS.md exists (with or without symlinks) | Create missing symlinks only |
| C | Both CLAUDE.md and AGENTS.md exist (not symlinked) | Conflict — resolve with user, then State B |
| D | Neither exists | Scaffold from template, then State B |
Ask the user which agents to configure. Present this table:
| Agent | Symlink created | Notes |
|---|---|---|
claude | CLAUDE.md → AGENTS.md, .claude/skills → ../.agents/skills | Default, almost always wanted |
gemini | GEMINI.md → AGENTS.md | Gemini CLI |
copilot | .github/copilot-instructions.md → ../AGENTS.md | GitHub Copilot |
cursor | .cursor/rules/agents.md → ../../AGENTS.md | Cursor |
windsurf | .windsurfrules → AGENTS.md | Windsurf |
Default to claude only. Multiple agents can be selected comma-separated.
Read ~/.claude/skills/claude-to-agents/references/agent-configs.md for full details on each agent's conventions if needed.
This is the core workflow. Do these in order:
4A.1 — Check for uncommitted changes:
Run git status on the project. If CLAUDE.md has uncommitted changes, warn the user and ask them to commit or stash first. Do not proceed until the working tree is clean for the files you'll touch.
4A.2 — Read and transform content:
Read the full CLAUDE.md. Transform it to be agent-agnostic using these rules:
| Pattern | Replacement |
|---|---|
| "Claude", "Claude Code" when referring to the agent | "the AI assistant" or "the agent" |
| "# Global Claude Code Settings" or similar headings | Contextual heading like "# AI Coding Guidelines" |
| "Use the Read tool", "Use the Edit tool" | "Read the file", "Edit the file" |
| "Use the Grep/Glob tool" | "Search for..." |
| "Use the Bash tool" | "Run the command" |
| "Use the Write tool" | "Create/write the file" |
| Tool-specific capitalized names (Read, Edit, Bash, etc.) used as tool references | Lowercase action verbs |
Apply these contextually — understand the sentence meaning, don't do blind find-replace. Preserve all non-Claude-specific content exactly as-is.
4A.3 — Extract Claude-specific config: Identify sections that are inherently Claude-specific and cannot be made universal:
/acli, /github-cli)mcp__auggie__*)For these:
.claude/settings.json (merge, don't overwrite)## Claude Code section at the bottom of AGENTS.md (this is rarely needed)4A.4 — Write AGENTS.md:
Write the transformed content to AGENTS.md in the project root.
4A.5 — Show the user what changed: Present a summary of transformations made. If anything was ambiguous, ask the user to confirm.
4A.6 — Run the helper script:
bash ~/.claude/skills/claude-to-agents/scripts/setup-agents.sh --project-dir <path> --agents <agent-list> --apply
This moves .claude/skills/ → .agents/skills/, creates all symlinks, and updates .gitignore.
4A.7 — Handle subdirectory CLAUDE.md files: Check for CLAUDE.md files in subdirectories:
find <path> -name "CLAUDE.md" -not -path "*/.git/*" -not -path "*node_modules/*" -not -path "*/.worktrees/*" -not -path "*/.claude/worktrees/*"
If found, flag them to the user and offer to convert each one (repeat the content transformation for each).
Briefly scan AGENTS.md for Claude-specific language. If found, offer to clean it up.
Run the helper script to create missing symlinks:
bash ~/.claude/skills/claude-to-agents/scripts/setup-agents.sh --project-dir <path> --agents <agent-list> --apply
AGENTS.md and proceed as State BAGENTS.md with standard sections based on the agents.md spec:
After the script runs, verify the setup:
bash ~/.claude/skills/claude-to-agents/scripts/setup-agents.sh --project-dir <path> --agents <agent-list> --verify
Report results to the user. If any symlinks are broken, diagnose and fix.
If there are changes, offer to commit them. Respect the user's git workflow preferences — don't commit unless asked. Suggest a message like:
feat: migrate CLAUDE.md to AGENTS.md standard
Convert project instructions to the universal AGENTS.md format.
CLAUDE.md is now a symlink to AGENTS.md. Skills moved to .agents/skills/.
~/.claude/CLAUDE.md — this skill is for per-project files only.claude/settings.json content when merging.claude/worktrees/ directory, leave it aloneCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub langburd/agent-skills --plugin claude-to-agents