Skip to content
Agentmart
Submit a tool

architecture-patterns

Use when making an architectural or design decision: choosing between patterns, deciding sync vs async, picking a caching or data strategy, deciding whether…

Skill by KSriki

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/ksriki-architecture-patterns

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when making an architectural or design decision: choosing between patterns, deciding sync vs async, picking a caching or data strategy, deciding whether to split a service, choosing a scaling approach, evaluating whether an agent or a workflow is right, or reviewing a design against known anti-patterns. Triggers on "should we use X or Y", "what's the right pattern for", "how should we structure", "is this over-engineered", CQRS/event-sourcing/saga/outbox/CDN/ circuit-breaker questions, and any conversation about scaling or coupling. Do NOT use for writing the design doc itself — that's `write-design-doc`; not for scaffolding a new component — `new-service`; not for designing one MODULE's interface/seams — `codebase-design`; and not for auditing an existing codebase for refactors — `improve-codebase-architecture`. This skill is SYSTEM-level pattern choice for a decision in front of you.

Use cases: documents, design, frontend, data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/architecture-patterns

What's inside

Skill name
architecture-patterns
Description
Use when making an architectural or design decision: choosing between patterns, deciding sync vs async, picking a caching or data strategy, deciding whether to split a service, choosing a scaling approach, evaluating whether an agent or a workflow is right, or reviewing a design against known anti-patterns. Triggers on "should we use X or Y", "what's the right pattern for", "how should we structure", "is this over-engineered", CQRS/event-sourcing/saga/outbox/CDN/ circuit-breaker questions, and any conversation about scaling or coupling. Do NOT use for writing the design doc itself — that's `write-design-doc`; not for scaffolding a new component — `new-service`; not for designing one MODULE's interface/seams — `codebase-design`; and not for auditing an existing codebase for refactors — `improve-codebase-architecture`. This skill is SYSTEM-level pattern choice for a decision in front of you.
License
MIT
Instructions
100 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Architecture pattern selection

## When to use this

You're choosing *how* to build something and the choice has consequences. This
skill routes you to the right pattern and the right depth of reading.

**Not this skill if:** you're *writing the doc* → `write-design-doc`. You're
*scaffolding a component* → `new-service` (which has the rung gate).

## The two-tier reference

1. **`docs/architecture-patterns.md`** — compressed agent reference. Decision rules
   and triggers. **Read this first.** It covers most decisions.
2. **The full KB** (`docs/architecture-patterns-FULL-KB.md`, ~1,800
   lines) — the depth. **Open it at the cited § when the penalty for being wrong is
   high.**

**Do not guess from the summary on an expensive decision.** The compressed file
tells you *what* and *when*; the KB tells you *why*, with the failure modes.

---

## Procedure

### 1. Name the problem, not the pattern

The most common failure is arriving with a pattern and looking for a justification.
State the *problem* first — "reads are slow and the same row is fetched 500×/day" —
and let the pattern fall out of it.

### 2. Which pillar is under pressure? (§0.5)

`Scalability` · `Availability` · `Maintainability` · `Performance` · `Cost`

**Security and Observability are not tradeable.** If a proposal trades them away,
something upstream is wrong.

### 3. What's the LOWEST rung that solves it? (§0.7)

> `0` script → `1` monolith → **`2` modular monolith** → `3` a few services →
> `4` microservices → `5` serverless

**Each rung ~doubles operational complexity.** Rung 2 is where most systems should
stop. **Name the specific failure mode of the rung below** — if you can't, stay put.

**If a model is involved (§0.9):** *can you enumerate the steps in advance?*
**Yes → workflow, not an agent.** Most "agents" are workflows in costume, and
crossing into autonomy has a real architectural payload (decision-path
observability, evals, cost variance, containment).

### 4. Look up the pattern

Open `docs/architecture-patterns.md`. Find the decision. Note the **§ reference**.

### 5. Penalty for being wrong?

| Expensive / irreversible → **open the full KB** | Cheap / reversible → **just pick one** |
|---|---|
| Storage engine, schema shape | A library version |
| Service boundary | Log format |
| Sync vs async coupling | Internal naming |
| Auth model | Folder layout |
| Event sourcing, CQRS, sharding | A config default |

### 6. Name the tax, record the rejected option

Every pattern costs something. Say it out loud so it's an intentional purchase.
Then record what you *didn't* pick and why → that's the part that gets reviewed.

---

## The decisions this comes up for most

| Question | Go to |
|---|---|
| Split this into a service? | §0.7 ladder + `new-service` gate. Default: **no.** |
| Sync or async? | §4. *What happens when the callee is down?* Non-critical breaking critical → **async.** |
| Publishing an event after a DB write? | **§3.7 Outbox. Mandatory.** Otherwise it's a dual-write bug. |
| Async — anything else I must do? | **Idempotent consumers** (at-least-once) + eventual consistency is user-visible. |
| Cache this? | §7. **Small/hot/structured → Redis. Large blobs → CDN. Never a 20MB video in Redis.** |
| Scale out? | §2A. **Requires statelessness** — verify that first. `min=2`. |
| CQRS / Event Sourcing? | §3.1/3.2. **Usually no.** High cost, frequently over-applied. Need a named reason. |
| Agent or workflow? | §0.9.4. **Can you enumerate the steps? → workflow.** |
| Replacing a legacy system? | §6.1 **Strangler Fig** — default. §6.4 Parallel Run for high confidence. |
| Is this design bad? | §10 anti-patterns. Check **distributed monolith** and **shared DB** first. |
| Need 4 mocks to test it? | §1B.4 — **the design is wrong.** Don't mock harder. I/O leaked into the domain. |

---

## Definition of done

- [ ] Problem named before the pattern
- [ ] Pillar under pressure identified
- [ ] **Lowest viable rung chosen**, with the failure mode of the rung below named
- [ ] Full KB opened if the decision is expensive/irreversible
- [ ] **Tax named**; rejected alternative recorded
- [ ] Checked against §10 anti-patterns

From KSriki/agent-harness-template, MIT.

More from KSriki/agent-harness-template

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Jul 22, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from KSriki

Cite this page

architecture-patterns skill. Agent Mart. https://agentmart.dev/skills/ksriki-architecture-patterns (last updated 2026-10-24)