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.5 | $0.00010 | $0.00379 |
| Sonnet 5.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 1mo 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.
- 1mo 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 3mo ago), licensed Apache-2.0. It adds 26 tokens to every session and 948 once invoked, about $0.0001 per session on Opus 5.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-checklist
Comprehensive checklist for conducting thorough code reviews covering functionality, security, performance, and maintainability.
create-pr
Create pull requests following Sentry conventions. Use when opening PRs, writing PR descriptions, or preparing changes for review. Follows Sentry's code review guidelines.
codex-review
Professional code review with auto CHANGELOG generation, integrated with Codex AI.
coding-assistant
Provides coding assistance with best practices and code review.
neo-code-review
Use this skill when the user asks to review or audit source code, a PR, diff, commit, or recent changes for bugs, security, performance, tests, compatibility, or maintainability, duplicated code or logic across files, or hard-coded values. Also use it after an AI agent finishes modifying code to inspect the current…
neo-pr
Use this skill when the user asks to create, draft, review, format, or generate a Pull Request (PR) title and description, specify target or source branches for a repository, or convert git branch diffs into concise, high-impact, non-AI-slop PR content.