Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add kyto64/codex-pr-review-toolkit-minimal --skill type-design-analyzergit clone --depth 1 https://github.com/kyto64/codex-pr-review-toolkit-minimalWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/kyto64/codex-pr-review-toolkit-minimal/type-design-analyzer)<a href="https://agentmods.dev/skills/kyto64/codex-pr-review-toolkit-minimal/type-design-analyzer"><img src="https://agentmods.dev/badge/skills/kyto64/codex-pr-review-toolkit-minimal/type-design-analyzer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/kyto64/codex-pr-review-toolkit-minimal/type-design-analyzer"><img src="https://agentmods.dev/badge/skills/kyto64/codex-pr-review-toolkit-minimal/type-design-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00026 | $0.00948 |
| Opus 5 | $0.00013 | $0.00474 |
| Sonnet 5 | $0.00005 | $0.00190 |
| Haiku 4.5 | $0.00003 | $0.00095 |
Grade A, and why
type-design-analyzer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Type Design Analyzer
PR で導入・変更された型の不変条件・カプセル化・強制力をレビューする。pr-review の type-design 観点として使う。
レビュー手順
対象の型ごとに、まず不変条件を列挙してから4軸で評価する。
1. 不変条件の特定
- データ整合性の要件、フィールド間の制約
- 妥当な状態遷移
- 型にエンコードされたビジネスルール
- 事前条件・事後条件
2. 4軸評価
| 軸 | 問い |
|---|---|
| カプセル化 | 内部実装が隠蔽されているか。外部から不変条件を破壊できないか |
| 不変条件の表現 | 制約が型の構造から読み取れるか。可能な限りコンパイル時に強制されているか |
| 不変条件の有用性 | その制約は実際のバグを防ぐか。厳しすぎ・緩すぎないか |
| 不変条件の強制 | 構築時に検証されるか。すべての変更経路がガードされているか。不正なインスタンスを作れないか |
懸念のある型については、各軸の評価(強い / 弱い、必要なら 1–10)と根拠を Finding に含める。
アンチパターン
- 不変条件がコメント・ドキュメントのみでコードで強制されていない
- ミュータブルな内部状態の露出
- 構築境界での検証欠如、変更メソッド間で強制が不揃い
- 不変条件の維持を外部コードに依存する型
- 無効な状態を表現可能にする設計(illegal states should be unrepresentable)
- 振る舞いを持たない anemic な型、責務過多の型
設計原則
- 実行時チェックよりコンパイル時保証を優先する
- イミュータブルにすると不変条件の維持が単純になることが多い
- 提案の複雑さコストと破壊的変更の影響を考慮する。完璧より実用 — 保証の少ない単純な型が勝つ場合もある
重要度の目安
| 状況 | 重要度 |
|---|---|
| 不正状態が本番バグにつながる | P1 |
| カプセル化破綻・弱い不変条件 | P2 |
| 改善余地だが現状許容 | P3(除外) |
出力
### P2: Weak invariant on UserId type
- File: `src/types.ts`
- Lines: 10-30
- Category: type-design
- Invariants: [この型が守るべき不変条件]
- Problem: [どの軸が弱いか(カプセル化 / 表現 / 有用性 / 強制)と根拠]
- Impact: [どんなバグ・誤用を招くか]
- Suggested fix: [ブランド型、コンストラクタ検証、イミュータブル化など具体案]
ルール
- DO: PR で触られた型に焦点を当てる
- DO: 複雑さと安全性のトレードオフを考慮する
- DO: 良い設計の型は短く肯定的に言及してよい
- DO NOT: 理想論だけの過剰設計を推奨する
- DO NOT: 型がない動的言語部分を無理に型設計問題として扱う
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 75 lines · 26 tokens per session scan A 7aadfe46826c
type-design-analyzer is a skill published in the GitHub repository kyto64/codex-pr-review-toolkit-minimal (1 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 26 tokens to every session and 948 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
code-review-excellence
This skill should be used when the user asks to review a diff or pull request, write review comments, audit code quality, establish review standards, or improve how a team performs code review.
resolve-pr-comments
Evaluate, fix, answer, and reply to GitHub pull request review comments and conversation comments. Handles both change requests (fix or skip) and reviewer questions (explain using reasoning recalled from past Claude Code transcripts). Use when the user asks to "resolve PR comments", "fix review comments", "address PR…
review-code
Review code for bugs, security vulnerabilities, API misuse, consistency issues, simplicity problems, or test coverage gaps by running internal reviews and a peer review in parallel and returning combined findings. Single-concern with a type argument, or full review with no argument. Use when the user asks to "review…
assess-technical-debt
Assess project-wide structural technical debt: complexity hotspots, deprecated API usage, duplication clusters, and architecture rot. Ranks findings by impact and refactor effort into a report at .turbo/technical-debt.md. Use when the user asks to "assess technical debt", "find technical debt", "review technical…
map-codebase
Deep architecture report that fans out parallel inspections across different aspects of the codebase (structure, tech stack, APIs, patterns, data flow, dependencies, testing) and synthesizes findings into a comprehensive document at .turbo/codebase-map.md and .turbo/codebase-map.html. Use when the user asks to "map…
peer-review
Run an independent peer review via Codex. Use when the user asks to "peer review", "peer review my code", "peer review my plan", "get a second opinion", or "independent review".