agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when code has grown hard to hold in your head. Applies complexity limits, dependency reduction, and encapsulation to bring functions and modules back under a readable ceiling. Trigger on "this function is too complex", "i can't follow this file anymore", "every change here
Claude Code
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill simple-design --agent claude-code
Codex
$ npx skills add nimadorostkar/Claude-Skills-collection --skill simple-design -a codex -y
Cursor
$ npx skills add nimadorostkar/Claude-Skills-collection --skill simple-design -a cursor -y
Gemini CLI
$ npx skills add nimadorostkar/Claude-Skills-collection --skill simple-design -a gemini-cli -y
GitHub Copilot
$ npx skills add nimadorostkar/Claude-Skills-collection --skill simple-design -a github-copilot -y
OpenCode
$ npx skills add nimadorostkar/Claude-Skills-collection --skill simple-design -a opencode -y
Windsurf
$ npx skills add nimadorostkar/Claude-Skills-collection --skill simple-design -a windsurf -y
name: simple-design description: Use when code has grown hard to hold in your head. Applies complexity limits, dependency reduction, and encapsulation to bring functions and modules back under a readable ceiling. Trigger on "this function is too complex", "i can't follow this file anymore", "every change here breaks something else", "is this abstraction worth it". Do not use for a step-by-step behavior-preserving restructure — see the refactoring skill. metadata: category: development version: 1.0.0 tags: [simplicity, complexity, cognitive-load, encapsulation]
Keep code within the limits of human working memory. Complexity is not measured by line count but by how many things you must hold in your head at once to be confident a change is correct.
1. **Measure, do not guess** — Cyclomatic complexity per function, dependency count per module. Find the actual outliers. 2. **Flatten first** — Replace nested conditionals with guard clauses. Most deeply nested code is shallow logic wearing a costume. 3. **Reduce the inputs** — A function taking seven parameters is describing a missing type. Introduce it. 4. **Shrink the public surface** — Everything not needed by a caller becomes private. A module with three public functions is comprehensible regardless of its size. 5. **Delete** — The simplest code is the code that is not there. Remove unused options, flags, and abstractions built for a future that did not arrive. 6. **Set the ceiling** — Agree a limit (for example, cyclomatic complexity of 7) and enforce it in the linter, so this does not have to happen again.
**Guard clauses instead of nesting:**
// Before: cyclomatic complexity 8, four levels of nesting.
function processOrder(order) {
if (order) {
if (order.items.length > 0) {
if (order.customer.isActive) {
if (inventory.canFulfil(order)) {
return fulfil(order);
} else {
return backorder(order);
}
} else {
throw new Error("inactive customer");
}
} else {
throw new Error("empty order");
}
} else {
throw new Error("no order");
}
}
// After: complexity 4, one level of nesting, failure conditions read as a list.
function processOrder(order) {
if (!order) throw new DomainError("no order");
if (order.items.length === 0) throw new DomainError("empty order");
if (!order.customer.isActive) throw new DomainError("inactive customer");
return inventory.canFulfil(order) ? fulfil(order) : backorder(order);
}A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory,…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling,…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.