/grey-matter:data-modelingfrom grey-matter
Design and review domain types, enums, and schemas so invalid states are unrepresentable (sum types, parse-don't-validate, single source of truth). Use when modeling state, adding fields, or eliminating drift-prone denormalization.
Ships in grey-matter. 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.
Read when SKILL.md points to them.
Representation shapes implementation. Model the domain so an invalid state cannot be constructed: push validity into the type and the downstream guards disappear. A loose representation compounds, because each new state multiplies the call sites that must remember a rule, and every one of them is a site an agent can forget.
This is about the shape of data. The words for the domain are domain-modeling's job;
where a module's interface sits is codebase-design's. A type's invariants are part of that
interface, which is why codebase-design calls this skill while it designs one.
held: bool beside sold: bool admits the
illegal held && sold. A variant type (Open | Held | Sold) makes it unconstructable.
Model lifecycles this way so an illegal transition fails to compile, and let each variant
carry its own data (Held holds the expiry; Open has none).EmailAddress and UserId, not a raw string and
int, wherever the concept carries an invariant. A primitive holds anything; a wrapper
holds only valid values.bool throws away what it learned; a parser returns the refined type. A wrapper
built without a validating constructor protects nothing.The enforcement mechanism differs by language, and each language has a gotcha that silently
defeats it (a catch-all match arm, an unchecked type checker, Go's nil interface). Before
recommending a representation in a specific language, read
references/patterns.md.
Over-modeling is the counter-risk (Goedecke, "Make invalid states unrepresentable"
considered harmful; Protocol Buffers dropped required in proto3). Code is often better
more flexible than the domain. Keep the simple representation when:
Point { x, y }: any two
numbers are legitimate);The line: a single genuine boolean stays; dependent or combined flags (the held and
sold pair) are the real smell.
Regime. These moves govern services and app code. A game's hot frame-loop systems
deliberately keep plain, flat data for cache locality; there, apply move 4 (one fact, one
place) and leave richer types to the service layer. For that regime call the Skill tool with
game-native-design.
To audit an existing type or schema, apply references/review-lens.md:
the firing gates that keep findings precise, the checklist for type shape and persistence,
and the finding format. code-review passes the same lens to its Standards axis when a diff
changes types or schemas. The lens emits findings only; the verdict belongs to code-review.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub smileynet/grey-matter --plugin grey-matter51 skills in this plugin
/adopt-projectAdopt a brownfield repo into grey-matter: characterize its as-is model, subsume existing agent config, seed a triaged board, and wire plumbing./changelogMaintain CHANGELOG.md in Keep a Changelog format with user-facing entries. Use when recording what changed for a release, updating the Unreleased section, or asked to write/update the changelog./cheat-sheetList every skill in this set by category with a one-line description. Use when the user wants a quick reference card of available skills, asks "what skills are there", or "list all commands"./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./code-reviewReview a commit range, staged changes, or working tree on two axes (Standards + Spec) in parallel sub-agents and file findings as tickets. Use to review a branch, PR, WIP changes, or "review since X"./compassFind which skill or flow fits your situation. A router over the skills in this repo. Use when you (or the agent) are unsure which skill to reach for, want to see how the skills fit together, or ask "what should I use for X".