Sep 4, 2026
agent-rules-books: 14 Rule Sets That Distill the Classics for Coding Agents
ciembor's 2,677-star repository turns Clean Code, Refactoring, DDD, DDIA, and ten more classic software engineering sources into AGENTS.md rules and skills for Codex, Cursor, and Claude Code — in mini, nano, and full editions.
Every senior engineer carries a shelf of dog-eared books; your coding agent carries whatever was in its pretraining data. ciembor/agent-rules-books closes that gap: 14 rule sets distilled from classic software engineering books and resources — Clean Code, Refactoring, Domain-Driven Design, Designing Data-Intensive Applications, Release It!, and more — packaged as AGENTS.md rules and skills for Codex, Cursor, and Claude Code.
Why This Skill Matters
Each rule set ships in three tool-agnostic Markdown editions: mini (the recommended version for real tasks), nano (a compact fallback for tight context budgets), and full (the canonical reference). The granularity matters because rules are token spend — Clean Code's full edition carries 220 rules while its mini edition compresses to 29.
The repository is explicit about what it is not: the rule sets are inspired by the books, not official materials, and they intentionally avoid reproducing book text — lightweight working agreements, not study notes. Everything is MIT licensed.
Installation
There is no installer; you copy the rule sets where your agent reads them. The repo's USAGE.md covers per-editor setup. For Claude Code, the README suggests copying a rule set into CLAUDE.md as project memory or turning a focused mini set into a skill:
git clone https://github.com/ciembor/agent-rules-books.git
cat agent-rules-books/clean-code/clean-code.mini.md >> your-project/CLAUDE.md
Real Workflow: A Refactor With Rules On
The repo's own validation experiment is the template. It compared two refactors of the same deliberately messy helpdesk CLI — one guided by the mini rules from A Philosophy of Software Design, the other instructed only with "OBEY A Philosophy of Software Design by John Ousterhout". The resulting codebases went to ChatGPT for judgment, and it rated the mini-rules refactor roughly 74/100 versus 46/100 for the name-only branch.
The honest fine print: a Reek static-analysis pass showed almost no difference in generic smell counts (1,083 versus 1,077), and the README labels the whole exercise "an early qualitative signal, not a benchmark". The advantage showed up in architectural judgment — module depth, responsibility boundaries, information hiding.
Your workflow: pick the book that matches the task (Working Effectively with Legacy Code for a legacy rescue, Release It! for production hardening, DDIA for data-heavy systems), copy its mini file in as project rules, and run the refactor.
Tips
- Start with
minifor every book; drop tonanowhen context is scarce, and openfullonly as a reference. - The Books List section pairs each rule set with the task it fits — Refactoring.Guru for smell diagnosis, Clean Architecture for boundary work, Code Complete for disciplined everyday implementation.
- COMPATIBILITY.md covers combining multiple books; don't stack five full rule sets and wonder why the agent ignores them.
- For Codex and Cursor, the same files adapt to project rules and custom instructions.
When Not to Use This
The author says it best: these are not a substitute for reading the books, and they are not official materials from the authors or publishers. If your team already has strong house style guides, another layer of book rules may just add context noise — rules earn their tokens when they change agent behavior, not when they duplicate what your review process already enforces.
See the leaderboard for more skills.