dry-kiss-rules
Skill2 starsChanged 46 days agoMITView on GitHub
Generates and maintains a universal AI-agent rules file (.agents/rules/CODE_RULES.md) enforcing DRY, KISS, YAGNI, single-responsibility, clean architecture, and senior-engineer best practices for React + Next.js frontend and Python (FastAPI/Django) backend projects. Trigger this skill whenever the user asks to: create or update project rules, set up coding standards, configure AI agent behavior, write a CLAUDE.md or .cursorrules equivalent, enforce clean code standards, set up architecture guidelines, or says anything like "add rules for my project", "make agents follow best practices", "set up coding guidelines", "enforce DRY/KISS", or "update my rules file". Also trigger when the user wants to improve code quality, reduce technical debt, or establish team conventions. This skill outputs a single universal rules file readable by Claude, Cursor, Gemini, GPT, and any AI coding agent.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- global/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- commiterSkill
- dna-scannerSkill
- full-dna-scannerSkill
- image-scannerSkill
- landing-architectSkill
- page-auditorSkill
- project-scannerSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 39
Read references/CODE_RULES_TEMPLATE.md (relative to this skill folder) and use it as the base.
- Very specific: line 43
Check if .agents/rules/CODE_RULES.md already exists in the user's project
- Distinctive: line 44
If yes: merge/update, don't overwrite blindly
- Distinctive: line 45
If no: create from template
- Distinctive: line 46
Ask if they have a specific folder structure to document (optional)
- Distinctive: line 59
Before writing any code, mentally check:
- Distinctive: line 64
If flagged: tell the user *why* it's over-engineering and propose the simpler alternative.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
DRY-KISS-RULES Skill
Generates a universal .agents/rules/CODE_RULES.md file that any AI coding agent can read and follow. The rules enforce pragmatic senior-engineer standards for React/Next.js + Python (FastAPI/Django) projects — without overengineering.
Key Design Decisions (read before generating)
- No forced full SOLID — classes are used where they genuinely add value (service layer, data models, complex domain logic), not everywhere
- Pragmatic 3-layer architecture — only enforced when a feature has real complexity; simple CRUD can stay lean
- YAGNI is a hard gate — agents must flag AND refuse to build unnecessary abstractions
- Dependency Injection (DI) is required — always use constructor injection in Python services, FastAPI
Depends(), and props/context in React to keep the codebase highly testable and decoupled. - Next.js performance is a first-class concern (RSC, lazy loading, bundle size, caching)
- Rules file is AI-agnostic — plain Markdown, no tool-specific syntax
Output Target
.agents/
rules/
CODE_RULES.md ← the universal rules fileWhat to Generate
Read references/CODE_RULES_TEMPLATE.md (relative to this skill folder) and use it as the base. Customize for the user's specific project if they provide details (stack versions, additional conventions, folder structure).
Generation Steps
- Check if
.agents/rules/CODE_RULES.mdalready exists in the user's project- If yes: merge/update, don't overwrite blindly
- If no: create from template
- Ask if they have a specific folder structure to document (optional)
- Generate the file
- Tell the user to add this line to their
CLAUDE.md(or equivalent):Always read and follow .agents/rules/CODE_RULES.md before writing any code.
When User Asks to Enforce a Specific Rule
Apply the relevant section from CODE_RULES.md to the current task. Cite the rule being applied.
Over-Engineering Detection (YAGNI Gate)
Before writing any code, mentally check:
- Am I creating an abstraction with only one current use case? → STOP, flag it
- Am I adding a design pattern "for future flexibility"? → STOP, flag it
- Is this class/layer/interface solving a real current problem? → Proceed only if yes
If flagged: tell the user why it's over-engineering and propose the simpler alternative. Do not build it until the user explicitly overrides with a reason.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

