본문으로 건너뛰기
cccskills
무료GitHub에 공개

type-driven

Use when modeling a domain, encoding a state machine, hardening APIs, making invalid states unrepresentable, or parsing instead of validating. Not for TypeScript: use typescript-best-practices.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(5)

  • SKILL.md3.9 KB
  • agents/openai.yaml207 B
  • references/examples.md3.0 KB
  • references/formal-tools.md1.0 KB
  • references/patterns.md2.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Type-driven development

Contract

FieldBound contract
TriggerThe work is modeling a domain, encoding a state machine, hardening an API boundary, making invalid states unrepresentable, or parsing instead of validating.
AuthorityReversible local: writes only domain types, public signatures, and affected callers and tests; rollback is version control or undo. No remote mutation.
Side effectRewrites domain types, public signatures, and affected callers and tests to the new algebraic model.
DoneInvalid states are unconstructible, matches are exhaustive, boundaries parse, and no scattered post-hoc validation remains.

Inputs

Required: the domain problem, data model, or API surface to encode. Optional: existing types or callers to refactor.

Refusals

  • Will not add runtime guards to fix a type-design failure: fix the type design.
  • Will not add a wildcard arm to silence a non-exhaustive match: add the missing variant.
  • Will not proceed with type holes or incomplete bodies.
  • Will not use this approach when the language lacks ADTs, sealed hierarchies, or equivalent sum-type support: skip and report.

Procedure

  1. Plan. State the domain in one paragraph. List all valid states, all invalid states, and every operation with its preconditions and postconditions. If any operation is partial, mark it as such. Done when: the domain is stated with valid states, invalid states, and operations listed.
  2. Design types first. For each invalid state, write a type that the compiler prevents. Use ADTs, phantom types, branded types, newtype wrappers, sealed hierarchies, or opaque types, whichever the language supports. Do not write implementation bodies until all types compile. Done when: all types compile and every invalid state is unrepresentable.
  3. Parse at boundaries. For every untrusted input (external data, deserialization, FFI, user input), write a parse constructor that returns the new type. Do not return bool and defer validity to callers. Done when: every untrusted input boundary has a parse function returning the new type.
  4. Exhaustive matching. Encode state machine transitions as exhaustive match/switch/visit on the sum type. Compiler warnings on incomplete arms are failures. Done when: every state-machine transition is an exhaustive match with no wildcard arms.
  5. Verify. Run the language's strict type checker and exhaustiveness check. Fix the type design, not the implementation, when the checker reports an illegal state is representable. Done when: the type checker and exhaustiveness check pass.
  6. Build. Run the full target build. Implement the bodies guided by the types. Done when: the target build passes.

Failure and recovery

Failure classBehavior
Unsupported languageIf the language lacks ADTs, sealed hierarchies, or equivalent sum-type support, skip this approach and report.
Type checker failureBlock. Fix the type design until the invalid state is unrepresentable. Do not add runtime guards.
Non-exhaustive matchCompile-time failure. Add the missing variant to the type, not a wildcard arm.
Invalid state remains representableBlock. The type design is insufficient; iterate until the compiler enforces the invariant.
Type holes remainBlock. Complete all incomplete bodies or remove the holes before proceeding.
Build failsBlock. Resolve implementation errors until the target build passes.

Output

A domain type system where every algebraic constructor is present, every boundary has a parse function returning the new type, every state-machine variant is matched exhaustively, and no runtime validation scattered outside the parse layer remains.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when explaining System V AMD64, ARM AAPCS, RISC-V psABI, stack frames, variadic calls, or FFI register rules. Not for the Rust FFI binding layer: use rust-ffi.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

Use when configuring ADC sampling time, DMA-driven ADC, calibration, or DAC channel setup on bare-metal MCUs. Not for the DMA stream itself: use dma-baremetal.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

af-xdp

무료

Use when creating AF_XDP sockets, configuring UMEM and XSK rings, writing an XDP redirect program, or choosing copy versus zero-copy mode. Not for full kernel bypass: use dpdk.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

Use when a completed session needs an agent-environment retrospective. Not for an engineering retrospective from telemetry: use engineering-retrospective.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

Use when a redacted, trimmed agent transcript must be appended to a GitHub PR or issue body, with human approval and preview. Not for automated or model-initiated insertion.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

agents-md

무료

Use when a repo needs agent setup, AGENTS.md added or made lean, CLAUDE.md audited, or agent instructions scored or pruned. Not for remote, credential, publish, deploy, or irreversible changes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

OutlineDriven의 스킬 모두 보기

이 스킬의 문제 신고