agent-rules-books logo

agent-rules-books

AGENTS.md rules / skills for AI coding agents: Codex, Cursor & Claude Code. Inspired by Clean Code, Refactoring, DDD, Clean Architecture and DDIA programming books.

Website GitHub

What is it?

What it is

A repository providing AI agent rules and skills distilled from software engineering books for tools like Codex, Cursor, and Claude Code.

Why it exists

To provide structured, book-inspired rules and skills for AI coding agents to improve code quality, architecture, and refactoring workflows.

Who should use it

Developers using AI coding tools (Codex, Cursor, Claude Code) for refactoring, architecture design, or code quality improvements, especially those applying principles from software engineering books.

Who should avoid it

Users not working with AI coding agents or those seeking full book summaries rather than actionable rules.

How it works

A quick walkthrough in plain English

How agent-rules-books works

Step 1 of 3

You interact with it

Open agent-rules-books, send a request, or connect it to your stack.

Features

Ready-to-use rule sets derived from 12 classic software engineering books
Three versions per rule set: full (canonical), mini (recommended), and nano (compact)
Tool-agnostic Markdown format supporting Codex, Cursor, Claude Code, and GitHub Copilot
Task-specific skills for refactoring, legacy code, reliability, and domain modeling
Comprehensive coverage of code quality, architecture, DDD, refactoring, and data-intensive applications
Detailed release matrix with metrics (lines, rules, size) for each version
Usage documentation with editor-specific setup guides
Compatibility documentation for combining multiple rule sets
MIT licensed for open-source use
Experimental validation showing 74/100 vs 46/100 effectiveness rating

Advantages

  • Transforms theoretical software engineering principles into actionable AI agent instructions
  • Flexible sizing options accommodate different context window constraints
  • Multi-tool compatibility eliminates vendor lock-in
  • Proven effectiveness through empirical testing with Codex
  • Reduces cognitive load by providing concrete rules instead of abstract book references
  • Supports both always-on rules and on-demand skills workflows
  • Covers essential topics from recognized industry experts
  • Enables consistent application of design principles across AI-assisted development

Disadvantages

  • Rules are unofficial interpretations, not official book materials
  • Limited experimental validation scope (single book, one experiment)
  • May require manual adaptation for specific tool implementations
  • Large volume of rules could overwhelm users or agents
  • Not a substitute for reading and understanding original source materials
  • Static rule sets may not adapt to evolving project requirements
  • No quantitative benchmark data beyond initial qualitative experiment
  • Potential for rules to become outdated as tools evolve

Installation

FAQ

How do I choose which rule set to use for my project?

Start with the "mini" version of the rule set that best matches your domain—e.g., "Clean Code" for everyday coding, "Domain-Driven Design" for business‑centric modeling, or "Designing Data‑Intensive Applications" for data‑heavy systems. If you need a more exhaustive reference, use the "full" file; if you have tight context limits, use the "nano" file. The README’s Release Matrix shows line counts and rule counts to help you gauge the size.

What is the difference between mini, nano, and full rule files?

Each book’s rules are shipped in three Markdown variants: - **full** – the complete, canonical source with all rules. - **mini** – a trimmed, recommended subset that covers the core principles while keeping context size reasonable. - **nano** – a very compact fallback for environments with strict token budgets. The Release Matrix lists the size and rule count for each variant.

How can I integrate these rules into Codex, Claude Code, or Cursor?

Follow the instructions in `docs/USAGE.md`. For Codex, add the chosen rule file to your project’s `AGENTS.md`. For Claude Code, copy the rules into `CLAUDE.md` or create a skill. For Cursor, adapt the rules into project rules or keep them as AGENTS.md‑style instructions. The README’s "About" section explains the editor‑specific setup.

Can I combine multiple book rule sets, and how to avoid conflicts?

Yes—combine rule sets that target different concerns (e.g., "Clean Architecture" + "Domain-Driven Design"). Use the compatibility guide in `docs/COMPATIBILITY.md` to ensure the chosen sets don’t overlap or contradict. The README notes that combining multiple books is supported and provides guidance on managing potential conflicts.

What is the recommended workflow for adding a new book to the repository?

Create a new folder named after the book, add the three rule files (full, mini, nano) following the deterministic release convention, and update the Release Matrix. Then document the book in the Books List section and reference the new rules in `USAGE.md`. The README’s "Adding the Book" section outlines the exact steps and file structure.

Loading documentation…
View on GitHub

Featured in Videos

YouTube tutorials and walkthroughs for agent-rules-books

Alternatives

Similar projects ranked by category, topics, and text overlap.

Compare
agent-rules-books | MushyBook