From memex
Audits and syncs agent instruction files across coding agents like Claude Code, Cursor, Copilot, Gemini ensuring AGENTS.md matches targets (CLAUDE.md, .cursorrules). First-run scaffolding check; syncs after edits.
npx claudepluginhub iamtouchskyer/memex --plugin memexThis skill uses the workspace's default tool permissions.
Agent instruction files ensure every coding agent (Claude Code, Codex, Copilot, Cursor, Gemini, Windsurf/Anti-Gravity) reads the same project rules when working on this codebase.
Audits and syncs AI agent configuration files (CLAUDE.md, CODEX.md, AGENTS.md, .cursorrules, hooks, settings) across workspaces for drift, duplicates, and staleness.
Audits and writes AGENTS.md files using execution-first standards, checking commands, gotchas, and signal-to-noise ratio. Use to review, refactor, score, or improve agent instructions.
Generates, validates, and updates AGENTS.md files for AI agent onboarding to projects. Detects stacks, extracts commands/CI rules/architecture, verifies freshness and executability.
Share bugs, ideas, or general feedback.
Agent instruction files ensure every coding agent (Claude Code, Codex, Copilot, Cursor, Gemini, Windsurf/Anti-Gravity) reads the same project rules when working on this codebase.
Single source of truth: AGENTS.md
All other files are copies, synced automatically:
| File | Agent(s) |
|---|---|
AGENTS.md | Codex CLI, GitHub Copilot (source of truth) |
CLAUDE.md | Claude Code |
GEMINI.md | Gemini CLI, Jules, Anti-Gravity |
.cursorrules | Cursor |
.windsurfrules | Windsurf / Anti-Gravity (legacy) |
Sync mechanisms (4 layers):
scripts/postbuild.mjs — npm run build copies AGENTS.md → all targetsscripts/pre-commit — git hook blocks commit if any file has driftedtests/integration/agent-docs-consistency.test.ts — npm test fails on driftnpm test on push/PR to mainRun a full scaffolding check:
/agent-prompts-warmup audit
Checklist to verify:
AGENTS.md exists and is non-emptyCLAUDE.md, GEMINI.md, .cursorrules, .windsurfrulesAGENTS.md (diff -q)scripts/postbuild.mjs has cpSync lines for all targetstests/integration/agent-docs-consistency.test.ts tests all targetsscripts/pre-commit exists and checks all targets.git/hooks/pre-commit is installed and executable (run npm run prepare if not)package.json files field includes AGENTS.md, CLAUDE.md, GEMINI.md, docspackage.json has "prepare" script that installs the hookIf anything fails: fix it immediately. The fix is usually npm run build (syncs files) or npm run prepare (installs hook).
When the user edits AGENTS.md (or asks you to):
AGENTS.md — never edit the copies directlynode scripts/postbuild.mjs (or npm run build)npm test -- tests/integration/agent-docs-consistency.test.tsWhen a new coding agent emerges that reads a different file:
.devinrules, CLINE.md)scripts/postbuild.mjs — add cpSync("AGENTS.md", "<new-file>");tests/integration/agent-docs-consistency.test.ts — add expect(readFileSync("<new-file>", "utf-8")).toBe(agents);scripts/pre-commit — add the new file to the TARGETS arraycp AGENTS.md <new-file>package.json files arraynpm test to verify"ERROR: CLAUDE.md has drifted from AGENTS.md"
→ Someone edited a copy instead of AGENTS.md. Fix: cp AGENTS.md CLAUDE.md (or whichever file drifted). Then check if the edit in the copy should be applied — if so, edit AGENTS.md first, then npm run build.
Pre-commit hook not running
→ npm run prepare to reinstall. Or manually: cp scripts/pre-commit .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit
CI failing on agent docs
→ npm run build && npm test locally. If it passes locally but fails in CI, check that the build step runs before test in the workflow.
// scripts/postbuild.mjs
cpSync("AGENTS.md", "CLAUDE.md"); // Claude Code
cpSync("AGENTS.md", "GEMINI.md"); // Gemini CLI / Jules / Anti-Gravity
cpSync("AGENTS.md", ".cursorrules"); // Cursor
cpSync("AGENTS.md", ".windsurfrules"); // Windsurf / Anti-Gravity (legacy)