backend-patterns
Skill2 starsChanged 2 months agoMITView on GitHub
Language- and framework-neutral backend architecture patterns. Use when designing or reviewing service boundaries, data consistency, contract evolution, distributed workflows, messaging, caching, regional topology, authorization, or observability; choose patterns from explicit constraints and trade-offs, route domain, failure, security, and rollout work to their owners, then map decisions to the project's existing stack.
88 other projects use a version of this.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- lhbsaa/apex-unifiedtheir own version, first seen Nov 8, 2026
- ahmadvahidi/skill-atlastheir own version, first seen Nov 8, 2026
- Ashfaqbs/ai-coding-agent-toolkittheir own version, first seen Nov 8, 2026
- Lukk17/agent-standardstheir own version, first seen Nov 7, 2026
- XD3an/cc-plustheir own version, first seen Nov 7, 2026
Used with
Projects with it also use everything-claude-code, investor-materials and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
InfopibeSkilleverything-claude-code
Also in 10 projects that use this
InfopibeSkillinvestor-materials
Create and update pitch decks, one-pagers, investor memos, accelerator applications, financial models, and fundraising materials. Use when the user needs investor-facing documents, projections, use-of-funds tables, milestone plans, or materials that must stay internally consistent across multiple fundraising assets.
Also in 29 projects that use this
niloykumarbarmanSkillagent-sort
Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.
Also in 10 projects that use this
tpavanipradeepSkillbun-runtime
Bun as runtime, package manager, bundler, and test runner. When to choose Bun vs Node, migration notes, and Vercel support.
Also in 21 projects that use this
mryeastcodeSkilleverything-claude-code-conventions
Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.
Also in 8 projects that use this
gongyijie85Skillunified-memory
Share durable, inspectable context and handoffs between Claude, Codex, Hermes, Cursor, OpenCode, and other agents through the local ECC Memory Vault. Use when an agent must save work state, transfer context, resume another agent's task, or search shared project knowledge.
Also in 4 projects that use this
- +1 more from Infopibe
Other versions88 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 88
- affaan-m/ECC★ 246ksame name
- YosemiteCrew/Yosemite-Crew★ 2ksame name
- xu-xiang/everything-claude-code-zh★ 1.9ksame name
- loulanyue/awesome-claude-notes★ 272same name
- cloudnative-co/claude-code-starter-kit★ 153same name
- tpavanipradeep/everything-claude-code★ 104same name
- mturac/everything-openai-codex★ 89same name
- mit-network/everything-claude-code★ 76same name
- tranhieutt/software_development_department★ 71same name
- Fmarzochi/EGC★ 61same name
78 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- humanizer-zhSkill
- frontend-patternsSkill
- security-reviewSkill
- fastapiSkill
- python-projectSkill
- ts-backendSkill
- ts-frontendSkill
- readmeSkill
- codebase-designSkill
- code-reviewSkill
- coding-standardsSkill
- domain-modelingSkill
- fixSkill
- grillingSkill
- living-docs-governanceSkill
- planSkill
- prototypeSkill
- publish-ticketsSkill
- resilienceSkill
- session-handoffSkill
- specSkill
- systematic-debuggingSkill
- tddSkill
- verificationSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 26 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 41
Read only the references needed for the active branch:
- Distinctive: line 74
Use the project's native primitives and terminology.
- Distinctive: line 76
Document where the invariant is enforced.
- Distinctive: line 97
Treat transaction script, service layer, vertical slice, ports and adapters, and event-driven designs as alternatives shaped by context—not …
- Distinctive: line 98
Add a repository boundary when it protects domain code from meaningful persistence complexity or supports multiple callers/adapters.
- Distinctive: line 106
Prefer one authoritative write owner.
- Very specific: line 108
Use canonical domain terms and context ownership from domain-modeling.
- Distinctive: line 114
When proposing or reviewing a backend pattern, return:
“Common” is measured: kept by at least 6 in 10 of the 26 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Backend Patterns
Choose backend patterns from the problem's forces and invariants. Preserve the project's language, framework, and established architecture unless the evidence justifies a change.
Workflow
1. Establish the context
Inspect the repository and state:
- execution model: request/response, event-driven, scheduled, streaming, actor, or mixed;
- deployment shape: process, serverless function, container, edge, or worker;
- canonical domain terms, capability and data ownership, transaction boundaries, and external systems;
- consumers, compatibility surfaces, data lifecycle, and deployment coexistence constraints;
- required consistency, latency, throughput, availability, recovery objectives, and regional or regulatory constraints;
- existing conventions and operational capabilities.
Consume CONTEXT.md or CONTEXT-MAP.md when present. Invoke domain-modeling when vocabulary or context ownership must be resolved rather than guessed. Backend pattern comparison remains here; route a selected decision to domain-modeling only when the user wants a qualifying ADR recorded.
Completion criterion: every relevant constraint is supported by repository evidence or explicitly marked as an assumption.
2. Define the problem and invariant
Describe the recurring failure or design pressure without naming a solution. Then state the invariant that any acceptable solution must preserve.
Examples:
- Duplicate delivery may repeat a charge. Invariant: one idempotency key produces at most one charge.
- A remote dependency stalls requests. Invariant: dependency time is bounded by the caller's deadline.
- A read path overloads the primary store. Invariant: freshness may lag by at most five minutes.
Completion criterion: the problem, affected boundary, and observable correctness condition are explicit.
3. Select the relevant pattern family
Read only the references needed for the active branch:
| Problem branch | Reference |
| Module boundaries, layering, dependency direction | references/boundaries.md |
| Unresolved domain vocabulary or context ownership; recording a confirmed qualifying ADR | Invoke domain-modeling; consume its canonical terms or ADR while keeping backend pattern selection here |
| Transactions, concurrency, distributed consistency, data access and lifecycle | references/consistency-and-data.md |
| API, event, schema, or consumer compatibility and evolution | references/contracts-and-evolution.md |
| Remote, asynchronous, partial-failure, or capacity policy | Invoke the resilience skill — in this repository at skills/workflows/resilience/, in an installed flat scope as a sibling resilience/ folder — and consume its policy and evidence requirements |
| Queues, delivery semantics, publish/subscribe | references/messaging.md |
| Caching, batching, pagination, throughput and cost modeling | references/caching-and-performance.md |
| Regional topology, replication placement, failover, restore | references/topology-and-continuity.md |
| Authentication, authorization, auditability, telemetry | references/security-and-observability.md; invoke security-review for a deep review of changed trust boundaries |
| Node.js/TypeScript implementation: project and runtime setup, composition, validation and error mapping, persistence and job wiring | Invoke ts-backend; it expresses the selected backend architecture in Node.js and TypeScript forms |
Completion criterion: candidate patterns come from the problem branch rather than from habit.
4. Compare the smallest viable options
For each candidate, record:
- Context — conditions in which it applies.
- Forces — competing goals such as consistency versus availability.
- Solution shape — components and their relationships, without framework syntax.
- Invariant — what must remain true.
- Consequences — complexity, latency, storage, and operational cost.
- Failure modes — how the pattern is commonly misapplied.
- Verification — tests, metrics, traces, constraints, or failure injection that prove it works.
Include the simplest option, including keeping the current design. Prefer the least complex option that satisfies the invariant.
5. Map the pattern to the codebase
Use the project's native primitives and terminology. Keep conceptual boundaries distinct from file-count or class-count: a boundary can be a function, module, process, database constraint, policy, or protocol.
Document where the invariant is enforced. If enforcement spans systems, identify the gap and the recovery mechanism.
Completion criterion: the proposal names concrete integration points without pretending the example implementation is the pattern.
6. Verify the behavior
Match verification to the risk:
- concurrency properties: race tests plus database constraints;
- delivery semantics: duplicate, delayed, reordered, and poison messages;
- resilience: consume the focused failure scenarios and observable requirements from
resilience; do not derive a second failure policy; - consistency: concurrency and storage-invariant tests plus the partial-failure and recovery requirements consumed from
resilience; - contracts and migrations: supported-version matrices, mixed-version tests, backfill reconciliation, and explicit contract-removal evidence;
- topology and continuity: restore tests, failover/failback exercises, replication-lag bounds, and RPO/RTO evidence;
- security: deny-by-default authorization tests and audit evidence; route changed trust boundaries to
security-review; - performance: representative load, latency percentiles, saturation signals, workload skew, and unit-cost evidence.
Report what was proved, what remains assumed, and the operational signals needed after deployment.
Pattern Selection Rules
- Treat transaction script, service layer, vertical slice, ports and adapters, and event-driven designs as alternatives shaped by context—not maturity levels.
- Add a repository boundary when it protects domain code from meaningful persistence complexity or supports multiple callers/adapters. Direct data access is valid for a simple local operation.
- Route deadlines, retries, retry or replay safety, overload, and operation-level partial-failure recovery policy to
resilience; this Skill maps that policy, while topology and continuity own regional authority, restore, failover, and failback architecture. - A cache is a replicated view with a freshness policy. Define invalidation, ownership, fallback behavior, and stampede control before adding it.
- At-least-once delivery requires duplicate-safe consumers. Ordering is scoped to the guarantees of the chosen broker and partition key.
- Cross-service consistency requires explicit compensation, reconciliation, or durable state transfer; local database transactions do not cross remote calls.
- Authentication establishes identity. Authorization evaluates whether that identity may perform this action on this resource in this context.
- In-process state is process-local. Do not use it to claim distributed rate limits, durable work, global locks, or cross-instance coordination.
- Compatibility is a time-bounded invariant across deployed versions, consumers, and stored data. Versioning alone does not prove coexistence or safe removal.
- Prefer one authoritative write owner. A multi-writer or active-active topology is incomplete until conflict semantics, failover, failback, and reconciliation are explicit.
- Separate architecture selection from delivery sequencing. Hand migration and rollout steps to
plan; do not hide irreversible data transitions behind a generic rollback claim. - Use canonical domain terms and context ownership from
domain-modeling; do not redefine them inside an implementation recommendation. Backend pattern comparison and selection remain this Skill's responsibility.
Output Contract
Scale depth to scope: combine headings for a small local decision; use the full structure for cross-system, irreversible, security-sensitive, or continuity-critical work. Mark a section not applicable rather than manufacturing concerns.
When proposing or reviewing a backend pattern, return:
Context and constraints
Problem and invariant
Current design
Candidate options and trade-offs
Selected pattern and why
Rejected alternatives and why
Implementation and evolution mapping
Operational ownership and continuity
Failure modes
Verification plan
Assumptions and open risksThe pattern is not complete until its applicability boundary, cost, and verification method are stated.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

