agents-sync
Skill5 starsChanged 6 months agoMITView on GitHub
Generate and sync AI context files (AGENTS.md, CLAUDE.md, .cursorrules, copilot-instructions.md, GEMINI.md, .windsurfrules, .clinerules, .roomodes, CONVENTIONS.md, .kiro/steering/, .trae/rules/) from your codebase. One canonical source, every tool stays current.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Quarktex/qcobraintheir own version, first seen Aug 2, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Quarktex/qcobrain★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 5 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Add to your Claude Code MCP config (.claude/settings.json or ~/.claude/claude_desktop_config.json):
- Distinctive: line 55
When to use: After major refactors, new dependencies, architecture changes.
- Very specific: line 58
Add --fast to skip Claude API call when drift is minor (re-derives from existing AGENTS.md, still refreshes MCP + codegraph sections for …
- Very specific: line 59
Add --dry-run to preview changes without writing
- Distinctive: line 71
When to use: After manually editing AGENTS.md and wanting all tool files to reflect the changes immediately.
- Distinctive: line 81
Check what changed in your codebase since the last sync.
- Distinctive: line 104
Check whether all managed files are in sync with AGENTS.md.
- Very specific: line 114
Verify the codebase against mechanically-checkable Never rules in AGENTS.md.
- Very specific: line 145
Use --no-session-hook to install only the pre-commit hook.
- Very specific: line 154
When the user types /agents-sync <command>, call the corresponding MCP tool:
- Very specific: line 170
Determine
projectPath: Use the current working directory. - Distinctive: line 187
Add AGENTS.md to git
- Very specific: line 188
Add .agents-sync/ to .gitignore
- Very specific: line 208
Add this anywhere in AGENTS.md, CLAUDE.md, .cursorrules, etc.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
agents-sync
Generate and sync AI context files across every coding tool you use.
Prerequisites
Add to your Claude Code MCP config (.claude/settings.json or ~/.claude/claude_desktop_config.json):
{
"mcpServers": {
"agents-sync": {
"command": "npx",
"args": ["@googlarz/agents-sync"],
"env": { "ANTHROPIC_API_KEY": "sk-ant-..." }
}
}
}Then restart Claude Code to connect.
Commands
/agents-sync init
First-time setup. Reads your codebase and generates all context files.
When to use: New project, or starting from scratch.
What it does:
- Scans your codebase (manifests, structure, source samples, docs, TODO/FIXME comments)
- Extracts project metadata via Claude API
- Generates canonical
AGENTS.md - Derives
CLAUDE.md,.cursorrules,.github/copilot-instructions.md,GEMINI.md,.windsurfrules,.clinerules,.roomodes,CONVENTIONS.md,.kiro/steering/agents-sync.md,.trae/rules/agents-sync.md - Saves a snapshot for drift detection
Usage:
Run
/agents-sync initon this project
Claude will call agents_sync_init with the current project path.
/agents-sync sync
Re-sync after your codebase has changed. Preserves any manual customizations.
When to use: After major refactors, new dependencies, architecture changes.
Options:
- Add
--fastto skip Claude API call when drift is minor (re-derives from existing AGENTS.md, still refreshes MCP + codegraph sections for free) - Add
--dry-runto preview changes without writing
Usage:
Sync my AI context files
/agents-sync sync --fast
/agents-sync derive
Re-derive all tool files from the current AGENTS.md without re-running the scanner or calling the Claude API.
When to use: After manually editing AGENTS.md and wanting all tool files to reflect the changes immediately.
Usage:
/agents-sync deriveI edited AGENTS.md, update all tool files
/agents-sync drift
Check what changed in your codebase since the last sync. Read-only.
Usage:
What's drifted in my AI context files?
/agents-sync drift
/agents-sync export [tool]
Re-derive a single tool file without re-running analysis.
Tools: claude, cursor, copilot, gemini, windsurf, cline, roo, aider, kiro, trae
Usage:
/agents-sync export cursorRegenerate just my .cursorrules/agents-sync export kiro
/agents-sync validate
Check whether all managed files are in sync with AGENTS.md.
Usage:
/agents-sync validateAre my AI context files in sync?
/agents-sync lint
Verify the codebase against mechanically-checkable Never rules in AGENTS.md.
Usage:
/agents-sync lint
/agents-sync status
Show sync status: last sync time, managed files, drift score.
Usage:
/agents-sync status
/agents-sync scan
Show what the scanner detected — language, framework, dependencies, MCP servers. No API key needed.
Usage:
/agents-sync scan
/agents-sync install-hook
Install two hooks:
- Pre-commit — blocks commits when AI context files have drifted (auto-detects husky, lefthook, or plain git)
- Claude Code SessionStart — writes
.claude/settings.jsonhook that auto-loadsAGENTS.mdas context at session start
Use --no-session-hook to install only the pre-commit hook.
Usage:
/agents-sync install-hook
How Claude Should Handle These Commands
When the user types /agents-sync <command>, call the corresponding MCP tool:
| Command | MCP Tool | Required params |
init | agents_sync_init | projectPath = cwd |
sync | agents_sync_sync | projectPath = cwd |
derive | agents_sync_derive | projectPath = cwd |
drift | agents_sync_drift | projectPath = cwd |
export <tool> | agents_sync_export | projectPath = cwd, tool = argument |
validate | agents_sync_validate | projectPath = cwd |
lint | agents_sync_lint | projectPath = cwd |
status | agents_sync_status | projectPath = cwd |
scan | agents_sync_scan | projectPath = cwd |
install-hook | agents_sync_install_hook | projectPath = cwd |
uninstall-hook | agents_sync_uninstall_hook | projectPath = cwd |
Determine projectPath: Use the current working directory. If ambiguous, ask the user which project to target.
If MCP not connected: Respond with:
agents-sync MCP server is not connected. Add this to your Claude Code settings and restart:
{ "mcpServers": { "agents-sync": { "command": "npx", "args": ["@googlarz/agents-sync"], "env": { "ANTHROPIC_API_KEY": "sk-ant-..." } } } }
After init: Remind the user to:
- Add
AGENTS.mdto git - Add
.agents-sync/to.gitignore
After sync: Show the list of files updated.
Flags parsing:
--fast→ setfast: trueinagents_sync_sync--dry-run→ setdryRun: true--strict/--ci→ setstrict: trueinagents_sync_validate
Custom Sections
Users can add permanent customizations to any managed file that survive re-syncs:
<!-- AGENTS-SYNC:CUSTOM:START -->
When working on the payments module, always check with @alice first.
Use staging Stripe keys (in .env.staging) for all local testing.
<!-- AGENTS-SYNC:CUSTOM:END -->Add this anywhere in AGENTS.md, CLAUDE.md, .cursorrules, etc. Re-sync preserves it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

