Sets up and repairs symlinks so multiple AI coding agents (Claude Code, Gemini, Copilot, Codex, Cursor) share one AGENTS.md and one .agents/skills/ as the single source of truth. Includes --check, --status, --minimal, and --root modes.
Ships in mr-kelly-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Every AI coding agent reads its own rules file and its own skills directory. This skill keeps one real copy of each and points the rest at it with symlinks.
/agent-rules # create or repair links in the current project
/agent-rules --check # verify; exits 1 when something is broken
/agent-rules --status # report only, never fails
/agent-rules --minimal # skip links agents no longer need
/agent-rules --root <path> # operate on a project other than $PWD
The target project is the git toplevel of your working directory (or $PWD
outside a repo), not wherever this skill happens to be installed.
Two sources, edited by hand:
AGENTS.md at the project root.agents/skills/<skill-name>/SKILL.mdEverything else is a symlink into those two.
AGENTS.md ← edit rules here
.agents/skills/ ← edit skills here
↓ symlinks ↓
CLAUDE.md → AGENTS.md
.gemini/GEMINI.md → ../AGENTS.md
.github/copilot-instructions.md → ../AGENTS.md (legacy)
.cursor/rules/main.md → ../../AGENTS.md (legacy)
.kiro/steering/main.md → ../../AGENTS.md (legacy)
.claude/skills/ → ../.agents/skills
.kiro/skills/ → ../.agents/skills
.github/skills/ → ../.agents/skills (legacy)
.codex/skills/ → ../.agents/skills (legacy)
.agents/skills/ and AGENTS.md are now read natively by several agents, so
some links exist purely for older versions. --check treats a missing legacy
link as a warning and a missing required link as an error.
| Agent | Rules | Skills | Tier |
|---|---|---|---|
| Claude Code | CLAUDE.md → | .claude/skills/ → | required — reads neither AGENTS.md nor .agents/skills |
| Gemini CLI | .gemini/GEMINI.md → | N/A | required — AGENTS.md only via context.fileName in settings.json |
| Kiro | .kiro/steering/main.md → | .kiro/skills/ → | skills required; rules legacy (reads root AGENTS.md) |
| GitHub Copilot | .github/copilot-instructions.md → | .github/skills/ → | legacy — reads AGENTS.md and .agents/skills natively |
| OpenAI Codex | AGENTS.md | .codex/skills/ → | legacy — scans .agents/skills from CWD up to the repo root |
| Cursor | .cursor/rules/main.md → | N/A | legacy — reads AGENTS.md natively |
Verified against vendor documentation on 2026-09-07. Run --status to see which
links a project still carries.
Known quirk: some Kiro builds do not follow a symlinked steering file. If Kiro
ignores your rules, replace .kiro/steering/main.md with a real copy.
vim AGENTS.md # edit rules once, every agent sees it
mkdir -p .agents/skills/my-skill # add a skill once, every agent sees it
vim .agents/skills/my-skill/SKILL.md
AGENTS.md — single source for rules.agents/skills/ — single source for skillsCLAUDE.md holds hand-written
content, it is left alone and reported; --force moves it to CLAUDE.md.bak
first. (An exact copy of AGENTS.md is replaced silently — nothing is lost.)git config core.symlinks true; --check warns when
the repo is configured otherwise.Not symlinked. Formats differ (.json vs .toml), settings are
agent-specific, and the files may hold API keys.
.claude/mcp.json · Kiro: .kiro/mcp.json · Cursor: .cursor/mcp.json · Codex: .codex/config.tomlSync them manually if you need to.
scripts/agent-rules.sh — entry point (--check / --status / --fix)scripts/create-symlinks.sh — create and repair linksscripts/verify-architecture.sh — verify; exit code reflects the resultscripts/lib.sh — shared link table used by all threescripts/test-agent-rules.sh — self-test (bash scripts/test-agent-rules.sh)Each script runs standalone and works on whichever project you are standing in.
| Symptom | Fix |
|---|---|
| Link broken or pointing elsewhere | /agent-rules |
A stray skills entry inside .agents/skills/ | /agent-rules removes it (planted by v4) |
--check fails on a link you do not want | --minimal layout, or drop the agent from scripts/lib.sh |
| Agent still cannot see a skill | confirm .agents/skills/<name>/SKILL.md exists |
Version: 5.0 Last Updated: 2026-09-07
Changes since 4.0:
--check used to inspect the wrong directory whenever the skill
was not vendored into the projectln -sfn; re-running no longer plants a broken
.agents/skills/skills link inside the source directoryagent-rules
itself be vendored into the project it checks--force backs them upWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
symlinks, multi-agent, repo-setup, agent-config, rules-management
Other plugins' skills for the same job
/mr-kelly-skills:agent-rulesfrom mr-kelly-skills
npx claudepluginhub mr-kelly/skills --plugin mr-kelly-skills25 skills in this plugin
/kelly-adsAd-campaign command desk (投放指挥台, Busabase App-in-Skill) for a cross-border e-commerce seller running Amazon Ads, Meta (FB/IG), TikTok Ads, and Google Ads. Use when the user invokes $kelly-ads or /kelly-ads, or asks about 投放, ad campaigns, ad spend, ACOS, ROAS, Amazon Ads, TikTok ads, Meta ads, Google Ads, search terms, negative keywords, bid adjustment, budget pacing, CPC spikes, rejected ads, ad anomaly detection, 广告优化, or reviewing agent-proposed adjustment cards (negative keyword, bid down/up, pause target, budget shift, creative refresh)./kelly-app-skill-creatorDesign and create Busabase-backed App-in-Skill packages with a canonical app project, Busabase-native setup and product onboarding, review/execution workflows, a standardized responsive UI, and AirApp-first delivery. Use when a user wants a Busabase research desk, review queue, planner, action console, operating dashboard, control panel, collaboration workspace, onboarding/readiness flow, or an existing Kelly App-based skill updated. Every generated skill contains a complete app/ project, deploys that source to Busabase AirApp by default, runs pnpm dev only when local preview is explicitly requested, follows the Kelly desktop and phone UI contract, delegates AirApp runtime, SDK, security, scaffolding, and deployment constraints to busabase-app-creator, and delegates repository-level conformance testing to kelly-app-skill-creator-tests.