skills/designing-systems/SKILL.md
Makes a system design or technology decision and documents it as an Architecture Decision Record (ADR). Use when: introducing a new technology or service, designing a new system component (schema, API contract, service boundary), refactoring at non-trivial scale, or resolving competing technical approaches. Do not use when: the decision is an implementation detail within an already-decided approach, a naming convention choice, or a one-off decision with obvious rationale.
npx skillsauth add maestria-co/ai-playbook designing-systemsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Make a clear, documented technical decision — and write an ADR so the decision is not relitigated in six months. Good architecture decisions are reversible where possible, boring where practical, and always written down.
Do not invoke this pattern for implementation details within an already-decided
approach. If you know what to build and how, use implementing-features directly.
Check 1 — Read project context
Read .context/project-overview.md and scan .context/decisions/ for relevant prior ADRs.
Check 2 — Confirm this is a design decision, not an implementation task
Ask: "Is there still a genuine choice to make here?"
implementing-features.Write a clear problem statement:
Classify this as a two-way door or one-way door decision.
Two-way door (easy to undo later):
One-way door (hard or expensive to undo):
Identify ≥2 viable options. For each, evaluate:
| Criterion | Description | |---|---| | Correctness | Does it actually solve the problem? | | Simplicity | How much complexity does it add? | | Performance | Does it meet load/latency requirements? | | Maintainability | How hard is it to change or extend? | | Team familiarity | Does the team know this technology? | | Reversibility | How hard is it to undo this choice? |
Prefer the simplest option that meets requirements. Do not add layers, abstractions, or services that no current requirement demands.
Before finalizing, check explicitly:
Write the ADR to .context/decisions/ADR-NNN-title.md.
ADR format:
# ADR-NNN: [Title]
**Date:** YYYY-MM-DD
**Status:** Accepted
**Supersedes:** ADR-NNN (if applicable)
## Context
[The problem and why a decision is needed]
## Decision
[What was decided — one clear sentence]
## Options Considered
### Option A: [Name]
Pros: ...
Cons: ...
### Option B: [Name]
Pros: ...
Cons: ...
## Rationale
[Why this option was chosen over the alternatives]
## Consequences
- [What changes as a result]
- [What tradeoffs are accepted]
- [What monitoring/validation is needed]
Update .context/decisions/README.md to add the new ADR to the index.
Produce the artifacts the implementer needs to build from:
Decision: [What was decided — one sentence]
ADR: .context/decisions/ADR-NNN-title.md
Outputs:
- [Artifact 1 — e.g., schema, API contract, ASCII diagram]
Tradeoffs accepted:
- [What was given up and why it's acceptable]
Implementation notes:
- [Key patterns to follow]
- [Explicit things NOT to do]
Suggested next: implementing-features (if implementation follows directly)
Tradeoffs accepted:
Implementation notes:
user:profile:{userId}Suggested next: implementing-features — implement the ioredis integration </output> </example>
<example> <scenario>Designing an API contract for a new resource</scenario> <input> <task>Design the REST API contract for the OAuth provider resource.</task> <context> - Existing REST API follows RESTful conventions (see .context/decisions/ADR-001) - OAuthProvider model: id, userId, provider (google/github), providerId, accessToken, refreshToken, expiresAt - Must support: connect provider, disconnect provider, list connected providers </context> </input> <output> Decision: Three-endpoint REST design for OAuth providers under /users/:userId/oauth. ADR: .context/decisions/ADR-008-oauth-api-contract.mdAPI Contract: GET /users/:userId/oauth → 200 [{provider, connected, expiresAt}] POST /users/:userId/oauth/:provider → 201 {provider, connected} | 409 already connected DELETE /users/:userId/oauth/:provider → 204 | 404 not connected
Tradeoffs accepted:
Implementation notes:
Decision: Place OAuth helpers in src/lib/oauth/ (consistent with existing auth helpers in src/lib/auth/).
No ADR needed — this is a naming/organization choice within an already-decided folder structure. Document in a code comment if the placement is non-obvious.
Suggested next: implementing-features </output> </example>
</examples>.context/decisions/, writes .context/decisions/ADR-NNN-*.mddevelopment
Writes and runs a test suite for a piece of code, covering happy path, edge cases, error cases, and security cases. Use when: implementation is complete and needs test coverage, a bug needs a reproduction test and fix validation, or code needs coverage before a refactor. Do not use when: the code under test is not yet implemented, or the spec is still unclear.
testing
Use when creating a new skill, editing an existing skill, or helping a user author a skill for this system. Covers structure, discoverability, quality, and discipline hardening.
development
Evidence-based verification process to run before marking any task complete. Use this skill every time you're about to report that work is done — for features, bug fixes, refactoring, or any code change. This catches the most common failure mode: declaring "done" without proof. If you're finishing up and about to tell the user the task is complete, run this checklist first.
development
Teaches agents how to discover, select, and invoke skills from the skill library. Use this skill whenever you're uncertain which skill applies to a task, when composing multiple skills for complex work, or when you need to understand what skills are available. This is your go-to when facing an ambiguous task and need to figure out the right approach before diving into implementation.