By iwasa-kosui
Enforce domain-driven TypeScript patterns — discriminated unions, branded types, Result error handling, boundary validation, and PII protection — through code review and guided modeling for server-side applications.
Adversarial code review of server-side TypeScript for adherence to the kamae principles (discriminated unions, branded types, Result error handling, boundary validation, PII protection). TRIGGER when: reviewing a pull request, audit, or quality check of TypeScript server-side code involving domain models, repositories, use cases, business logic, or boundary code. SKIP: frontend code review, infrastructure-as-code review, test-only review, code review unrelated to domain logic.
Kamae (構え) — robust server-side TypeScript design. Functional domain modeling with discriminated unions, pure state transitions, Result types, schema-validated boundaries, and PII protection. TRIGGER when: writing TypeScript domain models, use cases, repositories, state transitions, error handling, boundary validation, or PII handling on the server side; designing types for business logic; implementing entity/value-object semantics in TS. SKIP: frontend React/Vue components, browser code, build tooling, code generation scripts, pure infrastructure-as-code; code unrelated to domain logic.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
日本語版: README.ja.md
Kamae (構え) — a stance of readiness.
An extensible harness of skill plugins for designing and implementing robust server-side TypeScript applications. Each skill encodes a kamae — a practiced stance for a specific design concern — that coding agents apply when generating or reviewing code.
The current stances focus on functional domain modeling; more will be added over time.
Via gh skill (the GitHub CLI's agent skills extension):
# Install a single skill (interactive prompt for agent/scope)
gh skill install iwasa-kosui/kamae-ts kamae
# Install non-interactively for Claude Code at user scope
gh skill install iwasa-kosui/kamae-ts kamae \
--agent claude-code --scope user
# Pin to a specific release
gh skill install iwasa-kosui/kamae-ts [email protected]
Or via skills CLI:
npx skills add iwasa-kosui/kamae-ts
kamaeTriggered when writing server-side TypeScript code (domain models, use cases, repositories, state transitions, error handling, boundary validation, PII protection). Guides code generation through a thin dispatcher SKILL.md that lazy-loads topic sub-files (domain-modeling.md, state-modeling.md, error-handling.md, boundary-defense.md, declarative-style.md, test-data.md) and library-specific guides only when relevant.
kamae-reviewTriggered during code review. Walks a checklist of severity-tagged review items (split across checklist/*.md sub-files) and reports findings citing the canonical principle in kamae. Depends on kamae being installed for the knowledge base — install both together.
Both skills load applicable rules at the start of each invocation, in priority order:
.claude/rules/*.md (project)~/.claude/rules/*.md (user-global)rules/defaults/*.mdA rule applies to kamae-ts when its frontmatter declares applies-to: kamae, applies-to: kamae-review, or applies-to: "*". Four rule types are supported:
library-preference — pin a specific Result or validation library (overrides auto-detection)check-toggle — disable a named review check (e.g., PII protection for projects with no personal data)convention — declare project-specific conventions (e.g., "Branded Types live in src/types/brand.ts")override — replace specific guidance from a topic sub-fileSee rules/README.md for the rule format and concrete examples.
For full skill replacement, use Claude Code's standard skill path-shadowing (.claude/skills/kamae/SKILL.md overrides the installed plugin's).
Skill quality is continuously evaluated with microsoft/waza.
evals/kamae/ and evals/kamae-review/..github/workflows/eval.yml runs both suites on every pull_request that touches skills/**, evals/**, rules/**, or .waza.yaml, using the copilot-sdk executor.A reading version of the principles is published at https://iwasa-kosui.github.io/kamae-ts/, in both English (/en/) and Japanese (/ja/).
Join the official Discord server to discuss server-side TypeScript, ask questions, and share what you are working on: https://discord.gg/Z9HVbqEWzd
These principles are based on the following articles:
npx claudepluginhub iwasa-kosui/kamae-ts --plugin kamae-tsDevsForge 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.
TypeScript-first schema validation and type inference. Use for validating API requests/responses, form data, env vars, configs, defining type-safe schemas with runtime validation, transforming data, generating JSON Schema for OpenAPI/AI, or encountering missing validation errors, type inference issues, validation error handling problems. Zero dependencies (2kb gzipped).
JavaScript and TypeScript development with modern patterns and Node.js backend
15 specialized agents and 22 skills for TypeScript fullstack development with Fastify, Next.js, PostgreSQL, Redis, and more.
TypeScript/JavaScript full-stack development with NestJS, React, and React Native