Create or refresh project instructions with root AGENTS.md as the common baseline, native Cursor and Claude Code rule trees, and an optional Codex project hook that attaches Cursor rules without duplicating their bodies.
The skill can produce:
- root
AGENTS.mdwith repository-wide architecture, workflow, verification, and security invariants; - a root
CLAUDE.mdsymlink or short compatibility import when Claude Code is used; - Cursor
.cursor/rules/*.mdcfiles with correctalwaysApplyandglobssemantics; - Claude Code
.claude/rules/*.mdfiles with correctpathssemantics; .codex/hooks.jsonand.codex/hooks/attach_rules.pywhen Codex support is requested;- synchronized layered-cake and BDD/TDD guidance across deliberate mirrors.
The Codex hook reads .cursor/rules/*.mdc directly. The skill does not generate a separate human-readable Codex rule index. Critical constraints remain in root AGENTS.md, code, tests, permissions, or CI because project hooks can be disabled or untrusted.
Use /rpa-gen-rules when creating, refreshing, auditing, or synchronizing project instructions, especially when Cursor and Claude Code rule trees have drifted.
No separate brief is required. The agent infers the project contract from code, tests, documentation, build files, and CI, and asks only when a real product or architecture decision is missing.
- Repository-wide policy stays in root
AGENTS.md; - layered architecture is implemented from inner dependencies outward;
- new behavior and bug fixes follow RED-GREEN-REFACTOR;
- Cursor and Claude Code mirrors keep equivalent bodies and native frontmatter;
- Claude
pathsmap to CursorglobswithalwaysApply: false; - the Codex hook consumes Cursor rules and is probed before the result is reported;
- unsupported host mechanisms are reported, not invented.
See SKILL.md for the workflow and references/bdd-and-agents.md for detailed host semantics and synchronization guidance.
| Path | Contents |
|---|---|
references/bdd-and-agents.md |
BDD/TDD wording, host capabilities, limits, and Rules Sync |
references/cursor-examples/.cursor/rules/ |
Cursor .mdc templates |
references/claude-examples/.claude/ |
Claude Code CLAUDE.md and modular rule templates |
references/codex-examples/.codex/hooks.json |
Codex hook configuration template |
references/codex-examples/.codex/hooks/attach_rules.py |
Codex hook that reads Cursor rules |
This skill is distributed through the rpa-skills catalog and can also be installed as a plain skill folder.
/plugin marketplace add EvilFreelancer/rpa-skills
/plugin install rpa-gen-rules@rpa-skills
Nothing to install. The skill ships in the standard delivery of Coddy:
the first run writes it into ~/.coddy/skills/rpa-gen-rules/, /rpa-gen-rules works right away, and coddy update
brings a newer version of the skill with each release.
Copy or symlink this repository into a supported skill root:
| Tool | Path |
|---|---|
| Coddy | ~/.coddy/skills/rpa-gen-rules/ |
| Claude Code | ~/.claude/skills/rpa-gen-rules/ |
| Cursor | ~/.cursor/skills/rpa-gen-rules/ |
| OpenAI Codex | ~/.codex/skills/rpa-gen-rules/ |
| Kimi Code CLI | ~/.kimi/skills/rpa-gen-rules/ |
The directory name must match the name field in SKILL.md.
Part of rpa-skills, Pavel Rykov's agent-skills collection.
Packaged from cursor-vibe-prompts and maintained as a reusable multi-host skill.
Licensed under the MIT License. See LICENSE.