Command Palette

Search for a command to run...

Назад к скиллам
скилл № 58194

migrate-dual-harness

"Migrate a single-harness repo to the dual-harness layout so both Claude Code and Codex load the same instructions and skills — AGENTS.md as the portable…

БесплатноБез исполняемых скриптов
coalesce-labsот coalesce-labs★ 20 звёзд на GitHub

Установить migrate-dual-harness в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Migrate Dual-Harness

Converge a single-harness repo (Claude-only monolithic CLAUDE.md, or Codex-only AGENTS.md with no bridge) onto the target dual-harness layout, applying every mechanical fix automatically and only asking the model to do the one thing a script can't: split a monolithic CLAUDE.md into its portable core and its Claude-specific remainder.

User-invoked only. This skill sets disable-model-invocation: true, so nothing can auto-trigger it as a handoff — not catalyst-foundry:setup-catalyst (which hits this exact case at its rc 11 row) and not check-project-setup.sh's §10 checkup warning. Both merely reference /catalyst-foundry:migrate-dual-harness and tell the user to run it themselves; invoke this skill directly (/catalyst-foundry:migrate-dual-harness) to perform the split.

Target layout

  • AGENTS.md — portable, tool-agnostic instructions (canonical).
  • CLAUDE.md — thin bridge: literal line 1 is @AGENTS.md, then only Claude-specific notes.
  • .agents/skills/ — canonical skills dir.
  • .claude/skills — committed relative symlink → ../.agents/skills.
  • AGENTS.md carries a ## Skills pointer section when the repo has skills.
  • No .codex/ dir needed — Codex reads AGENTS.md and .agents/skills/ natively.

Phase 1: Resolve

Locate the backing script (lives in catalyst-dev, the shared framework core):

source "${CLAUDE_PLUGIN_ROOT:-plugins/foundry}/scripts/require-catalyst-dev.sh" \
    "${CLAUDE_PLUGIN_ROOT:-plugins/foundry}" || exit 1
SCRIPT="${CATALYST_DEV_SCRIPTS}/migrate-dual-harness.sh"

Phase 2: Diagnose

Dry-run the classifier — it writes nothing:

bash "$SCRIPT" --repo . 2>&1

Branch on the exit code:

rc Meaning Next step
0 already dual-ok, or no-harness (out of scope for this skill) Phase 5 (house rules) — for no-harness, re-run the mechanical fix per Phase 5's note — then Phase 6
10 mechanical changes needed (bridge / skills wiring / pointer) — no monolithic problem Phase 3
11 CLAUDE.md is monolithic — needs the intelligent split Phase 3 (mechanical parts only), then Phase 4
2 bad usage (--repo not a dir, unknown flag) fix the invocation and re-run
4 ambiguous skills state (message says exactly what conflicts) ONE sanctioned exception, else STOP. Exception (the per-skill symlink farm): applies only when the diagnostic is the symlink-inside-the-trees refusal AND all three pre-checks pass BEFORE touching anything — (a) every entry of .claude/skills is a symlink resolving into ../../.agents/skills/<name> (one real file or foreign link disqualifies), (b) neither .claude nor .agents is itself a symlink, (c) git check-ignore --stdin over .agents/skills + every .agents/skills/<name> + .claude/skills reports nothing ignored (a masked hard-stop must surface BEFORE deletion, not after). All pass → converge (delete the per-entry links — links, not content — rmdir .claude/skills, ln -s '../.agents/skills' .claude/skills), re-run the dry-run, and dispatch the NEW rc through this same table (a coexisting monolithic CLAUDE.md legitimately yields rc 11 next — continue the flow; rc 0 only when nothing else is pending). ANY pre-check failing, or any other rc-4 diagnostic → STOP: surface the script's stderr verbatim; never modify either skills tree yourself; present the conflict and ask the human operator, then re-run the classifier to verify
5 I/O error inspect the printed message

Phase 3: Mechanical fix

Applies to rc 10 and rc 11 alike (rc 11 still gets the skills/pointer wiring — only the CLAUDE.md split itself is deferred to Phase 4):

bash "$SCRIPT" --repo . --fix 2>&1
  • After fixing from rc 10, re-run the Phase 2 dry-run and require rc 0.
  • After fixing from rc 11, re-run the Phase 2 dry-run and expect rc 11 again (the monolithic split is still outstanding) — proceed to Phase 4.
  • rc 4 at any point: dispatch through the Phase 2 table's rc-4 row — it is the single authoritative statement of the one sanctioned exception (the pre-validated per-skill symlink farm convergence) and the hard stop for everything else.

Phase 3.5: Cross-agent invocation safety

Runs whenever the repo has a skills tree (.agents/skills/), independent of rc — a mechanical safety gate, not part of the monolithic-split judgment call in Phase 4.

The sidecar convention (CTL-1536). A skill dir MAY carry two plain declarative sidecar files alongside its SKILL.md:

  • agents/openai.yaml — Codex policy (e.g. policy.allow_implicit_invocation).
  • agents/portability.yaml — portability metadata (e.g. mutating: true).

Both are read natively by whatever consumes them; no build step or generator produces or consumes either file. This is explicitly not the catalyst-cloud CTL-1446 generated-copy mechanism (a tools/agent-skills/{build,check,clean}.mjs pipeline that pr

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

  1. 01Bash
  2. 02Read
  3. 03Write
  4. 04Edit
  5. 05Glob
  6. 06Grep

FAQ

Что делает скилл migrate-dual-harness?

"Migrate a single-harness repo to the dual-harness layout so both Claude Code and Codex load the same instructions and skills — AGENTS.md as the portable canonical doc, a thin CLAUDE.md `@AGENTS.md` bridge, and a `.agents/skills` dir with a `.claude/skills` symlink onto it. Use when asked to migrate to dual-harness, make this repo work in both Claude and Codex, or for agent metadata cleanup. Ends with a quality review: canonical-form convergence and checkup-clean are applied mechanically; conciseness / progressive-disclosure findings are reported, with editorial changes confirmed with the user first."

Как установить скилл migrate-dual-harness?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл migrate-dual-harness запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить migrate-dual-harness с