npx skills add ...
npx skills add iwasa-kosui/kamae-ts --skill kamae-review
Adversarial code review of server-side TypeScript for adherence to the kamae principles (discriminated unions, branded types, Result error handling, boundary validation, PII protection).
npx skills add iwasa-kosui/kamae-ts --skill kamae-review
Adversarial review against the kamae principles. The knowledge base lives in ../kamae/; this skill links rather than duplicates.
Before any other step, glob and Read rules in priority order:
.claude/rules/*.md (project-level overrides at the working-tree root)~/.claude/rules/*.md (user-global preferences)../../rules/defaults/*.md relative to this SKILL.md (plugin defaults)For each file:
applies-to is kamae-review or *.name. For each name, keep only the highest-tier instance (1 > 2 > 3); within a tier the lexicographically last filename wins.check-toggle rule with enabled: false removes the named check from the walk in step 3 below.convention rule sets project-specific expectations the review respects (e.g., a designated location for Branded Types).If no rules are found, proceed with all checks active. See ../../rules/README.md for the rule format.
Load principle knowledge. Before reading any code under review, read:
../kamae/SKILL.md — principle indexpackage.json under ../kamae/validation-libraries/ (zod.md / valibot.md / arktype.md)package.json under ../kamae/result-libraries/ (neverthrow.md / byethrow.md / fp-ts.md / option-t.md)../kamae/ cited by the checklist sub-files you read.Read the files under review.
Walk the checklist. Read each checklist sub-file in order; match findings to its items.
checklist/domain-modeling.md — Discriminated Unions, Companion Objects, Branded Types, file structure, domain-owned ports, separate single-operation resolvers/stores (items 1.x)checklist/state-transitions.md — pure state transitions, exhaustiveness (items 2.x)checklist/error-handling.md — Result types, error-boundary classification, DU error types (items 3.x)checklist/boundary.md — schema validation, no as assertions, schema-derived types (items 4.1, 4.2, 4.4)checklist/pii-protection.md — Sensitive<T> for PII (item 4.3)checklist/declarative-and-tests.md — array operations, events, fixtures (items 5.x, 6.x)Report findings. For each violation:
path:line).../kamae/...) and the risk of violating it.Suggestions (non-violations with room for improvement) are communicated with the same format but framed as suggestions rather than findings.
Each checklist item is tagged High / Medium / Low.
as, missing PII protection, missing schema validation, missing Branded Types on semantically distinct primitives).interface for domain types, missing Readonly<>, non-kind discriminants, imperative array loops, fixtures without as const satisfies, matching schema/type duplication, misplaced ports without an outward dependency, unnecessarily broad dependency contracts). An existing schema/type mismatch is raised according to its incorrect acceptance, rejection, or data-exposure impact.