/claudeforge:claude-to-agents [--symlink | --copy | --inline-chain] [--force]from claudeforge
Converts a project's CLAUDE.md (with chained sub-files) into an AGENTS.md for Codex, Gemini Code Assist, and other tools. Supports symlink, copy, and inline-chain modes.
Ships in claudeforge. Installing the plugin adds it to Claude Code.
Wraps hooks/claude-to-agents.py so non-Claude tools (OpenAI Codex, Gemini Code Assist, anything else honouring the AGENTS.md convention) can read the same instructions as Claude.
Decide first by asking which guarantee the user wants:
--symlink (default on macOS / Linux): AGENTS.md becomes a symlink to CLAUDE.md. One source of truth — edits to CLAUDE.md show up in AGENTS.md instantly. Codex/Gemini read it transparently. On Windows the script falls back to --copy and prints a notice.--copy: byte-for-byte snapshot. Use when the user wants to fork the instructions for non-Claude tooling (Codex/Gemini reading a different policy) or when their VCS / build pipeline doesn't follow symlinks.--inline-chain: walk every @path/.../CLAUDE.md chain import recursively and write a single flat AGENTS.md with all sub-file content inlined. Recommended for Codex/Gemini in modular projects — those tools don't resolve @-imports, so without inlining they'd only see the root file.If the user is silent on mode, default to --symlink for simple projects and recommend --inline-chain for projects with > 1 CLAUDE.md (run find . -name CLAUDE.md -type f -not -path '*/.git/*' -not -path '*/node_modules/*' | wc -l first to decide).
test -f CLAUDE.md — if missing, tell the user /enhance-claude-md is the right command first.python3 "${CLAUDE_PLUGIN_ROOT:-${CLAUDE_PROJECT_DIR:-.}}/hooks/claude-to-agents.py" --mode <mode>
--symlink: readlink AGENTS.md should print CLAUDE.md.--copy: diff -q CLAUDE.md AGENTS.md should return clean.--inline-chain: AGENTS.md must contain content from every chained sub-file; the script strips backlinks and @-import lines automatically.AGENTS.md is renamed to AGENTS.md.backup.<UTC-timestamp> before overwrite. Pass --force to skip the backup (destructive).--symlink) leave CLAUDE.md untouched.Files this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
claude-to-agents, agents-md, codex, gemini-code-assist, cross-tool
7-day visitors to each command page
3 commands in this plugin
/enhance-claude-mdCLAUDE.md Enhancer CommandInitialize or enhance a CLAUDE.md (and chained sub-CLAUDE.md files) for the current project using the claude-md-enhancer skill. Delegates deep codebase scans to the Explore subagent and stays within the 150-line cap./sync-claude-md/sync-claude-md — CLAUDE.md Sync & CleanupWalk every CLAUDE.md in the project, prune stale references (removed deps, deleted paths, broken modular links), enforce the 150-line cap by splitting into sub-files, and repair the root ↔ subdirectory chain (markdown links + @path imports).Generated from the plugin's indexed repository (alirezarezvani/claudeforge) — no native marketplace selected
npx claudepluginhub p/alirezarezvani-claudeforgeOther plugins' commands for the same job