Manage AI assistant config files across tools. USE FOR: initializing AI configs for a new repo (AGENTS.md, CLAUDE.md, copilot-instructions.md, .cursorrules, GEMINI.md, etc.); adding a config for a newly adopted AI tool; detecting drift between multiple co-existing AI config files; updating preferences across all active configs; detecting when tooling changes (linter, framework, test runner) are not yet reflected in AI configs. Triggers on: 'set up AI configs', 'add Cursor config', 'my copilot instructions are out of date', 'sync my AI configs', 'check if my AI configs match the stack', 'onboard Claude Code'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/feima-awesome-harness:ai-config Optional: pass a mode to skip detection — init | add <tool> | check | edit | driftOptional: pass a mode to skip detection — init | add <tool> | check | edit | driftThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Detect, create, sync, and drift-check AI assistant configuration files in a repo. Works with whatever the user already has. Never introduces a skill-owned state file.
Detect, create, sync, and drift-check AI assistant configuration files in a repo. Works with whatever the user already has. Never introduces a skill-owned state file.
Before starting, load the reference file for the current agent environment and follow its tool guidance:
Load the full adapter details (file names, locations, format rules, sentinel syntax) from:
Quick reference:
| Tool | File(s) | Location |
|---|---|---|
| Shared / generic | AGENTS.md | repo root |
| Claude Code | CLAUDE.md | repo root (+ sub-dirs) |
| GitHub Copilot | copilot-instructions.md | .github/ |
| Copilot file-scoped | *.instructions.md | .github/instructions/ |
| Cursor | *.mdc rules | .cursor/rules/ |
| Gemini CLI | GEMINI.md | repo root |
| Cline | .clinerules | repo root |
| Windsurf | .windsurfrules | repo root |
| Cursor legacy | .cursorrules | repo root |
Unless a mode was passed as an argument, always run detection first.
Scan the repo for all known config files (see table above). Collect every file found.
| Situation | Mode |
|---|---|
| No configs found | init |
Configs found + argument says add <tool> | add |
Configs found + argument says check or drift | check or drift |
Configs found + argument says edit | edit |
| Multiple configs found, no argument | surface sync check first, then ask what user wants to do |
| One config found, no argument | ask: update, add a tool, or check drift? |
When two or more config files are found, before doing anything else:
"I found configs for [list tools]. Let me quickly check if they agree on the key things."
Run a lightweight cross-config comparison (see check mode below). Report any divergences immediately. Ask if the user wants to fix them before continuing to their original request.
init — No configs existExplain briefly: "You have no AI assistant config files yet. The most portable starting point is AGENTS.md — it's read by Claude Code, GitHub Copilot, Windsurf, and others without any tool-specific setup."
Ask: which AI tools does the team use? (multi-select)
GitHub Copilot (default)Claude CodeCursorGemini CLIClineWindsurfOther (free text)If called from repo-init with pre-filled context: skip this question and use the passed tool list.
Ask the preference questions (skip any already provided by repo-init):
bash, zsh, fish, PowerShell, No preferenceConventional Commits, Gitmoji, No preference, OtherAsk before destructive, Auto-approve safe / ask for destructive, Minimal confirmationsDecide which files to create:
AGENTS.md as the shared base.Write files. Use sentinel comments to wrap generated sections (see Adapter reference → Sentinel Format).
Confirm what was created and suggest next steps: add more tools (add), or run check after future tooling changes.
add — Onboard a new toolAsk which tool to add (if not passed as argument). Show only tools that don't already have a config file.
Read all existing config files to extract current preferences (tools, conventions, methodology, shell).
Generate the new tool's config file using the extracted preferences + the adapter format. Wrap generated sections in sentinels.
Show a diff preview and confirm before writing.
check — Cross-config sync checkGoal: surface meaningful divergences between config files, not formatting noise.
For each config file, extract the following dimensions using the Adapter reference extraction hints:
Cross-compare all files on each dimension. Flag only where two files explicitly disagree (one says X, another says Y). Omissions are not flags — a file that doesn't mention the linter is not wrong.
For each divergence, show:
Divergence: linter
CLAUDE.md → Ruff
copilot-instructions.md → Flake8
→ Which is current? [Ruff / Flake8 / Both intentional (suppress)]
For each resolved divergence: update all affected files (only within sentinel blocks or by appending if no sentinel exists). Never touch user-written content outside sentinels.
If no divergences: confirm "All configs agree on the key dimensions."
edit — Update a preference across all configsAsk what the user wants to change (free text, e.g. "switch linter to Biome", "add conventional commits rule").
Identify which files contain the relevant preference.
For each file: locate the relevant line(s) within sentinel blocks. If the preference is inside a sentinel block, update it. If it's in user-written content, highlight it and ask before touching it.
Show a preview of all changes across all files. Confirm before writing.
drift — Tooling vs config consistency checkGoal: detect when the actual stack has changed but AI configs haven't caught up.
Load the full list of drift signal files and extraction rules from:
Procedure:
Scan for stack signal files: package.json, pyproject.toml, go.mod, Cargo.toml, *.eslintrc*, biome.json, ruff.toml, .tool-versions, .nvmrc, Dockerfile, etc. (full list in drift signals reference).
Extract named tools from each signal file (runtime version, linter, formatter, test runner, package manager).
For each AI config, extract the same dimensions (reuse check mode extraction).
Cross-compare: flag where a config mentions a tool that no longer appears in any stack signal file, or where a signal file mentions a tool that no config mentions.
Use git to add recency context:
git log -1 --format="%ar" -- <signal-file>
Only flag signal files changed more recently than the config that should reflect them.
Report findings as actionable items:
Drift detected:
copilot-instructions.md says: Jest
package.json now has: Vitest (changed 3 days ago)
→ Update copilot-instructions.md? [Yes / No / Suppress]
For each accepted fix: apply via edit mode logic. For suppressions: add an inline comment <!-- ai-config:suppress jest-mention --> immediately after the flagged line.
Structure drift — second pass (always run after tooling checks):
a. Stale path check — extract all path-like strings from each AI config (backtick-quoted or inline paths containing /). For each path, check whether it still exists in the repo. Flag missing paths at Medium severity.
Stale path in AGENTS.md:
`packages/legacy-api/` — directory no longer exists
→ Remove or update this reference? [Update / Remove / Suppress]
b. Undocumented directory check — scan top-level and second-level dirs (for monorepos: packages/*, apps/*, services/*). Skip tooling/hidden dirs (node_modules, .git, dist, build, etc.). For each significant directory added more recently than the oldest AI config, check if any config mentions it. Surface undocumented ones at Low severity.
Undocumented directory: packages/payments-service/
Added 5 days ago. No AI config mentions it.
→ Add a brief description to AGENTS.md? [Yes / No / Suppress]
If the user says Yes: ask for a one-sentence description, then insert it into the target config under a ## Project Structure sentinel block.
Full extraction rules, path patterns, skip lists, and the structure section template are in the Drift signals reference → Structure Drift.
These rules apply to every write operation across all modes:
Sentinel blocks are the safe zone. Generated content always lives inside:
<!-- ai-config:generated:<section-name> -->
...content...
<!-- ai-config:end -->
For .mdc files (Cursor), use YAML comments: # ai-config:generated:<section> / # ai-config:end.
Never modify content outside sentinels unless the user explicitly asks.
First-time writes (no existing sentinels): wrap the entire generated file in a sentinel block so future syncs know what is safe to touch.
Suppression markers <!-- ai-config:suppress <id> --> are user-written and must never be removed.
Before any write: show the user a clear before/after diff and get confirmation.
repo-init)When repo-init calls this skill, it may pass a context object with pre-filled answers:
tools: [copilot, claude]
shell: bash
commit_style: conventional commits
confirmation: ask-before-destructive
extra: ["never modify test files without asking"]
methodology: spec-driven
stack:
runtime: Node.js
linter: ESLint + Prettier
test: Vitest
When any of these keys are present, skip the corresponding question and use the provided value. Announce which values were pre-filled: "Using choices from repo-init: tools (Copilot, Claude Code), shell (bash)." so the user can correct anything before proceeding.
AGENTS.md for new setups. It has the broadest native support and avoids vendor lock-in.Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub feimacode/feima-awesome-harness --plugin feima-awesome-harness