rpa-gen-rules: project rules for agents

rpa-gen-rules

Skill that generates matching project rules for Cursor, Claude Code and Codex built around layered development and BDD

  • 2 ★ on the repository
  • Last commit
  • MIT
Skill

Extended access

Why this level

  • Writes a Python hook for Codex into the project that runs during sessions
All reasons and checks

evilfreelancer/rpa-gen-rules

Install

Manual install

/plugin marketplace add EvilFreelancer/rpa-skills
/plugin install rpa-gen-rules@rpa-skills

Install from the rpa-skills catalog.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Writes a Python hook for Codex into the project that runs during sessions

This is third-party code. Review the repository files before installing.

What it does

Using the repository's code, specs and docs, the skill creates or refreshes agent rules: .cursor/rules/*.mdc, CLAUDE.md with .claude/rules and a root AGENTS.md. The rules require building the project in layers, from modules with no internal dependencies upward, and working test-first. Every rule gets a mandatory sync step so a change for one agent lands in all trees in the same commit. For Codex it installs a hook bridge that attaches Cursor rules by glob.

Who it is for. Teams and developers who use several agents in one repository and want the same rules for all of them.

Good fit when

  • The project has no agent rules yet and they should be inferred from code
  • Cursor, Claude Code and Codex rules have drifted apart and need syncing
  • You want the agent to follow layered development and tests before code

Not a fit when

  • You use a single agent and are happy with your existing rules
  • Your team does not practice test-driven development

Example request

/rpa-gen-rules generate rules for this repository

Limitations

Generated rules are written in English by default. Testing templates are pytest-oriented. After the Codex bridge is installed you must run /hooks once to trust the hook.

How to disable. Remove the plugin via /plugin in Claude Code or delete the rpa-gen-rules folder from the agent's skills directory.

FAQ

Can the rules be in Russian?

Yes, if you ask explicitly. The language is then applied to every rules tree at once.

Discussion

No questions or reviews yet.

Skills

Agent rules from programming books

AI agents Rules / Skills from Programming Books

Skills and AGENTS.md rules distilled from classic books: Clean Code, Refactoring, DDD, Clean Architecture, DDIA and more

SkillMinimal access3.1KRepository stars

A CLI that keeps agent instructions in one place and distributes them to the right config files for Claude Code, Cursor, Codex, Copilot and two dozen other tool

CLIExtended access3KRepository stars

A CLI that keeps rules, commands, MCP, subagents and skills in one source and generates config files for many AI coding tools

CLIExtended access1.6KRepository stars

Eleven skills take an agent from an idea to verified code through a PRD and RFCs kept as files in the repository

SkillExtended access305Repository stars

A skill for second-agent review of plans or code: Claude Code starts rounds, Codex reviews, and they exchange files

SkillExtended access5Repository stars
Russian stack

Rules, subagents, skills and MCP integrations for 1C:Enterprise 8 development with Cursor, Claude Code, Codex and other agents

PluginBroad access520Repository stars

README in short

The skill creates agent rules for Cursor, Claude Code and Codex following a layered-cake model and BDD style. No separate user brief is needed; the agent infers rules from the repository. Codex gets a hook bridge that reads .cursor/rules directly. The skill is part of Pavel Rykov's rpa-skills collection and is packaged from the cursor-vibe-prompts prompt set. MIT license.

README badge

Original SKILL.md

---
name: rpa-gen-rules
version: 1.3.0
description: >
  Run when the user invokes /rpa-gen-rules or asks to create or refresh agent project rules (Cursor .mdc,
  Claude Code CLAUDE.md and .claude/rules, Codex .codex hook bridge). Infers from specs, docs, and code.
  Rules use a layered-cake model (implement inner layers with no dependencies first, then the next layer)
  and BDD-style delivery. Generated rules and AGENTS.md are written in English unless the user asks for
  another language. Generated rules include a mandatory Rules Sync step so changes to one agent's tree are
  mirrored to every other agent's tree (Cursor <-> Claude <-> Codex <-> AGENTS.md) in the same commit.
  For Codex the skill installs a hook bridge that auto-attaches Cursor rules by glob, like Cursor and
  Claude Code do natively. No separate user brief required.
---

# RPA generate project rules (layered + BDD, multi-agent)

## Goal

Produce or update **versioned** instructions so the agent stays inside architecture, style, and **BDD-style** discipline (behavior specified in tests, tests before new behavior, full suite before calling work done).

- **Layered cake** - rules must tell the agent to build **by layers**: first units that depend on nothing inside the project, then layers that depend only on lower layers, and so on. Mirror this in `architecture` and `implementation-order` style files.
- **Cursor** - `.cursor/rules/*.mdc` ([MDC](https://github.com/nuxt-content/mdc), `globs`, `alwaysApply`, `@` links).
- **Claude Code** - `CLAUDE.md` and `.claude/rules/*.md` with optional YAML `paths:` ([memory](https://code.claude.com/docs/en/memory#organize-rules-with-claude/rules/)).
- **Codex** - root `AGENTS.md` plus a `.codex/` hook bridge (`hooks.json`, `hooks/attach_rules.py`, `rules.md` index) that injects `.cursor/rules/*.mdc` into Codex sessions: `alwaysApply` rules at `SessionStart`, glob-matched rules on `PreToolUse` - the same behavior Cursor and Claude Code have natively.

## Language of generated files: English by default

Everything this skill writes into the target project is **written in English** unless the user explicitly asks for another language:

- top-level briefs - `AGENTS.md`, root `CLAUDE.md`, `.claude/CLAUDE.md`, `.github/copilot-instructions.md`;
- rule files and their frontmatter - `.cursor/rules/*.mdc`, `.claude/rules/*.md`, and any other agent tree;
- headings, bullets, examples, and comments inside generated code snippets.

Report a problem

Foxx AIrpa-gen-rules: project rules for agents
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.