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
Install
npx skills add ciembor/agent-rules-books --allOne book: --skill refactoring instead of --all
This is third-party code. Review the repository files before installing.
What it does
The repository holds fourteen rule sets, each based on one book about design, refactoring, legacy code, reliability or data-intensive systems. Every set ships in three sizes: full as the complete reference, mini for everyday work and nano for tight context budgets. Each book folder has a SKILL.md that loads mini by default and keeps full for harder tradeoffs. The rules install as skills or can go into AGENTS.md and Cursor rules.
Who it is for. For developers and tech leads who want the agent to follow principles from well-known books.
Good fit when
- The agent writes tangled code and needs clean code rules
- You need to refactor legacy code with a proven method
- You are designing a domain model and want DDD guidance
Not a fit when
- Your team has its own style guide that conflicts with these books
- The agent context is already overloaded with rules
Example request
Refactor this module following Working Effectively with Legacy Code, cover it with tests firstLimitations
The rules summarize the books' ideas and do not replace them. Enabling several sets at once can produce conflicting advice; book compatibility is covered in a separate doc. The rules are in English.
How to disable. Delete the installed skill folders from the agent's skills directory or remove the rules from AGENTS.md.
Security check
- The skills consist only of text rules
README in short
The README explains the three versions of each rule set and shows installing via the Agent Skills CLI: all books, a list, or a single one. A release table gives size and rule counts per version. Separate docs cover editor-specific usage, book compatibility and a response to Reddit criticism. MIT licensed.
SKILL.md
--- name: clean-code description: Apply Robert C. Martin-inspired clean code rules when improving readability, naming, function design, responsibilities, or testable everyday code. license: MIT --- # Clean Code Skill Use this skill when a task involves everyday implementation quality, naming, small functions, readable control flow, responsibilities, comments, errors, or tests. Before making design or code decisions, read and apply [clean-code.mini.md](clean-code.mini.md). Use [clean-code.md](clean-code.md) only as a deeper reference when the mini rules are not enough for the current code-quality tradeoff.
FAQ
Which size should I pick?
mini for normal work, nano for very tight context, full as a reference.
Can I skip npx?
Yes, docs/USAGE.md covers manual install and setups for Codex, Claude Code and Cursor.
Related
A skills library that gives coding agents a development process: brainstorming, planning, TDD, subagents and code review
Skills for real engineers by Matt Pocock
Skills For Real Engineers
Small composable skills for engineering with agents: plan grilling, TDD, bug diagnosis, code review and architecture
GitHub toolkit for spec-driven development: the specify CLI adds agent commands and skills to a project, from principles to implementation
Reference MCP servers
Model Context Protocol servers
Official reference MCP servers: Filesystem, Fetch, Git, Memory, Sequential Thinking, Time and Everything