type-breakdown
FreeNo executable scriptsNot checkedMaps a code path's types, abstractions, data flow, side effects, and errors. Use only when the user explicitly asks for a type breakdown of a feature, flow…
by iurysza★ 423 GitHub starsAbout this skill
Type Breakdown
Walk the user through the requested code paths, types, abstractions, and data flow.
Turn a broad plan into a concrete, type-driven implementation outline. Prefer pseudocode, type signatures, and execution structure over PRD-style prose.
Inspect the existing code before proposing new abstractions.
If the subject is simple, keep the walkthrough concise. Otherwise, use the structure below as a reference. Do not follow it rigidly when a section does not apply.
Use these markers:
[existing] Confirmed in the codebase
[inferred] Implied by the current implementation
[proposed] Introduced by this plan
[?] Unresolved
Execution Tree
Start from the entry point and expand the call path recursively in execution order.
For every relevant call, show:
- Fully qualified function, method, class, or module name
- File where it is defined
- Parent file and call site
- Responsibility
- Input and output types
- Data transformations
- Side effects
- Possible errors
- Child calls
Use this format:
▼ [existing] CheckoutController.create
defined: src/checkout/api/CheckoutController.ts:24
input: CreateCheckoutRequest
output: Promise<HttpResponse<CreateCheckoutResponse>>
└─▶ [existing] CreateCheckout.execute
defined: src/checkout/application/CreateCheckout.ts:18
called: CheckoutController.ts:42
input: CreateCheckoutCommand
output: Result<Checkout, CreateCheckoutError>
effects: reads customer, writes checkout
├─▶ CustomerRepository.find
├─▶ Checkout.create
└─▶ CheckoutRepository.save
Use × N for repeated calls over collections. Do not invent line numbers when they are unavailable.
Type Flow
Show how data becomes progressively more constrained:
unknown
→ CreateCheckoutRequest
→ CreateCheckoutCommand
→ ResolvedCheckoutInput
→ Checkout
→ CheckoutRow
→ CreateCheckoutResponse
Identify the validation or transformation responsible for each transition.
Type Definitions
Provide pseudocode definitions for the important boundary, application, domain, persistence, state, and error types.
type CreateCheckoutCommand = {
customerId: CustomerId;
items: NonEmptyArray<CheckoutItemInput>;
};
type CreateCheckoutError =
| { type: "CustomerNotFound"; customerId: CustomerId }
| { type: "InvalidCheckout"; cause: CheckoutValidationError }
| { type: "PersistenceFailure"; cause: PersistenceError };
Prefer domain-specific types over primitive strings and numbers when they encode identity, validation, units, or invariants.
Error Flow
Show where each error originates and how it is mapped and propagated:
UniqueConstraintViolation
→ PersistenceError.Conflict
→ CreateCheckoutError.PersistenceFailure
→ HTTP 409
Implementation Outline
Finish with:
- Proposed functions and type signatures
- Type ownership by file or module
- Existing code that must change
- New files or abstractions required
- Unresolved design questions
Keep the output concrete, source-aware, and directly reviewable as an implementation plan.
Install type-breakdown in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the type-breakdown skill do?
Maps a code path's types, abstractions, data flow, side effects, and errors. Use only when the user explicitly asks for a type breakdown of a feature, flow, or code path.
How do I install the type-breakdown skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the type-breakdown skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
by Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
by Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
by Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
by Anthropic