agent-compat-sync

$npx mdskill add wquguru/skills/agent-compat-sync

Syncs Claude and Codex agent instructions via symlinks for compatibility.

  • Avoids duplicating instruction files when both agents must work in a repo.
  • Depends on filesystem symlinks and standard agent file paths.
  • Chooses canonical side based on existing files or user input.
  • Creates missing symlinks and mirrors skill directories automatically.

SKILL.md

.github/skills/agent-compat-syncView on GitHub ↗
---
name: agent-compat-sync
description: Keep repository-level Claude and Codex agent instructions compatible by creating safe symlinks between CLAUDE.md and AGENTS.md, and between .claude/skills/* and .agents/skills/*. Use when a repository should work with both Claude and Codex, when one agent instruction file exists but the other is missing, when migrating agent skills between .claude and .agents directories, or when asked to improve Claude/Codex compatibility for a repo.
---

# Agent Compat Sync

Make a repository usable by both Claude and Codex without duplicating instruction files or skill folders. Prefer symlinks so one canonical source stays authoritative.

## Workflow

1. Inspect the repository root for `CLAUDE.md`, `AGENTS.md`, `.claude/skills`, and `.agents/skills`.
2. Choose the canonical side:
   - If `CLAUDE.md` exists and `AGENTS.md` is missing, treat Claude as canonical.
   - If `AGENTS.md` exists and `CLAUDE.md` is missing, treat Codex as canonical.
   - If one instruction file is already a symlink to the other, treat the real target side as canonical.
   - If both instruction files exist as independent real files, stop and ask the user which file should become canonical.
3. Create the missing instruction-file symlink:
   - Claude canonical: `AGENTS.md -> CLAUDE.md`
   - Codex canonical: `CLAUDE.md -> AGENTS.md`
4. Mirror skill entries with per-entry symlinks:
   - Claude canonical: create `.agents/skills/<name> -> ../../.claude/skills/<name>` for each item in `.claude/skills`.
   - Codex canonical: create `.claude/skills/<name> -> ../../.agents/skills/<name>` for each item in `.agents/skills`.
5. Treat an existing path as acceptable when it already resolves to the same real target, even if the symlink is on a parent directory or points in the reverse direction.
6. Never overwrite existing real files or directories without explicit user approval. Report conflicts with exact paths.

## Scripted Sync

Use the bundled script for normal execution:

```bash
python3 scripts/sync_compat.py --repo /path/to/repo
```

From the target repository root, this is also valid:

```bash
python3 /path/to/agent-compat-sync/scripts/sync_compat.py
```

Useful options:

- `--dry-run`: show planned changes without writing.
- `--repo PATH`: run against a repository other than the current working directory.

The script is intentionally conservative. It creates missing symlinks and directories, leaves correct or equivalent symlinks alone, and exits non-zero when it finds ambiguous or conflicting existing paths.

## Manual Fallback

If the script cannot be used, apply the same rules manually with relative symlinks.

Claude canonical:

```bash
ln -s CLAUDE.md AGENTS.md
mkdir -p .agents/skills
ln -s ../../.claude/skills/<skill-name> .agents/skills/<skill-name>
```

Codex canonical:

```bash
ln -s AGENTS.md CLAUDE.md
mkdir -p .claude/skills
ln -s ../../.agents/skills/<skill-name> .claude/skills/<skill-name>
```

Before creating any symlink manually, check whether the destination already exists. If it exists and is not already the expected symlink, stop and ask the user.

More from wquguru/skills

SkillDescription
clean-my-loopAudit and clean the persistent context that feeds a recurring autonomous agent loop — memory files and indexes, scheduled-task / automation prompts, and CLAUDE.md / AGENTS.md — so the loop stops degrading into a self-reinforcing echo chamber. Works for Claude Code /loop crons and Codex automations.
english-swe-daily>
fable-5-best-practiceRoute Claude tiers, effort, and subagents for Fable-led work, and handle Fable-specific prompting, long-running execution, API behavior, refusals, and fallback.
free-my-cpuSafely audit and reduce CPU, load average, I/O wait, and Docker container resource pressure on macOS and Ubuntu/Linux hosts, especially remote production-like servers over SSH. Use when a host feels slow, load average is high, monitoring shows CPU spikes, Docker containers are suspected of consuming CPU, a service dashboard times out, or the user asks for a repeatable CPU optimization workflow.
free-my-diskSafely audit and reclaim disk space on macOS and Ubuntu/Linux hosts, including remote servers over SSH. Use when the user says their Mac, Linux box, VPS, or server disk is full, asks what can be safely deleted, wants to clean caches, developer artifacts, Docker storage, apt/Homebrew/npm/pnpm/yarn/pip/uv caches, journal/log files, Xcode data, editor extensions, node_modules, Trash, crontab/systemd timer disk checks, or asks for a repeatable free-space cleanup workflow.
gpt-5-6-best-practiceRoute GPT-5.6 tiers, reasoning effort, and subagents to minimize accepted-result cost subject to an explicit quality floor.
grafana-best-practiceReview, improve, organize, deploy, and verify Grafana dashboards, provisioned alert rules, and the Telegraf→InfluxDB→Grafana monitoring stack. Use when working on Grafana dashboards, dashboard folders, tags, legends, panel readability, Flux/InfluxDB query correctness or performance, Prometheus/Telegraf dimensions, Telegraf JSON/HTTP scraping, anonymous access, dashboard/alert provisioning, Grafana Docker deployments, high CPU or memory caused by dashboard queries, provisioned alert rules and Flux alert conditions, contact points and Telegram/notification delivery, or requests like "review this dashboard", "optimize Grafana panels", "why is this dashboard slow / using CPU", "fix legends", "move dashboards into a folder", "add tags", "set up Grafana alerting", "alert won't fire / won't deliver", "fix Telegram alerts", "route alerts to a Telegram topic/thread (message_thread_id)", "bump/upgrade the Grafana version", "deploy and verify dashboards", or "Grafana best practices".
pi-setupThis skill should be used when the user wants to install or configure Pi Agent (@earendil-works/pi-coding-agent) with DeepSeek (built-in), Ant-Ling Ring-2.6-1T (single-model custom provider), and ZenMux (multi-model OpenAI-compatible aggregator including Gemini 3.5 Flash, Claude, GPT), including auth, models.json, settings.json, a curated extension set, and known-pitfall fixes. Triggers on "配置 pi"、"setup pi agent"、"pi 装一下"、"配 ring/deepseek/gemini/zenmux 到 pi".
skills-finderFind Agent Skills on skills.sh and adopt only the ones that pass a security audit. Use when the user wants to discover, search for, evaluate, or install a third-party skill ("find a skill for X", "is this skill safe to install", "search skills.sh", "what skill should I use for Y"). Always runs the skills.sh security audit before recommending or installing anything, and refuses to adopt skills that fail the audit.
youtube-toolkitDownload YouTube videos with yt-dlp and post-process them with ffmpeg — fetch best-quality video/audio, convert formats, extract audio, and burn in translated (e.g. Chinese) subtitles with a translator watermark. Covers cross-environment tool installation (macOS-focused) including the ffmpeg-full / libass gotcha. Triggers on "youtube 视频下载处理".