1How It Works & Mechanism
Migration is defined as 'structural rearrangement' rather than copying files: simultaneously resolving at least five areas: project-level rule files, skill source-of-truth location, bridge naming conventions, multi-client consistency, and sustainable maintainability.
skills/dbs-agent-migration/SKILL.md**这不是安装教程。也不是脚本执行器。**
What is being done here: explicitly disqualifies partial migrations like 'copying CLAUDE.md to AGENTS.md' (Principle 1 notes it 'at most only solves getting things to run initially'), raising the delivery standard to the 4-part suite of 'source of truth + naming + multi-client bridge + maintainability'. This distinguishes it from ordinary installation tutorials—it purely audits, consolidates, generates, and verifies throughout, without running installation commands.
Source of truth takes priority: the in-project skills/ is the ideal source of truth, while ~/.claude|.codex|.grok|.agents/skills are merely bridges or host installation entry points; long-term logic must not be written inside bridges.
skills/dbs-agent-migration/SKILL.md- `~/.claude/skills/`、`~/.codex/skills/`、`~/.grok/skills/`、`~/.agents/skills/` 都只是 bridge 或宿主安装入口
Accompanied by the prohibition 'do not maintain long-term logic inside bridges' and the closing maintenance guideline: 'How to maintain in the future: only modify the source of truth, then regenerate the bridge for the corresponding host.' This is the core invariant of the entire methodology: change one source of truth, and multiple clients inherit it consistently via thin bridges.
Do not assume the project is already standardized: explicitly enumerates 4 rule-layer states (complete partial migration / CLAUDE.md only / AGENTS.md only / completely scattered) × 5 host states (Claude only / Codex only / Grok only / general Agents only / multi-client but inconsistent) as branching criteria.
skills/dbs-agent-migration/SKILL.md- **D 类**:没有规范,skill 散落
Structuring this as a matrix rather than a linear flow is the key difference between this skill and a 'one-off migration script': auditing classifies first (A/B/C/D + a single host assessment), then decides which layer to touch next; the Phase 1 output format strictly requires reporting 'which category / what was done right / what is genuinely missing / recommended layer to touch first' and asking whether to continue.
Each step in the 6-phase process closes with 'pre-write confirmation': Audit → Rule file migration → Source of truth identification/establishment → Naming and frontmatter → Multi-client bridge generation → Verification.
skills/dbs-agent-migration/SKILL.md不要一口气做完再汇报。
Phase 2 requires explaining before writing 'whether to create or rewrite which file / what will be kept / what will be deleted / why layered this way'; Phase 4 specifies 'must provide the user with an inventory rather than directly moving files'; Phase 5 requires first explaining which hosts bridges will be generated for and obtaining confirmation. Multi-step confirmation is explicitly defined here as 'part of the product'.
Grok bridges have hard constraints and precise templates: frontmatter must include user_invocable: true, description must specify the trigger method in Grok TUI and 'read source of truth first', and the body should recommend a Grok Bridge section + absolute path to the Source of truth.
skills/dbs-agent-migration/SKILL.mdGrok bridge **必须** 在 frontmatter 里包含 `user_invocable: true`,否则用户在 Grok TUI 输入 `/` 后搜不到这个 skill。
The template skeleton is provided verbatim (multiline name / user_invocable / description + ## Grok Bridge section), along with three 'must-check' items (whether user_invocable exists, whether description mentions Grok TUI and trigger words, and whether the path is absolute). Such host-specific hard constraints concretely anchor the 'multi-client consistency' goal—shifting silent failures like 'cannot search on the Grok side' into generation-time checks.
The general Agents side prioritizes symlinks over copying and applies a conservative strategy for same-name conflicts: no overwriting, report the target path and current type, and let the user confirm whether to move out the legacy directory.
skills/dbs-agent-migration/SKILL.md`~/.agents/skills/<name>` 优先使用软链指向真源目录。这个目录已知会被豆包 Mac App、Trae Solo 和 Codex 读取。
The same section requires: if the target is already a symlink with the same name, it can be updated, but 'after updating, readlink must be checked to ensure it points back to the expected path'; the Phase 6 verification checklist includes a dedicated item: 'whether targets in `~/.agents/skills` have real directory conflicts or dangling symlinks'. The symlink strategy avoids drift across multiple copies of the source of truth, landing the 'modify source of truth only' invariant at the filesystem layer.
Naming standardization has verifiable rules: each Skill retains only 1 invocable name in lowercase English kebab-case, formal dbskill Skills use the dbs- prefix, directory names, frontmatter name, and bridge directory names must match completely, Codex display_name must equal the standard English name, and templated short_description is prohibited.
skills/dbs-agent-migration/SKILL.md可调用名使用小写英文 kebab-case;dbskill 正式 Skill 使用 `dbs-` 前缀,例如 `dbs-good-question`。
The same paragraph includes 6 numbered rules, including 'Chinese names may only serve as explanatory titles and natural language intents, not as `/` invocation aliases' and 'do not let scripts invent temporary names based on titles'; this explains the exact naming format (dbs-xxx) of the 32 Skills in this project, serving as an auditable naming contract.
2Core Capabilities
01Rule layer audit and classification: determine project category among A/B/C/D and recommend 'which layer to touch first'
02Layered rule file migration: extract platform-agnostic rules into AGENTS.md, leaving Claude-specific ones in CLAUDE.md
03Skill source of truth identification or creation: enter candidate discovery mode when skills/ is absent, producing a candidate inventory tagged with recommended/not recommended for consolidation
04Multi-client bridge generation (Claude / Codex / Grok / general Agents), including Grok's user_invocable hard constraint and precise YAML template
05Naming and frontmatter standardization: kebab-case single name, dbs- prefix, Codex display_name aligned with the standard English name
06Post-migration verification checklist (8 items): AGENTS.md standalone usability, clear source of truth, complete frontmatter, bridges pointing back to source of truth, multi-client set consistency, Grok user_invocable, symlink conflicts, and dangling references
6Verdict & Scenarios
Directly targets real pain points of multi-client Agent workbenches: usable across 4 project types × 5 host states without assuming the project is already standardized.Source of truth/bridge layering provides a sustainably maintainable invariant, preventing identical logic from diverging across four host directories.Host-specific pitfalls are surfaced as generation-time checks (Grok's user_invocable, general Agents' symlink readlink), turning silent failures into verifiable items.Conservative write operations: no overwriting, confirmation required, supports preview-only mode—ideal for operating on projects actively used by others.6 phases + per-phase confirmation + 5 wrap-up maintenance questions make the delivery process auditable rather than a black-box migration.Best for: Suitable for existing projects of a certain scale with scattered rule files and skills (CLAUDE.md / AGENTS.md / multiple mixed host directories) needing a one-time structural migration; also ideal for developers maintaining skills to be supplied simultaneously to Claude Code, Codex, Grok, and general Agents (Doubao Mac App, Trae Solo)—providing naming contracts, bridge templates, and verification checklists to produce sustainably maintainable workbench structures. Skill authors wanting to learn the engineering practice of 'source of truth + thin bridges for multi-client distribution' will also benefit from reading Phase 5 and the naming rules.
Not for: Not suitable for scenarios merely wanting to 'copy CLAUDE.md to get Codex up and running' (SKILL.md explicitly states copying does not count as migration and will guide you through a complete round of auditing and naming standardization); not suitable for users expecting a one-click script migration—it deliberately avoids being a script runner and relies entirely on agent-guided phase-by-phase confirmation; not suitable for environments lacking permissions to modify host directories (enterprise-managed devices, shared machines); not suitable for reviewing skill quality or organizing knowledge base content, which falls outside its scope.