/kamae-ts:kamae-reviewfrom kamae-ts
Adversarial code review of server-side TypeScript for kamae principles: discriminated unions, branded types, Result error handling, boundary validation, PII protection.
Ships in kamae-ts. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.### Use of method notation
`src/domain/task/task-store.ts:15`
`save(task: Task): Promise<void>` uses method notation. Per
[`../kamae/SKILL.md` §1 "Use function property notation"](../kamae/SKILL.md),
parameters become bivariant under method notation, so a narrower implementation
such as `save(task: DoingTask): Promise<void>` will pass type checking at the
injection site.
Suggested fix:
\`\`\`typescript
type TaskStore = {
save: (task: Task) => Promise<void>;
};
\`\`\`
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (iwasa-kosui/kamae-ts) — no native marketplace selected
npx claudepluginhub p/iwasa-kosui-functional-ts-principal2 skills in this plugin
Other plugins' skills for the same job