enterprise-patterns
Use when an enterprise app's infrastructure decisions are in play — where business logic lives, transaction and identity coordination, application-level…
Skill by dekoza
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/dekoza-enterprise-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.
About
Use cases: design, backend, devops, data
Reviews
Write a reviewNo 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/enterprise-patterns
What's inside
- Skill name
enterprise-patterns- Description
- Use when an enterprise app's infrastructure decisions are in play — where business logic lives, transaction and identity coordination, application-level (offline) concurrency, session-state placement, or remote/distribution boundaries. Domain modeling defers to domain-driven-design and database isolation/transactions to data-intensive; based on Patterns of Enterprise Application Architecture (Fowler). Triggers on: "Transaction Script vs Domain Model", "Unit of Work", "Identity Map", "optimistic vs pessimistic offline lock", "session-state placement", "Remote Facade", "generic repository everywhere".
- License
- Unlicense
- Instructions
- 126 lines in SKILL.md · view on GitHub
Files (7)
- SKILL.md
- benchmark.md · evals/
- evals.json · evals/
- trigger-evals.json · evals/
- business-logic-and-persistence.md · references/
- concurrency-and-sessions.md · references/
- distribution-and-base-patterns.md · references/
SKILL.md (first lines)
# Enterprise Patterns Persistence, concurrency, session, and distribution structure for enterprise apps — the infrastructure *around* a domain, not the domain model itself. Reach for a small set of named patterns under concrete pressure; do not invent architecture for every feature. ## Defer before you pattern **Domain modeling belongs to [domain-driven-design](../domain-driven-design/SKILL.md).** When rich domain rules, aggregates, or ubiquitous language are the question, that skill owns it. This skill owns where logic *lives* and how it reaches storage, concurrency, sessions, and remote callers. When both are loaded, keep DDD primary — decide the domain model there, then choose the persistence and workflow patterns here. Do not oscillate between "rich domain model" and "a Transaction Script is fine." **Cross-link the ground other skills already own — never restate it:** | Ground | Owner | |---|---| | N+1 / Lazy Load in the ORM (`select_related`/`prefetch_related`) | [django](../../reference/django/SKILL.md) | | DTO / serializer at the HTTP boundary | [drf](../../reference/drf/SKILL.md) | | DB transactions, isolation levels, lost-update/write-skew, derived data | [data-intensive](../data-intensive/SKILL.md) | | Repository / Service Layer as *domain* access, Aggregates | [domain-driven-design](../domain-driven-design/SKILL.md) | | Latency budgets, timeouts, partial failure at remote calls | [production-readiness](../production-readiness/SKILL.md) | ## Forbidden patterns — treat as review blockers Stop and reshape when you see any of these; each is a structural defect, not a style nit: - **Generic CRUD repository everywhere** — one `save/get/list/delete<T>` abstraction shaped by tables instead of use cases. Shape repositories by what the application asks for. - **ORM model doubling as aggregate, service, and DTO** — one persistence class carrying domain rules, workflow, and transport shape at once. Split by responsibility. - **Controller owning the workflow** — a request handler coordinating transactions, SQL, domain rules, and external calls. Move coordination into an application/service operation. - **Layering theater** — layers that only forward calls, earning no reduction in coupling. Delete the pass-through or give the layer a real job. ## Choose the business-logic pattern by force The central decision. Pick by the actual complexity, not by habit or ORM convenience, and **escalate when the forces below appear** — do not start heavy: | Pattern | Fits when | Escalate when | |---|---|---| | **Transaction Script** | Each use case is short, mostly independent, few rules | Decisions or validation duplicate across scripts; invariants or lifecycle appear | | **Table Module** | Logic is set-oriented around tabular data; identity isn't the organizing force | The real model is about individual objects with behavior and identity, not tables | | **Domain Model** | Significant rules, invariants, identity, lifecycle, collaboration | (Terminal — hand the modeling to [domain-driven-design](../domain-driven-design/SKILL.md)) | Keep each honest: Transaction Scripts stay use-case-focused (not dumping grounds), Table Modules stay tabular (don't fake entities), Domain Models carry the behavior (not anemic). **Active Record** is acceptable only for simple domains that accept persistence coupling — Django's ORM *is* Active Record, so lean on [django](../../reference/django/SKILL.md) for its costs. ## Coordinate identity and writes explicitly - **Unit of Work** — commit a logical change as one transaction with a clear owner. Keep transaction boundaries explicit in the workflow, short, and out of hidden helpers. - **Identity Map** — one in-memory object per identity per scope, so duplicate instances don't fight inside one unit of work. - Make loading behavior visible: when lazy loading, hidden auto-persistence, N+1, or ad-hoc saves could happen inside one work scope, decide identity scope and loading up front. ## Choose application-level (offline) concurrency deliberately Concurrency that spans a *user think-time gap* — a read-render-edit-save cycle across requests — is **not** the same as DB isolation (that's [data-intensive](../data-intensive/SKILL.md)). Name the semantics instead of relying on developer discipline: - **Optimistic Offline Lock** — conflicts possible but uncommon; detect on write (version check) and surface merge/conflict resolution intentionally. Default choice. - **Pessimistic Offline Lock** — contention expected and the block-others cost is justified. - **Coarse-Grained Lock** — lock a set of related objects together to protect one user-level edit as a unit. - **Implicit Lock** — acquire locks in shared infrastructure so callers can't forget; only when it keeps ownership, contention, and stale-lock cleanup diagnosable. Keep transactions short and remote calls outside transaction spans. ## Place session state deliberately Choose storage by its forces, not by default: | Placement | Choose when | Watch | |---|---|---| | **Client** | Server statelessness / scaling matters | Integrity + security of client-held data | | **Server** | Simple, single-node, or sticky-session | Memory cost, cleanup, server-farm sharing | | **Database** | Durability or server-farm sharing outweighs the cost | Added DB load, cleanup of stale rows | Every session needs a clear owner, lifetime, and cleanup story before features pile on it. ## Keep remote boundaries coarse; don't distribute by default - **Do not distribute** objects or services across a process boundary by default — in-process is faster, simpler, and safer. Distribute only when a real boundary forces it. - When a boundary is genuinely remote, put a **Remote Facade** in front: coarse, batched operations translated to/from DTOs (transport shape, not domain objects), so callers make few round-trips. A chatty remote interface that mirrors local object collaboration is the smell. Budget latency, serialization, versioning, and partial failure at the seam. ## Base patterns — reach only under concrete pressure Name these when the specific pressure appears, never speculatively: | Pattern | Pressure | |---|---| | **Gateway** | Isolate access to an external resource or subsystem behind one interface | | **Mapper** | Move data between two sides that must stay independent (neither knows the other) | | **Layer Supertype** | Real, stable shared behavior across a layer's types | | **Separated Interface** | Client must depend on an interface in a different package than its impl | | **Registry** | A few well-known objects need controlled lookup (sparingly — not global state) | | **Value Object / Money** | Value-equality + immutability; Money for explicit currency/rounding/arithmetic | | **Special Case** | Replace repeated null/exceptional checks with a named object | | **Plugin** | Select or extend an implementation without editing core code | | **Service Stub** | Run or test without a real remote service | | **Record Set** | Tabular data is the natural interchange shape and object behavior isn't needed | ## Reference
From dekoza/oh-my-slop, Unlicense.
More from dekoza/oh-my-slop
- 0.614score
skill-creator
dekoza
Use when creating or editing SKILL.md files, diagnosing skill-triggering failures, or measuring whether a skill improves agent behavior.
SkillAFreshness: A★ 4Claude Code +9 - 0.609score
resolving-merge-conflicts
dekoza
Use when a git merge or rebase is stopped mid-way with conflicting files.
SkillAFreshness: A★ 4Claude Code +9 - 0.605score
diagnosing-bugs
dekoza
Use when facing a bug with no obvious cause, a performance regression, or 5+ test failures at once.
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
setup-project-skills
dekoza
Configure project workflow bindings, preservation policy and launch gates.
SkillAFreshness: A★ 4Claude Code +9 - 0.574score
legacy-code
dekoza
Changing code that is expensive to change safely because behavior is unclear, tests are weak or missing, dependencies are hidden, or runtime/framework setup…
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
construction-craft
dekoza
Use when implementation is blocked by unclear construction prerequisites or tangled routine/data shape, or when system knowledge and artifacts are drifting…
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
domain-driven-design
dekoza
Business complexity, model language, lifecycle rules, or cross-team/system boundaries shape the design more than generic technical organization.
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
production-readiness
dekoza
Services, APIs, jobs, queues, deployment paths, and critical flows that must survive production failures, overload, latency, bad data, and operational mistakes.
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
refactoring-pass
dekoza
Changing existing code structure without intending to change observable behavior.
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
git-guardrails-claude-code
dekoza
Use when the user wants dangerous git commands (push, reset --hard, clean, branch -D, checkout/restore .) blocked by a Claude Code hook before they run — the…
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
codebase-design
dekoza
Use when designing or restructuring a module and reaching for the shared deep-module vocabulary — interface, seam, depth, adapter, leverage, locality — to…
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
data-intensive
dekoza
Systems where correctness depends on data ownership, consistency, durability, replication, partitioning, schema evolution, event flow, replay, or derived-data…
SkillBFreshness: B★ 4Claude Code +9
Signals
- Stars
- 4
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 15, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Unlicense
- Repository
- github.com/dekoza/oh-my-slop
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from dekoza
- 0.614score
skill-creator
dekoza
Use when creating or editing SKILL.md files, diagnosing skill-triggering failures, or measuring whether a skill improves agent behavior.
SkillAFreshness: A★ 4Claude Code +9 - 0.609score
resolving-merge-conflicts
dekoza
Use when a git merge or rebase is stopped mid-way with conflicting files.
SkillAFreshness: A★ 4Claude Code +9 - 0.605score
diagnosing-bugs
dekoza
Use when facing a bug with no obvious cause, a performance regression, or 5+ test failures at once.
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
setup-project-skills
dekoza
Configure project workflow bindings, preservation policy and launch gates.
SkillAFreshness: A★ 4Claude Code +9 - 0.574score
construction-craft
dekoza
Use when implementation is blocked by unclear construction prerequisites or tangled routine/data shape, or when system knowledge and artifacts are drifting…
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
documentation-lifecycle
dekoza
Use when documentation must stay truthful as software changes — writing or revising a spec, ADR, runbook, or API/config reference, splitting user-facing docs…
SkillBFreshness: B★ 4Claude Code +9
Cite this page
enterprise-patterns skill. Agent Mart. https://agentmart.dev/skills/dekoza-enterprise-patterns (last updated 2026-10-24)