/tslateman-skills:domain-modelfrom tslateman-skills
Judge whether the domain holds its own invariants, applying Evans' Domain-Driven Design and the functional-core/imperative-shell split. Use when business rules sit in controllers or services, when data classes are passive property bags mutated from outside, when callers must sequence init/validate/save to stay consistent, or when testing a business rule needs a database mock. Names the aggregate that should own each invariant. Do NOT use to judge how a diff will age (that is maintainability) or to sweep a codebase for deepening candidates (that is improve-codebase-architecture).
Ships in tslateman-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.
Answers one question: does the code that owns the state also own the rules about that state? Where it does not, business logic has been transliterated into procedural scripts and the data left passive. This skill locates the invariants and names the aggregate that should hold them; it never executes the restructure.
maintainability.improve-codebase-architecture.ousterhout-software-design.refactor.Run these against the target files. Each one fails loudly or not at all; there is no partial credit.
order.status = "shipped" is a setter; order.ship(carrier) is a business event.if balance > 0 in a route handler is the rule leaking to whoever remembered to write it.Anemic models. Data classes, ORM models, and DTOs that serve as property bags while external services mutate them field by field. The tell is a class with no methods beyond accessors, paired with a -Manager, -Processor, -Handler, or bare -Service that does all the deciding. Those name suffixes are the search index, not the finding; a Service that owns its invariants is fine.
Orchestration scripts. A method that fetches data, branches on that data's behalf, mutates its fields, and calls I/O inline. Five or more sequential steps in one method is the threshold worth reading closely.
Temporal coupling. An interface where callers must invoke methods in a precise order to avoid an inconsistent state: init(), then validate(), then process(), then save(). Every caller now carries the sequence, and no caller can be checked against it.
Representable invalid states. An object that can exist in a state the business forbids: a reservation marked checked-in before it is confirmed. Prefer a type that cannot express the invalid state over a validator that rejects it.
I/O braided through decisions. Pure decision logic interleaved with reads and writes. This is the root cause the mocking test detects.
Split each finding's fix into two named halves:
The split is the deliverable. A finding that names the smell but not the aggregate that should own the invariant is unfinished.
Open with the architectural risk in two or three sentences: which invariants are unowned, and what that costs.
Then one finding per problem:
file:linerefactor with the named restructure, or "accept and note"Rank by blast radius: an invariant checked in three call sites outranks one checked in a single handler. Where a fix is worth showing, give the before and after as code, not prose.
If the domain already owns its rules, say so plainly and stop. No filler findings.
What SKILL.md sets; muted values are Claude Code's defaults
tslateman-skills@tslateman is listed by tslateman/claude-plugins — review the source before installing
npx claudepluginhub tslateman/claude-plugins --plugin tslateman-skills61 skills in this plugin
/adrGenerate Architecture Decision Records that capture the reasoning behind technical decisions. Use when the user asks to "create an ADR", "document a decision", "record why we chose X", or discusses architectural trade-offs worth preserving./arenaSpawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for /arena, 'arena this', 'throw it in the arena', or when one attempt at a non-trivial artifact would lock in the wrong shape./automagic-problem-discoveryAudit a workspace for recurring friction, pick the highest-leverage one, and build the automation that removes it. Use when the user asks "what should I automate", "what's wasting my time", "find the friction in my workflow", wants a self-improvement pass over their own tooling, or runs this on a recurring loop.