Toolverse
All skills

m05-type-driven

by actionbook

CRITICAL: Use for type-driven design. Triggers: type state, PhantomData, newtype, marker trait, builder pattern, make invalid states unrepresentable, compile-time validation, sealed trait, ZST, 类型状态, 新类型模式, 类型驱动设计

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Category
UX / Design

About this skill

CRITICAL: Use for type-driven design. Triggers: type state, PhantomData, newtype, marker trait, builder pattern, make invalid states unrepresentable, compile-time validation, sealed trait, ZST, 类型状态, 新类型模式, 类型驱动设计

How to use

  1. Zainstaluj skill m05-type-driven z repozytorium actionbook/rust-skills jako referencję do projektowania typów.

  2. Gdy napotykasz problem wymagający walidacji (np. format e-maila, zakres liczby, stan obiektu), zamiast dodawać kontrolę runtime, zadaj sobie pytanie: czy typ może zakodować to ograniczenie?

  3. Dla każdego wariantu problemu sprawdź tabelę wzorców w README — jeśli masz obsesję na primitywy ("to tylko string"), flagi logiczne lub wszędzie Optional, skill podpowiada, jak zamienić to w typy.

  4. Zastosuj odpowiedni wzorzec: newtype dla wartości semantycznych, type state pattern dla przejść między stanami, builder pattern dla złożonych konstruktorów, sealed trait do ograniczenia implementacji.

  5. Jeśli projekt typów pozostaje niejasny, skorzystaj z wskazówki "Trace Up" — przejdź do skill m09-domain, aby zdefiniować model domeny i prawidłowe przejścia stanów.

  6. Weryfikuj, że kompilator teraz odrzuca nieprawidłowe stany — jeśli kod się kompiluje, invarianty są gwarantowane bez testów runtime.

Related skills

competitive-landscape

by wshobson

This skill should be used when the user asks to \

UX / Design
1457

mcp-builder

by anthropics

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

UX / Design
91171

3d-graphics

by samhvw8

3D web graphics with Three.js (WebGL/WebGPU). Capabilities: scenes, cameras, geometries, materials, lights, animations, model loading (GLTF/FBX), PBR materials, shadows, post-processing (bloom, SSAO, SSR), custom shaders, instancing, LOD, physics, VR/XR. Actions: create, build,

UX / Design
2595

stitch-ui-design

by sickn33

Expert guide for creating effective prompts for Google Stitch AI UI design tool. Use when user wants to design UI/UX in Stitch, create app interfaces, generate mobile/web designs, or needs help crafting Stitch prompts. Covers prompt structure, specificity techniques, iteration

UX / Design
1670

sound-engineer

by erichowens

Expert audio engineer specializing in spatial audio, procedural sound design, interactive audio systems, and real-time DSP

UX / Design
14102

mermaid

by iOfficeAI

Render Mermaid diagrams as SVG or ASCII art using beautiful-mermaid. Use when users need to create flowcharts, sequence diagrams, state diagrams, class diagrams, or ER diagrams. Supports both graphical SVG output and terminal-friendly ASCII/Unicode output.

UX / Design
1881