SuperAPIAI Directory

agent-rules-books

github.com · AI agents

agent-rules-books is an open-source collection of rules and skills for AI coding agents, providing ready-to-use AGENTS.md rules and Agent Skills for tools such as Codex, Cursor, and Claude Code. The rule content is distilled from software engineering books including A Philosophy of Software Design, Clean Architecture, Clean Code, Code Complete, Designing Data-Intensive Applications, the Domain-Driven Design series, Patterns of Enterprise Application Architecture, Refactoring, Release It! Design and Deploy Production-Ready Software, The Pragmatic Programmer, and Working Effectively with Legacy Code, covering topics such as refactoring, architecture, DDD, code quality, reliability, and data systems. Each rule set is provided in three Markdown versions—mini, nano, and full—and can be installed via the Agent Skills CLI. The project is MIT-licensed and is not official book material.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

Purpose

agent-rules-books provides project-level rules and on-demand skill packages for AI coding agents, helping tools such as Codex, Cursor, and Claude Code follow design principles from classic software engineering books when generating, reviewing, or refactoring code. The rules are written in plain Markdown and do not depend on any specific editor.

Key Capabilities

  • Provides multiple rule sets, each distilled from the following books or sources:
    • A Philosophy of Software Design (John Ousterhout): deep modules, simple interfaces, information hiding; suited to API and module design.
    • Clean Architecture (Robert C. Martin): stable boundaries, the dependency rule, separation of business policy from details.
    • Clean Code: readability, naming, small functions, responsibility, testing, and simplicity.
    • Code Complete (Steve McConnell): routine design, variables, classes, control flow, defensive programming, coding standards, and testing.
    • Designing Data-Intensive Applications (Martin Kleppmann): reliability, scalability, consistency, replication, partitioning, transactions, data flow, and schema evolution.
    • Domain-Driven Design (Eric Evans), Domain-Driven Design Distilled (Vaughn Vernon), Implementing Domain-Driven Design (Vaughn Vernon): domain modeling, ubiquitous language, bounded contexts, tactical and strategic design.
    • Patterns of Enterprise Application Architecture (Martin Fowler): patterns such as layering, service layer, transaction script, domain model, data mapper, repository, unit of work, and DTO.
    • Refactoring (Martin Fowler) and Refactoring.Guru: small-step improvements, code smell identification, and behavior-preserving refactoring.
    • Release It! (Michael T. Nygard): failures, overload, timeouts, retries, circuit breakers, bulkheads, backpressure, observability.
    • The Pragmatic Programmer: responsibility, DRY at the knowledge level, orthogonality, automation, fast feedback.
    • Working Effectively with Legacy Code (Michael Feathers): characterization tests, seams, dependency breaking, incremental risk reduction.
  • Each rule set is provided in three versions: mini (the recommended version for most practical tasks), nano (a compact fallback version for when the context budget is tight), and full (the complete reference version).
  • Each book directory contains a standard SKILL.md entry point; skills load the corresponding mini rule set by default and retain the full file as in-depth reference.

How to Use

Prerequisite: Node.js with npm installed, so the Skills CLI can be run via npx without separate installation.

  • Install all book skills using the open Agent Skills CLI.
  • You can first list the available skills without installing them.
  • You can also install a single selected skill.

The repository's USAGE.md explains editor-specific configuration for Codex, Claude Code, and Cursor, including always-on rules versus on-demand use, skills, scoped rules, and recommended settings for each editor; it also provides manual, scoped, and always-on installation modes. Rules can be copied into CLAUDE.md as project memory, or adapted into Cursor project rules, GitHub Copilot custom instructions, or prompt files. COMPATIBILITY.md explains how to combine rules from multiple books, and ADDING_THE_BOOK.md explains the book distillation process.

Use Cases

Suited for developers who need AI coding agents to follow concrete engineering principles in tasks such as refactoring, code review, legacy code modernization, reliability design, domain modeling, and architecture design. The repository also includes an early validation experiment: using a deliberately generated helpdesk CLI project, vibe-coded-crap, it compares two refactorings—one that only mentions the book titles and one that uses the mini rules—with ChatGPT scoring them at approximately 46/100 and 74/100; the author emphasizes that this is only an early qualitative signal rather than a benchmark, and that the difference in static code smell counts is very small (1083 versus 1077).

Limitations

These rules are inspired by the aforementioned books; they are not official materials from the authors or publishers, nor can they replace reading the original books; the files deliberately avoid copyingthe original book text and should be used as lightweight working conventions rather than summaries or study notes. The repository does not provide in-depth measurement or an equivalent experiment plan for other books. The project is licensed under the MIT License.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools