Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Clean Code Law

ASecurity

The Atelier Clean Code Law — 250-word-per-file budget, DRY via the graph, ponytail minimalism, and the comment policy. Load before writing or refactoring any source code.

2 stars
0 votes
0 copies
0 views
Added 9/22/2026
ai-agentsgonodetestingrefactoringcode-reviewapisecurity

Works with

cliapi

Security Analysis

A100/100

Scanned 9/22/2026

Install to Claude Code

$npx -y skills add INERATE/atelier --skill clean-code-law --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Clean Code Law?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Clean Code Law
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/inerate-clean-code-law/badge)](https://www.skillsdirectory.com/skills/inerate-clean-code-law)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: clean-code-law
description: The Atelier Clean Code Law — 250-word-per-file budget, DRY via the graph, ponytail minimalism, and the comment policy. Load before writing or refactoring any source code.
---

# Clean Code Law

Small files, no repetition, no speculation. Any developer must be able to edit
the codebase without going mad in thousand-line files.

## The 250-word rule

- **Budget: ≤250 words per source file** (whitespace-separated tokens, code and
  comments). **Hard cap: 350** when splitting would genuinely harm cohesion.
- Enforced by the `file-size-gate` hook — an oversized write comes back to you
  with instructions; split before continuing.
- **Exempt:** docs (`*.md`), lockfiles, generated files, migrations, JSON/YAML
  data, vendored code. Config lives in `rules` (domain `code`) and can be tuned.
- Why: small files are readable, reviewable, independently testable, cheap for
  agents to load, and force real module boundaries.

## How to split (in preference order)

1. Extract pure helpers into a sibling module the file imports.
2. Split by responsibility (parsing vs validation vs IO), never by line count.
3. Component files: one component per file; hooks into `hooks/`; variants into
   a `variants.ts`.
4. If a file resists splitting, the design is wrong — fix the design.

## DRY (never repeat yourself)

Before writing anything, check it doesn't already exist: code-review-graph
(`semantic_search_nodes`) or repo search. If it exists, import it. If it almost
exists, extend it where it lives. A bug fix goes in the shared function all
callers route through — never patched per-caller.

## Ponytail alignment (the ladder is law here too)

Does it need to exist? → reuse in-repo → stdlib → native platform → installed
dep → one line → only then minimal new code. No interfaces with one
implementation, no config for constants, no scaffolding "for later".

## Classes & modules (one job each)

- **Single responsibility**: a class/service does one thing — a `UserService`
  fetches/mutates users, it doesn't also send emails or format API responses.
  If a class needs "and" to describe it, split it.
- **Dependency injection over globals**: pass a db session/client into a
  constructor or function param — never import a singleton connection deep in
  business logic. Makes testing and swapping impls trivial.
- **No god objects**: a class that grows a new method for every feature is a
  design smell — extract collaborators instead of adding methods.
- Prefer plain functions over a class with one method; reach for a class only
  when you need to hold state across calls (a service with a shared client,
  a stateful parser) — ponytail applies to OOP too.

## Comments

Premium and sparse: only constraints the code cannot show (invariants, gotchas,
external contracts, `ponytail:` ceiling notes). Never narrate what the next
line does. No dead code, no commented-out blocks.

## Every non-trivial file leaves one check

A branch/loop/parser/money/security path ships with the smallest runnable check
that fails if the logic breaks (an `assert` self-check or one tiny test). No
frameworks unless the project already has one.

Attribution

INERATEINERATE
View sourceMore from INERATE →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Caveman

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

1074701 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

693621 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3351 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

691 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →