agents/skills/cross-agent/SKILL.md
Set up cross-agent skill infrastructure so skills work across Claude Code, OpenAI Codex, and GitHub Copilot. Use for multi-agent compatibility, skill migration, cross-agent sync.
npx skillsauth add drn/dots cross-agentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Migrate a repository's skills to the Agent Skills open standard so they work across Claude Code, Codex, and Copilot.
$ARGUMENTS - Optional: path to target repo (defaults to current working directory)find .agents/skills -maxdepth 2 -name SKILL.md 2>/dev/null | head -30find .claude/commands -maxdepth 1 -name "*.md" 2>/dev/null | head -30find .claude/skills -maxdepth 2 -name SKILL.md 2>/dev/null | head -30find . -maxdepth 1 -name AGENTS.md 2>/dev/null | head -1file CLAUDE.md 2>/dev/null | head -1find . -maxdepth 1 -type f 2>/dev/null | grep '/claude\.md$' | head -1find .github -maxdepth 1 -name copilot-instructions.md 2>/dev/null | head -1find . -mindepth 2 -maxdepth 4 -name CLAUDE.md -not -path './.git/*' 2>/dev/null | head -20find . -mindepth 2 -maxdepth 4 -name AGENTS.md -not -path './.git/*' 2>/dev/null | head -20git rev-parse --show-toplevel 2>/dev/null | head -1Verify this is a git repository. If not, stop and report.
If $ARGUMENTS contains a path, cd to it first.
Scan for existing skills in all locations:
.agents/skills/*/SKILL.md (already canonical).claude/commands/*.md (Claude flat commands).claude/skills/*/SKILL.md (Claude directory skills)
Also check for a lowercase claude.md — Claude Code requires CLAUDE.md (uppercase) for discovery. Use ls -1 | grep '^claude\.md$' to detect the wrong casing (a plain test -f is unreliable on case-insensitive filesystems).Classify the repo:
.claude/ but no .agents/skills/. Full migration needed..agents/skills/ exists but missing infrastructure (no AGENTS.md, no Copilot instructions, no sync scripts)..agents/skills/ exists with all infrastructure. Run validation only.Also scan for subtree-level CLAUDE.md / AGENTS.md files (any depth ≥ 2 inside the repo, excluding .git). For each subtree directory, classify:
CLAUDE.md exists → git mv to AGENTS.md and add CLAUDE.md symlinkAGENTS.md exists → add CLAUDE.md symlinkcmp -s CLAUDE.md AGENTS.md returns 0 → drop CLAUDE.md, replace with symlinkCLAUDE.md is a symlink to AGENTS.md → skipTreat subtrees as a first-class migration target, not an "out of scope" observation. The user expects cross-agent to migrate the entire monorepo in one pass.
Show the user:
## Cross-Agent Migration Plan
State: [GREENFIELD/CLAUDE-ONLY/PARTIAL/COMPLETE]
### Skills to migrate
| Source | Name | Destination |
|--------|------|-------------|
| .claude/commands/review.md | review | .agents/skills/review/SKILL.md |
| .claude/skills/pdf/ | pdf | .agents/skills/pdf/ |
### Infrastructure to create
- [ ] .agents/skills/ directory
- [ ] AGENTS.md (cross-agent contract)
- [ ] CLAUDE.md symlink to AGENTS.md
- [ ] .claude/skills symlink to .agents/skills
- [ ] .github/copilot-instructions.md
### Per-Subtree Migration (omit this section if no subtree CLAUDE.md / AGENTS.md found)
| Subtree | State | Action |
|---|---|---|
| `engine/` | CLAUDE-only | git mv CLAUDE.md AGENTS.md; symlink CLAUDE.md → AGENTS.md |
| `services/admin/` | Both, divergent | merge CLAUDE.md + AGENTS.md → AGENTS.md (verify both); symlink CLAUDE.md |
| `services/api/` | Both, identical | rm CLAUDE.md; symlink CLAUDE.md → AGENTS.md |
| `services/web/` | AGENTS-only | symlink CLAUDE.md → AGENTS.md |
Proceed? (waiting for confirmation)
Wait for confirmation before making changes. The subtree table must show the action per subtree, not a passive observation. The user should be able to approve subtree migration in one step alongside the root migration.
Create directories if they do not exist:
.agents/skills/.claude/commands/<name>.md (flat commands)For each file:
.agents/skills/<name>/ directory---):
name: <name> after the opening --- if not already presentname: and description: (derive description from the first heading or paragraph).agents/skills/<name>/SKILL.md.claude/skills/<name>/ (directory skills)For each directory:
.agents/skills/<name>/SKILL.md and add name: <name> to frontmatter if missing.agents/skills/For each existing canonical skill:
SKILL.md and verify name: field exists in frontmatterIf the Step 1 subtree scan found any subtree-level CLAUDE.md / AGENTS.md files, walk each entry from the approved per-subtree table and apply the action. Use git mv for tracked files so history is preserved. Always create a relative symlink within the subtree (e.g., cd engine/ && ln -s AGENTS.md CLAUDE.md).
Per-state actions:
git mv <subtree>/CLAUDE.md <subtree>/AGENTS.md, then create symlink <subtree>/CLAUDE.md → AGENTS.md.<subtree>/CLAUDE.md → AGENTS.md.git rm <subtree>/CLAUDE.md, then create symlink <subtree>/CLAUDE.md → AGENTS.md.<subtree>/AGENTS.md (apply the Step 7 "Validation: divergent-content merge" rules), then git rm <subtree>/CLAUDE.md and create symlink <subtree>/CLAUDE.md → AGENTS.md.AGENTS.md; otherwise repair it.After processing all subtrees, sanity-check that every former CLAUDE.md location now resolves to its AGENTS.md sibling: find . -name CLAUDE.md -not -path './.git/*' -exec test -L {} \; -exec readlink {} \; -print.
.claude/skills/ should be a symlink to .agents/skills/ so Claude Code discovers the canonical skills. Codex discovers skills directly from .agents/skills/ — no additional symlink needed.
.claude/skillsClaude Code discovers skills from .claude/skills/. After migration, the original .claude/commands/ and .claude/skills/ should point to .agents/skills/.
If .claude/skills is a symlink: update it to point to .agents/skills
If .claude/skills is a directory with content: the content was already migrated in Step 4. Replace the directory with a symlink to .agents/skills/.
If .claude/skills does not exist: create .claude/ directory if it does not exist, then create a symlink .claude/skills pointing to ../.agents/skills
Remove .claude/commands/ if it was fully migrated (all files moved to .agents/skills/). If some files remain that were not migrated, leave them.
If AGENTS.md does not exist at the repo root, create it:
# AGENTS.md
Project-level instructions for AI coding agents.
## Cross-Agent Skills
Skills in this repository follow the [Agent Skills](https://agentskills.io) open standard.
### Canonical Source
All skill logic lives in `.agents/skills/<name>/SKILL.md`.
### Agent Discovery
| Agent | Discovery Path | Mechanism |
|-------|---------------|-----------|
| Claude Code | `.claude/skills/` | Symlink to `.agents/skills/` |
| OpenAI Codex | `.agents/skills/` | Direct (scans `.agents/skills` from CWD to repo root) |
| GitHub Copilot | `.github/copilot-instructions.md` | Routing file |
If AGENTS.md already exists, read it. If it does not contain a "Cross-Agent Skills" section, append one.
The goal is for CLAUDE.md to be a symlink to AGENTS.md so both Claude Code and Codex share the same instructions. Claude Code requires uppercase CLAUDE.md for discovery — lowercase claude.md will not be found.
If claude.md (lowercase) exists: rename it to CLAUDE.md first (git mv claude.md CLAUDE.md if tracked, otherwise mv). Then proceed with the checks below.
If CLAUDE.md does not exist: create a symlink CLAUDE.md pointing to AGENTS.md.
If CLAUDE.md exists and is already a symlink to AGENTS.md: skip.
If CLAUDE.md exists with content (not a symlink):
When both CLAUDE.md and AGENTS.md exist with different content (not just one missing), the merge MUST preserve the substantive content of both files. Naive section-level appending can silently drop content if a section header matches but the body diverges (e.g., one file says try devbox first → fallback to bundle exec, the other just says bundle exec rubocop).
Before committing the merged AGENTS.md and replacing CLAUDE.md with a symlink:
#), every fenced code block, and every sentence longer than ~30 characters that isn't pure boilerplate.grep -F for each extracted snippet against the merged AGENTS.md. Any snippet that does not appear in the merged file indicates content was dropped.Apply the same validation when merging subtree CLAUDE.md / AGENTS.md pairs (Step 4.5 acting on a Step 1 subtree scan classified as "Both, divergent"). Step 4.5 explicitly delegates the divergent-merge rules to this section, so the grep -F snippet check applies identically there.
Create .github/copilot-instructions.md if it does not exist:
# Copilot Instructions
## Repository Contract
Read AGENTS.md at the repository root for project-wide instructions.
## Skill Routing
When a user invokes a skill (e.g., "run the review skill", "use /calendar"):
1. Look in .agents/skills/<name>/SKILL.md for the skill definition.
2. Read the full SKILL.md and execute its instructions.
3. If the skill is missing, list available skills and ask the user to choose.
## Available Skills
[LIST_OF_SKILLS]
Replace [LIST_OF_SKILLS] with a table of all skill names and descriptions from the .agents/skills/ directory.
If the file already exists, check if it has a "Skill Routing" section. If not, append one.
Verify the setup by checking:
.agents/skills/*/SKILL.md has a name: field in frontmatter.claude/skills is a symlink pointing to .agents/skillsAGENTS.md existsCLAUDE.md is a symlink to AGENTS.md.github/copilot-instructions.md existsclaude.md existsCLAUDE.md (any depth ≥ 2) is a symlink resolving to a sibling AGENTS.md. Run: find . -name CLAUDE.md -not -path './.git/*' -not -path './CLAUDE.md' and verify each is -L (symlink) with readlink returning AGENTS.md.grep -F snippet check (Step 7 validation) was applied. If unsure, re-run the grep against the source content captured before the merge.Report results. If any checks fail, explain what needs fixing and offer to fix it.
Present a final summary:
## Cross-Agent Setup Complete
### Skills Migrated
| Skill | Source | Status |
|-------|--------|--------|
| review | .claude/commands/ | Migrated |
| pdf | .claude/skills/ | Migrated |
| ... | ... | ... |
### Infrastructure
- [x] .agents/skills/ (N skills)
- [x] AGENTS.md
- [x] CLAUDE.md symlink
- [x] .claude/skills symlink
- [x] .github/copilot-instructions.md
### Agent Compatibility
| Agent | Discovery | Status |
|-------|-----------|--------|
| Claude Code | .claude/skills/ symlink | Ready |
| Codex | .agents/skills/ (direct) | Ready |
| Copilot | .github/copilot-instructions.md | Ready |
### Next Steps
- Review AGENTS.md for project-specific instructions
- Commit the changes
- Add new skills to .agents/skills/<name>/SKILL.md
claude.md: Claude Code requires uppercase CLAUDE.md. If claude.md exists, rename it (git mv if tracked, mv otherwise) before proceeding with Step 7. Use ls -1 | grep '^claude\.md$' for detection — test -f is unreliable on case-insensitive filesystems (macOS default).development
Walk every unresolved review thread on a PR, triage each one, reply with a rationale of whether or not the comment will be acted upon, make the code change if warranted, and mark the thread resolved. Use when the user asks to address only the open PR comments without re-running CI, respond to review feedback, resolve review threads, or clear bot comments on a PR.
tools
Iteratively run /rereview, fix the findings, and loop until reviewers approve clean. Use for iterative automated review, when you want /rereview to loop until clean, or for a paranoid pre-merge review that auto-addresses every blocker.
development
Generate self-contained HTML visualizations with Plannotator theming. Use for implementation plans, PR explainers, architecture diagrams, data tables, slide decks, and any visual explanation of technical concepts. Plans and PR explainers follow Plannotator's prescriptive approach; all other visual content delegates to nicobailon/visual-explainer.
development
Create reviewed Codex goal setup packages for long-running /goal work. Use when the user wants to turn an idea, backlog, project mission, or vague objective into durable goal files under a project goals slug folder, with Plannotator review gates for brief, narrative plan with acceptance criteria, verification, blockers, and the final /goal prompt.