An agentic skills framework & software development methodology that works.
Claude Code skills for server-side TypeScript stances
kamae-ts is a skill pack that teaches Claude Code a set of repeatable stances for server-side TypeScript work. The skills load topic guidance only when needed, so the agent gets focused rules for domain modeling, state changes, errors, boundaries, and review checks.
Builders who use Claude Code to design, implement, or review server-side TypeScript.
You can get more consistent domain models and code reviews without re-explaining the same TypeScript design choices.
What it does
Domain modeling skill
Guides the agent toward discriminated unions, pure state transitions, and domain state that avoids classes.
Review skill
Runs a checklist-based review flow with severity-tagged items and links findings back to the core stance guidance.
Rule loading
Applies project, user, and default rules in priority order so teams can override library preferences, checks, and conventions.
Lazy-loaded topic files
Loads only the relevant sub-files for domain modeling, state modeling, error handling, boundary defense, declarative style, and test data.
Benchmark and design notes
Includes benchmark scenarios and evaluation drafts for checking how the guidance affects generated code.
How to get it
- 1Or via skills CLI
npx skills add iwasa-kosui/kamae-ts
README
日本語版: README.ja.md
kamae-ts
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.
Overview of Principles
- Represent domain state with Discriminated Unions, avoiding classes
- Define state transitions with pure functions, making invalid transitions compile errors
- Represent expected domain failures with Result types (neverthrow / byethrow / fp-ts / option-t), while allowing unexpected faults to propagate as exceptions
- Validate external boundaries with schema validation (Zod / Valibot / ArkType), trusting types inside the domain
- Protect PII at runtime with the Sensitive type
Installation
Via gh skill (the GitHub CLI's agent skills extension):
# Install both skills (interactive prompt for agent/scope)
gh skill install iwasa-kosui/kamae-ts kamae
gh skill install iwasa-kosui/kamae-ts kamae-review
# Install both skills non-interactively for Claude Code at user scope
gh skill install iwasa-kosui/kamae-ts kamae \
--agent claude-code --scope user
gh skill install iwasa-kosui/kamae-ts kamae-review \
--agent claude-code --scope user
# Pin both skills to a specific release
gh skill install iwasa-kosui/kamae-ts kamae@v1.0.0
gh skill install iwasa-kosui/kamae-ts kamae-review@v1.0.0
Or via skills CLI:
npx skills add iwasa-kosui/kamae-ts
Provided Skills
kamae
Triggered 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-review
Triggered 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.
Customization via Rules
Both skills load applicable rules at the start of each invocation, in priority order:
.claude/rules/*.md(project)~/.claude/rules/*.md(user-global)- The plugin's own
rules/defaults/*.md
A 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 insrc/types/brand.ts")override— replace specific guidance from a topic sub-file
See 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).
Benchmark
The proposed DMMF design evaluation assesses how generated code applies functional domain modeling. Functional acceptance scores and gates are outside that assessment. Its grader is not yet implemented or calibrated.
The detailed rubric draft in Japanese defines criterion-specific anchors, evidence requirements, and calibration cases.
Three design scenarios now provide initial tasks, withheld follow-up changes, and evaluator-only observation maps. Their preparation CLI packages inputs without model calls. Read the scenario preview before execution; generation and assessment remain pending.
The historical PRD harness and its protocol remain available for inspecting earlier work. Its acceptance-based comparison was rejected as an evaluation of the skill's design effectiveness.
Documentation
A reading version of the principles is published at https://iwasa-kosui.github.io/kamae-ts/, in both English (/en/) and Japanese (/ja/).
Community
Join the official Discord server to discuss server-side TypeScript, ask questions, and share what you are working on: https://discord.gg/Z9HVbqEWzd
- See the community page for channel layout and what kind of conversation happens there.
- Both this GitHub repository and the Discord server are governed by the Code of Conduct (Contributor Covenant v2.1).
Reference Articles
These principles are based on the following articles:
- Complex state transitions: Expressing state definitions and transitions with functions and Discriminated Unions instead of classes
- Implementing the State pattern with Discriminated Unions
- Designing TypeScript code for easy domain event recording
- Why you should avoid method notation in TypeScript
- Why I prefer type over interface in TypeScript
- Preventing PII leaks in logs: TypeScript type inference and runtime boundaries
- How to teach server-side TypeScript's type system
- as const satisfies is useful for TypeScript tests
- Declarative array operations in TypeScript
- TypeScript class pitfalls for developers from other languages
License
MIT
Files in the repo
- .claude-plugin
- .github
- benchmarks
- docs
- rules
- scripts
- skills
- .gitignore
- bun.lock
- CLAUDE.md
- CODE_OF_CONDUCT.ja.md
- CODE_OF_CONDUCT.md
- LICENSE
- package.json
- README.ja.md
- README.md
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More skills

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.
Topic in, narrated explainer video out. A Claude Code / Codex skill that turns any topic into a black-canvas motion-graphics explainer video with TTS voiceover, subtitles and a chapter progress bar. Chinese or English; every frame drawn in code with Remotion.
Public repository for Agent Skills
Open-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)

Production-grade engineering skills for AI coding agents.