agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
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.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill simple-design --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/simple-designContext preview
The summary Claude sees to decide when to auto-load this skill.
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.
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. 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.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…