Anti-overengineering guide based on YAGNI. Use before adding an architectural pattern, during code review, or to challenge an overly complex implementation.
日本語の概要は準備中です。原文の説明を表示しています。
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.
日本語の概要は準備中です。原文の説明を表示しています。
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
This skill activates for:
A feature-specific agent with a targeted persona always outperforms a generic agent.
❌ "You are a senior backend engineer"
✅ "You are a TDD implementation agent for the ReviewFlow Clean Architecture Fastify/TypeScript project"
Skill (user entry point, triggers)
→ Agent .claude/agents/*.md (targeted persona, preloaded skills)
→ Skill (knowledge injected into agent context)
| Level | Role | Location |
|---|---|---|
| Skill | Entry point, orchestration | .claude/skills/<name>/SKILL.md |
| Agent | Autonomous execution, dedicated context | .claude/agents/<name>.md |
| Skill (preloaded) | Knowledge injected at startup | skills: in agent YAML |
| Criteria | Agent .claude/agents/ | Inline prompt |
|---|---|---|
| Skills preloaded | skills: [tdd, architecture] | Must read manually |
| Reusable | From any skill | Locked in one skill |
| Configuration | model, maxTurns, permissions, tools, hooks | Limited to Agent tool |
| Discoverability | Visible in .claude/agents/ | Hidden |
Rule: ALWAYS create .claude/agents/<name>.md. Never inline prompts in references/.
Before creating the agent, clarify:
.claude/skills/ AND .claude/agents/Create .claude/agents/<agent-name>.md with this structure:
---
name: <agent-name>
description: "Use this agent to [specific action]. [Additional context]."
tools: Read, Glob, Grep, LS # Explicit allowlist
model: sonnet|opus # sonnet for read-only, opus for code
maxTurns: 15 # Adjust to scope
permissionMode: default|bypassPermissions # bypassPermissions if writing
skills: # Preloaded into context
- <skill-name-1>
- <skill-name-2>
---
# <Agent Name>
## Persona (2-3 lines)
You are a [specific role] for [precise context].
## Coding Standards
Read `.claude/rules/coding-standards.md` BEFORE working.
## Mission (numbered, max 7 steps)
1. [Step]
2. [Step]
3. ...
## Constraints (max 10 rules)
- [Rule]
- [Rule]
## Output format
[Exact template of deliverable]
| Field | Required | Description |
|---|---|---|
name | Yes | Unique identifier, lowercase + hyphens |
description | Yes | When to delegate to this agent — Claude matches on this field |
tools | Recommended | Tool allowlist. Omitted = all tools |
model | No | sonnet (fast), opus (quality), haiku (light). Default: inherit |
maxTurns | No | Agentic turn limit. Default: no limit |
permissionMode | No | default, acceptEdits, dontAsk, bypassPermissions, plan |
skills | No | List of preloaded skills. Content injected at startup |
hooks | No | Lifecycle hooks: PreToolUse, PostToolUse, Stop |
If the agent creates or modifies code, add a self-review phase:
## Phase N: SELF-REVIEW (autonomous loop)
After completing the mission:
### Step 1: Run tests
yarn test:ci
### Step 2: Reread each created file
Check: naming, imports, TypeScript, architecture, tests
### Step 3: Fix loop (max 3 iterations)
For each violation: fix → rerun tests → confirm
### Step 4: Escalate
If blocked after 3 iterations → list issues in report
Before publishing the agent, run references/checklist.md.
After first use:
| Element | Max size | Why |
|---|---|---|
| Persona | 3 lines | Beyond this, dilutes focus |
| Project context | 10 lines | Agent has preloaded skills + must read code |
| Mission | 5-7 steps | Beyond this, split into sub-agents |
| Constraints | 10 rules | Beyond this, create a dedicated skill |
| Skills preloaded | 3 max | Beyond this, context too heavy at startup |
| Signal | Action |
|---|---|
| Mission > 7 steps | Split into 2-3 sequential agents |
| Files to read > 10 | Split by category (parallel swarm) |
| Output > 500 lines | One agent synthesizes, another details |
| Scope cross-module | One agent per module |
| Skills preloaded > 3 | Split — too much knowledge dilutes focus |
Agents created for this project must respect:
static create()), stub gateways, yarn test:ci.claude/rules/coding-standards.mdSee references/agent-patterns.md for reusable templates.
See references/anti-patterns.md for common mistakes.
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
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.
日本語の概要は準備中です。原文の説明を表示しています。
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.
日本語の概要は準備中です。原文の説明を表示しています。
Safe commit and push workflow. Creates a commit following conventions and pushes. Husky handles verifications (TypeScript, Biome, tests).
日本語の概要は準備中です。原文の説明を表示しています。