dbs-agent-migration
Agent Workspace Migration. Organize any project into a long-term maintainable Agent workspace with consistent support for both Claude Code and Codex: audit rule files, identify source-of-truth skills, standardize naming conventions, and generate bridges. Triggers: /dbs-agent-migration, /agent-migration, "migrate to Codex", "migrate to Claude Code", "unify AGENTS.md", "organize skill bridges", "my Agent workspace is messy", "help me unify Claude and Codex" Agent workspace migration. Turn any project into a maintainable Claude Code / Codex dual-host workspace by auditing rule files, establishing source-of-truth skills, normalizing names, and generating bridges. Trigger: /dbs-agent-migration, /agent-migration, "migrate to Codex", "migrate to Claude Code", "fix AGENTS.md", "organize skill bridges"
NPX Install
npx skill4agent add dontbesilent2025/dbskill dbs-agent-migrationTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →dbs-agent-migration: Agent Workspace Migration
One-sentence Definition
dbs-agent-migrationClaude Code → CodexCodex → Claude CodeClaude + Codex dual-platform unificationMessy project → Standard Agent workspace
- Business diagnosis itself
- Knowledge base content optimization
- Methodology quality review of individual skills
- Business copywriting
When to Use
- Want to migrate a Claude Code project to Codex
- Want to port a Codex project back to Claude Code
- Want to be compatible with both Claude Code and Codex
- Feel their Agent workspace is messy and want unified organization
- Want to unify Claude and Codex configurations
- Ask about design of ,
CLAUDE.md, skill bridges, or source-of-truthAGENTS.md - Local skills are messy, scattered everywhere, unsure how to consolidate
- Have copied and built some bridges, but unsure if it's complete
CLAUDE.md
Core Principles
Principle 1: Migration is not file copying or one-way moving
CLAUDE.mdAGENTS.md- Project-level rule files
- Source-of-truth location for skills
- Bridge naming rules
- Consistency across Claude / Codex
- Long-term maintainability
- Claude Code → Codex
- Codex → Claude Code
- Dual-platform unification
Principle 2: Source-of-truth first, bridges generated from source-of-truth
- is the ideal source-of-truth directory
skills/ - and
~/.claude/skills/are only bridges~/.codex/skills/ - Do not maintain long-term logic in bridges
Principle 3: Do not assume projects are already standardized
- Has +
CLAUDE.md+AGENTS.mdskills/ - Only has
CLAUDE.md - Only has
AGENTS.md - Skills are scattered throughout the project, no at all
skills/
- Only Claude side exists
- Only Codex side exists
- Both sides exist but are inconsistent
- Neither side has a systematic setup
Principle 4: Multi-step confirmation is part of the product
- What you just observed
- What judgments you made for them
- What you plan to modify next
- Why this modification is necessary
Workflow
Phase 1: Migration Audit
CLAUDE.mdAGENTS.mdSOURCE_OF_TRUTH.md- Whether exists in the project
skills/ - Whether scattered skill candidates exist in the project
- Whether /
~/.claude/skillsbridges already exist~/.codex/skills - Whether the current main workspace is more biased towards Claude or Codex
- Type A: Dual files + dual bridges, possibly only partially migrated
- Type B: Has , missing
CLAUDE.mdAGENTS.md - Type C: Has , missing Claude compatibility layer
AGENTS.md - Type D: No standards, skills scattered
- Current status: Claude primary, Codex missing
- Current status: Codex primary, Claude missing
- Current status: Both platforms exist but are inconsistent
- Current status: Neither platform has a systematic setup
Phase 1 Output Format
- Which category their project belongs to
- What they've done correctly
- What's actually missing
- Which layer I recommend starting with
I have completed the first-round audit. Next, I plan to process {next phase}. Shall we continue?
Phase 2: Rule File Migration
CLAUDE.md- Extract platform-agnostic rules → write to
AGENTS.md - Keep Claude-specific rules in
CLAUDE.md - Delete outdated, duplicate, or overly host-bound content
CLAUDE.md- Directly create a minimally viable based on project type
AGENTS.md - Create a thin only if users need to add back the Claude compatibility layer
CLAUDE.md
AGENTS.md- Use as the main rule file
AGENTS.md - Extract Claude-specific compatibility layer
- Only add necessary content
CLAUDE.md
SOURCE_OF_TRUTH.md- Clearly inform the user: It's not a hard requirement, but strongly recommended to establish
- Add it only if the user agrees
Phase 2 Pre-write Confirmation
- Which file will be created or rewritten this time
- What will be retained
- What will be deleted
- Why this layered approach is used
Phase 3: Identify or Establish Skill Source-of-Truth
Scenario A: skills/
already exists
skills/- Designate as the source-of-truth
skills/ - Exclude historical versions, backups, examples, and finished documents
Scenario B: No skills/
exists
skills/- Scan files like ,
SKILL.md, and files with clear triggers and execution steps*skill*.md - Exclude articles, backups, test cases, and exported drafts
- Generate a "Candidate Source-of-Truth List"
- Tell users which candidates are recommended for consolidation and which are not
- Create a project-level only after user confirmation
skills/
- Do not force creation of
skills/ - Clearly inform the user: Currently, there are only "prompt assets", not yet a skill system
Phase 3 Confirmation Requirements
- Which files will be recognized as source-of-truth
- Which will not
- Why
Phase 4: Unify Naming and Frontmatter
- Top-level frontmatter
namedescription- Standardized bridge names
- First follow the historical names users have long used
- Then determine unified names for both Claude / Codex
- Finally write back to source-of-truth frontmatter
Phase 5: Generate Claude / Codex Bridges
tools/sync-claude-skills.jstools/sync-codex-skills.js- Stable mapping tables, e.g.,
tools/skill-bridge-map.md
- Only act as entry points, do not maintain long logic
- Point to project source-of-truth
- Use the same standardized names for both Claude / Codex
- Can regenerate one side from the other without relying on one-way history
Phase 5 Pre-write Confirmation
- Which bridges will be generated
- Which old bridges will be overwritten
- Whether old directories will be cleaned up
Phase 6: Validation
- Whether can work independently
AGENTS.md - Whether source-of-truth is clear
- Whether frontmatter is complete
- Whether bridges can point back to source-of-truth
- Whether the set of project bridges is consistent across Claude / Codex
- Whether dangling references exist
Phase 6 Output
- Whether source-of-truth is completed
- Whether rule layer is completed
- Whether Claude bridges are completed
- Whether Codex bridges are completed
- Whether dual-platform sets are consistent
Prohibited Actions
- Do not treat copying as complete migration
CLAUDE.md - Do not assume users must have
skills/ - Do not blindly recognize all scattered documents as skills
- Do not directly move a large number of files without confirmation
- Do not let bridge names be generated randomly by scripts on the fly
- Do not maintain long-term logic in bridges
Recommended Closing Remarks
- Whether the project is now in "runnable migration" or "complete migration" status
- Which structural layers have been added
- What optional optimizations are available next
- What the minimum steps are for others to follow