Guide for creating optimized Claude Code agents. Use to design a new specialized agent, a swarm sub-agent, or a multi-agent workflow. Follows the Skill → Agent (preloaded skills) → Skill orchestration pattern.
日本語の概要は準備中です。原文の説明を表示しています。
Clean Code (Robert C. Martin) guide to produce and challenge code that is readable, durable, simple, and consistent. Covers naming, functions, comments, smells, and refactor heuristics. Complements `/solid` (SOLID principles) and `/anti-overengineering` (YAGNI/KISS). Activate during the REFACTOR phase of the TDD cycle and during implementation self-review.
日本語の概要は準備中です。原文の説明を表示しています。
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
Source: Clean Code (Robert C. Martin, 2008) + Clean Coder (2011).
feature-implementer workflow)This skill NEVER duplicates the content of /solid or /anti-overengineering. It complements them.
| Concern | Skill to use |
|---|---|
| Responsibility architecture (SRP, OCP, LSP, ISP, DIP) | /solid |
| Should I add a pattern? (YAGNI, KISS, pragmatic architecture) | /anti-overengineering |
| Readability, naming, functions, smells, refactor heuristics | /clean-code (here) |
Once the pattern is decided (/anti-overengineering) and responsibilities are placed (/solid), /clean-code makes intent self-evident.
/solidActivate /solid for SRP, OCP, LSP, ISP, DIP. Mentioned here only as a structuring reminder: clean code rests on well-placed responsibilities.
"The ratio of time spent reading to writing code is well over 10:1. We are constantly reading old code as part of the effort to write new code." — Robert C. Martin
daysSinceLastReview — KO d, days, elapsedfilterMergedPullRequests(prs) — KO processPrs(prs, true)accountList must be a List, otherwise accounts.getActiveAccount() vs getActiveAccounts() is a time bomb. Prefer getCurrentAccount() vs getAllActiveAccounts().index in a 3-line loop — not i even though short).strName, bIsActive), no I prefix for interfaces.ReviewContext, ThreadFetchGateway), method names = verbs (save, fetchByCriteria).coding-standards.md): no ex, i, ctx, gw. Always existing, index, context, gateway.render(isPublic: true) → renderPublic() + renderPrivate().checkPassword(user, password) that ALSO resets the session is a trap.BusinessRuleViolation. No return null or return { error: ... } smuggled as control flow. Use discriminated unions ({ status: 'success' | 'failed' }) for expected outcomes (cf. coding-standards.md § Error Typing)."The proper use of comments is to compensate for our failure to express ourself in code." — Martin
CLAUDE.md): zero comments except if vital. Self-documenting code first.// 2026-03-12: added X)} // end if)git log is the history)// ============ SECTION ============)// fetch the user above const user = ...)"Leave the campground cleaner than you found it." — Boy Scout Rule
scope-discipline.md).| Smell | Description | Refactor |
|---|---|---|
| G5 Duplication | Same logic 3+ times | Extract a named function |
| G14 Feature Envy | Method manipulates more attributes of another class than its own | Move the method |
| G15 Selector Arguments | Booleans/enums that choose a behavior | Split into multiple functions |
| G20 Function Names Should Say What They Do | Must read the body to know | Rename |
| G23 Prefer Polymorphism to If/Else Chains | Switch on a type | Polymorphism or mapping object |
| G28 Encapsulate Conditionals | if (a && !b && c.isExpired()) | Extract as if (shouldRemove(x)) |
| G30 One Thing | "This function does X and Y" | Split |
| G34 One Level of Abstraction | Mix orchestration + detail | Extract the detail |
| G35 Magic Numbers | if (count > 7) | Named constant MAX_RETRIES |
/anti-overengineering: YAGNI, KISS, do not anticipate hypothetical business.git log is the history.AbstractBaseFactoryProvider) for a single use case.entitiesById: Record<id, Entity>, the neighbor should too. No mixing Map<id, Entity> in the same Bounded Context.coding-standards.md):
entities/ + impl (adapter) in interface-adapters/gateways/UseCase<Input, Output> interface(domainData) => viewModelsrc/tests/factories/ are mandatory for test data. Never hardcoded..usecase.ts, .gateway.ts, .presenter.ts, .factory.ts, .stub.ts, .guard.ts, .schema.ts, .valueObject.ts<domain>.<platform>.<transport?>.gateway.ts (e.g. threadFetch.gitlab.gateway.ts)<gateway>.stub.ts (test doubles), located in src/tests/stubs/@/ alias + .js extension MANDATORY (no relative paths, no barrel index.ts)After each GREEN of the Detroit cycle, BEFORE moving to the next RED:
I prefix@/ alias + .js extension, no relative paths, no barrelsQuestions to ask the author (or yourself):
| Question | If the answer is… | Action |
|---|---|---|
| "What does this function do?" | contains "and" | Split |
| "Why this name?" | "because it contains X" | Rename to X |
| "Why this boolean parameter?" | "it changes what it does" | Split into 2 functions |
| "What is this comment for?" | "explain what the code does" | Delete + rename |
| "Could you delete it?" | "yes but maybe later…" | Delete now |
| "Why 3 abstraction levels here?" | "in case we extend" | YAGNI → activate /anti-overengineering |
Recurring smells observed in this codebase, to challenge during refactor:
clean-architecture).await-ed, return-ed, or explicitly void. Pino logger ignores rejections silently.as, as unknown as T, ! non-null assertion. If needed, the upstream typing is broken — fix it with a Zod guard or type narrowing.interface-adapters/ or usecases/. Cross only through entities/ contracts.undefined is banned in domain types. Use null for intentional absence. Catch at module boundaries with Zod.type SessionId = string & { __brand: 'SessionId' }) over raw string./solid, /anti-overengineering, /refactoring, /tdd, /clean-architecture..claude/rules/coding-standards.md, .claude/rules/scope-discipline.md, .claude/rules/anti-hallucination.md.まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
Guide for creating optimized Claude Code agents. Use to design a new specialized agent, a swarm sub-agent, or a multi-agent workflow. Follows the Skill → Agent (preloaded skills) → Skill orchestration pattern.
日本語の概要は準備中です。原文の説明を表示しています。
Anti-overengineering guide based on YAGNI. Use before adding an architectural pattern, during code review, or to challenge an overly complex implementation.
日本語の概要は準備中です。原文の説明を表示しています。
Clean Architecture (Uncle Bob) guide for this project. Use when creating modules, entities, use cases, presenters, controllers, gateways, guards, services. Contains tactical patterns and structure conventions.
日本語の概要は準備中です。原文の説明を表示しています。
Audit documentation for duplication, staleness, language issues, and verbosity. Read-only — produces an actionable report.
日本語の概要は準備中です。原文の説明を表示しています。
Local auto-review of modified code (no GitLab/GitHub). Runs 5 sequential audits and generates a local report. Ideal for validating code before creating a MR/PR.
日本語の概要は準備中です。原文の説明を表示しています。
Safe commit and push workflow. Creates a commit following conventions and pushes. Husky handles verifications (TypeScript, Biome, tests).
日本語の概要は準備中です。原文の説明を表示しています。