shakacode/agent-workflows/type-design-review
Claude Code and agent skill by shakacode/agent-workflows
- community
Checking that the SKILL.md file is still in the repository.
Use when reviewing data models, signatures, domain types, parsing, casts, or state machines so invalid states stay hard to represent.
Install
npx vskill@latest install shakacode/agent-workflows/type-design-reviewSKILL.md
The same SKILL.md was published earlier as shakacode/agent-workflows/type-design-review.
Type Design Review
Use this as a focused review lens when a diff adds or changes data models, function signatures, domain types, parsing/validation boundaries, casts, or state machines.
The central question: what states does this type allow, and which of those does the domain forbid? A permitted-but-forbidden state is a review finding when it is realistically reachable, would cause a real bug or repeated defensive checks, and can be prevented with a reasonably small type change.
Review Questions
- Impossible states.
- Are mutually exclusive states modeled as independent booleans or optional
fields?
- Could success and error, loading and loaded, present and absent, or two
incompatible modes be represented at once?
- Would a tagged union, sum type, enum-with-data, or explicit state object
make the domain shape clearer?
- Parse, do not merely validate.
- Does validation return
true,false, orvoidand then throw away the
proof?
- Can boundary input be parsed into a narrower type that callers carry
inward?
- Does the repo already use a parser/schema library that should be reused?
- Primitive confusion.
- Are domain identifiers, units, currencies, paths, or statuses plain strings
or numbers that can be mixed up?
- Would a branded, opaque, wrapper, or language-native newtype prevent a real
class of mistakes?
- Unsafe assertions and nullability.
- Did the diff add unchecked casts,
as any, non-null assertions, or
equivalent escape hatches?
- Is there a nearby runtime check, parser, or control-flow narrowing that
justifies the assertion?
- Exhaustiveness.
- Do switches, matches, or conditionals over closed states fail at compile
time when a new state is added?
- If the language supports exhaustive matching, is the code using it?
- Derived vs duplicated state.
- Are count, index, selected item, cache, or status fields stored separately
from the source that defines them?
- Can the code derive one from the other to remove desynchronization?
Proportionality
Do not add type ceremony for free text, throwaway locals, or combinations the domain genuinely permits. The finding must name the invalid state it prevents. If every represented state is valid, the type is already precise enough.
Do not recommend a new dependency just to satisfy this review. Prefer an existing parser/schema tool when the repo already uses one; otherwise suggest a small local constructor or guard.
Output
For each finding, include:
- smell: impossible state, lost parse proof, primitive confusion, unsafe
assertion, missing exhaustiveness, or duplicated state
- invalid state that is currently representable
- location
- concrete restructuring
- severity:
BLOCKER,SHOULD, orNIT
If the diff has no type-design issue, say that clearly and leave correctness, simplicity, and test coverage to the general review workflow.
Source Note
Inspired by the type-design review lens in lucasfcosta/backpressured, adapted here as portable seam-driven workflow guidance.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/type-design-review/SKILL.md
Popularity
- Repository stars
- 8
- Repository forks
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/shakacode/agent-workflows/type-design-review)