dual-tree-sync
Keep Claude Code and Codex skill trees from drifting apart.
Skill by minxnnu-cloud
Chalk Labs
Need help deploying dual-tree-sync?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/minxnnu-cloud-dual-tree-sync
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Shell scripts
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/dual-tree-sync
What's inside
- Skill name
dual-tree-sync- Description
- Keep Claude Code and Codex skill trees from drifting apart. Use when a project maintains skills for both runtimes (.claude/skills for Claude Code, .agents/skills or .codex for Codex/other agents), when the two copies of a skill disagree, when an agent seems to follow outdated rules that were already fixed "somewhere", or when setting up a dual-runtime project. Ships a sync hook with per-tree token substitution and an intentional-exception list.
- License
- MIT
- Instructions
- 70 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (4)
- SKILL.md
- skills-sync.ps1 · scripts/
- skills-sync.rules.json · scripts/
- skills-sync.sh · scripts/
SKILL.md (first lines)
# Dual Tree Sync
Projects that run both Claude Code and Codex end up with two skill trees:
`.claude/skills/**` (what Claude Code loads) and `.agents/skills/**` (what Codex loads).
Edit them independently and they fork — silently.
## Why this is worse than it sounds
In one audited project, 6 of 7 shared skills had drifted — **in both directions**.
Claude Code was following an approval channel retired a month earlier; a direction-lock
phase existed only in the tree that didn't execute it; one skill's two copies shared *zero*
sections — a philosophy fork where one tree required human approval before rendering and
the other rendered first and asked later. Every one of those produced work that was later
rejected and redone. The drift didn't look like a bug; it looked like agents being bad at
their jobs.
## The model
1. **One tree is the editing source.** Pick it (say `.agents/skills`). The other is a mirror.
2. **A PostToolUse hook mirrors on every edit.** Write/Edit under the source tree → copy to
the mirror. Editing the mirror directly → warn and point at the source.
3. **Per-tree tokens survive the mirror.** Some values *should* differ per tree — each tree
names its own executor (`subagent_type:"Codex"` vs `"claude"`), its own loading file
(`AGENTS.md` vs `CLAUDE.md`). These are substitution rules, applied on copy.
4. **Intentional exceptions are listed, not implied.** A skill whose two copies are
deliberately different documents (e.g. producer-side vs orchestrator-side of the same
pipeline) goes in an exclusion list, and the hook leaves it alone.
## Setup
Copy `scripts/skills-sync.ps1` (Windows) or `scripts/skills-sync.sh` (POSIX) into your
project's hook directory, edit `skills-sync.rules.json` next to it, and register:
```json
{
"hooks": {
"PostToolUse": [{
"matcher": "Write|Edit|MultiEdit",
"hooks": [{ "type": "command",
"command": "powershell -NoProfile -File \"$env:CLAUDE_PROJECT_DIR/hooks/skills-sync.ps1\"",
"timeout": 10 }]
}]
}
}
```
`skills-sync.rules.json`:
```json
{
"excluded": ["my-producer-skill"],
"perTree": [
{ "from": "subagent_type:\"Codex\"", "to": "subagent_type:\"claude\"" }
]
}
```
## Hard-won details (read before editing the scripts)
- **Rules live in a UTF-8 JSON sidecar, not in the .ps1.** Windows PowerShell 5.1 reads a
BOM-less `.ps1` as ANSI; non-ASCII replacement literals get mangled and the rule silently
never fires. This exact bug shipped in the first version of this hook.
- **Write the mirror without a BOM** (`UTF8Encoding($false)`), or every synced file grows a
phantom first-line diff forever.
- **Keep substitution tokens exact and narrow.** A blanket `.agents/ → .claude/` rewrite
will corrupt skills that name the other tree *on purpose* (e.g. "production canon lives
in `.agents/skills/**`").
- **Fail open.** A sync failure must never block the user's edit.From minxnnu-cloud/make-new-things, MIT.
More from minxnnu-cloud/make-new-things
- 0.547score
codex-visual-handoff
minxnnu-cloud
Division of labor for users who run both Claude and OpenAI Codex.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
rework-budget
minxnnu-cloud
Stop revision loops from eating the project.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
styleframe-first
minxnnu-cloud
Approve representative frames before any full render.
SkillBFreshness: B★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 18, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/minxnnu-cloud/make-new-things
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from minxnnu-cloud
- 0.547score
codex-visual-handoff
minxnnu-cloud
Division of labor for users who run both Claude and OpenAI Codex.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
rework-budget
minxnnu-cloud
Stop revision loops from eating the project.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
styleframe-first
minxnnu-cloud
Approve representative frames before any full render.
SkillBFreshness: B★ 1Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get dual-tree-sync running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
dual-tree-sync skill. Agent Mart. https://agentmart.dev/skills/minxnnu-cloud-dual-tree-sync (last updated 2026-10-24)