/code-agent-skills:architecture-decisionsfrom code-agent-skills
ALWAYS Execute this skills before deciding any technical/architectural matter, to avoid reintroducing already-solved issues.
Ships in code-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Keeps architecture_log.md (project root; check docs/ if absent): a short list of
architectural decisions, each with its reason and the alternatives it rejected.
Read it before deciding; add to it after deciding.
The log holds only what the code cannot tell a reader: why a way was chosen and which ways were tried or rejected. Everything else a future agent finds faster and more correctly in the code, the migrations or the project's instructions, and a copy here only goes out of date.
Before settling any architectural choice (library, data store, API shape, auth, build tooling, module boundary, concurrency, error handling, deployment, naming convention, anything that constrains future code), read the log.
If a candidate choice contradicts an entry or reintroduces a rejected alternative, say so ("contradicts log entry , reopen?") before going on.
If the file does not exist, create it the first time a decision is logged.
Only for a decision that constrains future code or rejects an alternative someone might propose again: a new part or dependency, who owns which data, a boundary between parts, a rule that holds everywhere, a way that was tried and failed.
Not for: features and what they do, UI texts and layout, renames, bug fixes, tuning (timeouts, limits, sizes), refactors that keep the decision.
Before writing a line, ask: could an agent find this in the code, the migrations, the config or the project's instructions (CLAUDE.md, README)? If yes, leave it out.
Never write:
Name a part by what it is ("the finance app", "the audit log"), not by its path.
Newest at top. One entry = one decision. Use -> for reasoning, not full sentences.
## <decision in a few words> [INTRODUCED | CHANGED | REMOVED]
WHAT: <the decision, one line>
WHY: <driver -> consequence -> chosen because ...> (at most 3 lines)
REJECTED: <alternative> (<why, a few words>); ... (optional, one line)
ACCEPTED: <known downside taken on purpose> (optional, one line)
Hard limit: at most 5 lines per entry, heading included. If a decision needs more, it is several decisions: write several entries.
Never extend or rewrite an existing entry. A follow-up change is a new entry at the top
([CHANGED], naming what it replaces); the old entry gets one line appended:
-> superseded by <new topic>. A superseded entry stays as it is otherwise, so the
history reads as a chain and an outdated entry can never look current.
Fixing a factual error in an entry is fine; adding details to it is not.
## Client state in Zustand [CHANGED]
WHAT: Redux -> Zustand for client state.
WHY: Redux boilerplate -> slow features; app state small and local -> Zustand enough.
REJECTED: Redux (boilerplate). Replaces "Client state in Redux".
## Cursor pagination [INTRODUCED]
WHAT: list APIs page by cursor, not by offset.
WHY: offset drifts on inserts -> duplicate or missing rows; cursor stable under writes.
## Durable job queue [INTRODUCED]
WHAT: async jobs on a durable queue on the existing Redis.
WHY: need retries + visibility; Redis already in the stack -> no new infra.
REJECTED: in-process timers (lost on restart, no retry).
## Payment accounts by fixed rules [INTRODUCED]
WHAT: the booking account of a bank payment is picked by fixed rules, never by AI.
WHY: chart of accounts standard + VAT rate known -> rules exact and explainable.
REJECTED: remember the last choice (kept a wrong pick for every later payment), AI.
Too long (do not write like this):
## Bank payments [INTRODUCED]
WHAT: The page lists payments; POST /payments books via /cbi/outgoing_invoices/{id}/pay,
loads accounts (accounts.ts, at most 8 requests at once, "Lade Konten …") ...
Stay active for the whole session once a project is in scope: every later architectural decision still gets a read-before / write-after pass.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub ari-ayvazyan/aiskills --plugin code-agent-skills14 skills in this plugin
/archifyCreate polished, validated architecture, workflow, sequence, data-flow, and lifecycle/state diagrams. Use when the user asks to visualize system architecture, infrastructure, cloud/security/network topology, technical workflows, API call sequences, request lifecycles, data pipelines, ETL/ELT, data lineage, state machines, or to convert/beautify Mermaid./architecture-planGenerate concise, mobile-friendly architecture cards for reviewing plans, proposed changes, finished work and commit overviews./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary./create-agent-skillsExpert guidance for Claude Code Skills. Use when working with SKILL.md files, authoring new skills, improving existing skills, or understanding skill structure./diagnosing-bugsDiagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow./gauntlet-loopCreate a .md file for a goal driven gauntlet loop