By iwasa-kosui
Guide functional domain modeling in server-side TypeScript using discriminated unions for states, pure functions for transitions, Result types for errors, and boundary defenses across domain models, use cases, repositories, and business logic. Review code for adherence to these principles including companion objects, branded types, immutability, exhaustiveness, and declarative style.
npx claudepluginhub iwasa-kosui/functional-ts-principlesサーバーサイドTypeScriptでドメインモデル、ユースケース、リポジトリ、状態遷移、ビジネスロジックを書くときに使用する。Discriminated Union、純粋関数、Result型による関数型ドメインモデリングをガイドする。
サーバーサイドTypeScriptコードを関数型ドメインモデリング原則に照らしてレビューする。`functional-ts-ja` スキルと同じナレッジを参照し、Discriminated Union、Companion Object、Branded Types、不変性、ファイル構成、純粋関数による状態遷移、網羅性チェック、Result型によるエラーハンドリング、境界の防御(スキーマバリデーション・`as` 禁止・PII 保護)、宣言的スタイル、型安全なテストデータをチェックする。
Use when reviewing TypeScript server-side code for adherence to functional domain modeling principles. Checks the same principles enforced by the `functional-ts` skill — discriminated unions, companion objects, branded types, immutability, file structure, pure state transitions, exhaustiveness, Result-based error handling, boundary defense (schema validation, no `as`, PII protection), declarative style, and type-safe test data.
Use when writing server-side TypeScript code involving domain models, use cases, repositories, state transitions, or business logic. Guides functional domain modeling with discriminated unions, pure functions, and Result types.
Share bugs, ideas, or general feedback.
日本語版: README.ja.md
Provides principles for practicing functional domain modeling in server-side TypeScript as skill plugins for coding agents.
npx skills add iwasa-kosui/functional-ts-principles
functional-tsAutomatically triggered when writing server-side TypeScript code (domain models, use cases, repositories). Guides code generation following the principles.
functional-ts-reviewTriggered during code review. Detects code patterns that violate the principles (class usage, type assertions, thrown exceptions, unprotected PII, etc.) and suggests fixes.
functional-ts-ja / functional-ts-review-jaJapanese versions of the above skills.
These principles are based on the following articles:
MIT
TypeScript development with strict typing, React patterns, and modern tooling
Outfitter Stack patterns: Result types, handler contract, error taxonomy for type-safe APIs
DevsForge TypeScript type generator from JSON data, API responses, with quicktype integration and Zod schema generation
Effect validation and type checking for TypeScript projects using the Effect library.
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Develop, test, build, and deploy Godot 4.x games with Claude Code. Includes GdUnit4 testing, web/desktop exports, CI/CD pipelines, and deployment to Vercel/GitHub Pages/itch.io.