Borrowing it
Nothing to install: this file belongs to yuji0809/cc-recommender. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/yuji0809/cc-recommender/main/.claude/commands/pre-commit-check.mdgit clone --depth 1 https://github.com/yuji0809/cc-recommenderWrote 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/commands/yuji0809/cc-recommender/pre-commit-check)<a href="https://agentmods.dev/commands/yuji0809/cc-recommender/pre-commit-check"><img src="https://agentmods.dev/badge/commands/yuji0809/cc-recommender/pre-commit-check/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/commands/yuji0809/cc-recommender/pre-commit-check"><img src="https://agentmods.dev/badge/commands/yuji0809/cc-recommender/pre-commit-check.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.00031 | $0.01060 |
| Opus 5.5 | $0.00012 | $0.00424 |
| Sonnet 5.5 | $0.00006 | $0.00212 |
| Haiku 4.5 | $0.00003 | $0.00106 |
Grade A, and why
pre-commit-check 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
コミット前チェック
このコマンドは、コミット前に以下の4つのチェックを並列で実行します:
チェック内容
- アーキテクチャチェック - 設計思想とディレクトリ構造の確認
- セキュリティチェック - セキュリティベストプラクティスの確認
- TypeScriptチェック - 型安全性とベストプラクティスの確認
- ドキュメントチェック - MDファイルの最新性とコードとの整合性の確認
実行方法
4つのエージェントを並列で同時に呼び出して、最近の変更をチェックしてください。
並列実行
以下の4つのエージェントを同時に起動します:
Architecture Agent:
最近変更されたファイルをチェックして、アーキテクチャガイドラインに沿っているか確認してください。特に以下を確認:
- ファイルの配置は適切か
- ファイル命名規則に従っているか
- 直接インポートを使用しているか
- レイヤー間の依存方向は正しいか
- 循環依存はないか
Security Agent:
最近変更されたファイルをチェックして、セキュリティベストプラクティスに従っているか確認してください。特に以下を確認:
- 機密情報が含まれていないか
- 入力バリデーションは適切か
- コマンドインジェクションの脆弱性はないか
- ファイル操作は安全か
- エラーハンドリングは適切か
TypeScript Agent:
最近変更されたファイルをチェックして、TypeScriptのベストプラクティスに従っているか確認してください。特に以下を確認:
- any を使用していないか
- 型推論を適切に活用しているか
- interface ではなく type を使用しているか
- 関数の型定義は適切か
- エラーハンドリングは型安全か
Documentation Agent:
最近変更されたファイルに関連するドキュメントをチェックして、最新の状態になっているか確認してください。特に以下を確認:
- 新機能が追加された場合、README.md に記載されているか
- 新しいファイル・ディレクトリが追加された場合、CLAUDE.md に記載されているか
- アーキテクチャ変更がある場合、docs/ARCHITECTURE.md に反映されているか
- README.md と README.ja.md が同期されているか
- CHANGELOG.md に今回の変更が記録されているか
- コードサンプルが最新の実装と一致しているか
💡 並列実行のメリット: 4つのチェックが同時に実行されるため、順次実行よりも大幅に高速です。
チェック完了後
すべてのチェックが完了したら、以下を確認してください:
- アーキテクチャチェックで問題が指摘されていないか
- セキュリティチェックで問題が指摘されていないか
- TypeScriptチェックで問題が指摘されていないか
- ドキュメントチェックで問題が指摘されていないか
- 指摘された問題をすべて修正したか
- ドキュメントが最新の状態に更新されているか
すべてクリアした場合のみコミットを実行してください。
自動チェックコマンド
手動チェックの前に、以下の自動チェックも実行することを推奨します:
# 型チェック
pnpm run typecheck
# Lint
pnpm run lint
# セキュリティ監査
pnpm run audit
# ライセンスチェック
pnpm run license:check
# 全チェック
pnpm run check
注意事項
- このコマンドは コミット前 に実行してください
- 問題が見つかった場合は、必ず修正してからコミットしてください
- CI/CDでも同様のチェックが実行されるため、ローカルで事前に確認することで時間を節約できます
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 · 107 lines · 31 tokens per session scan A b85ccaa6f18a
pre-commit-check is a command published in the GitHub repository yuji0809/cc-recommender (10 stars, last pushed 5mo ago), licensed MIT. It adds 31 tokens to every session and 1,060 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 commands, from other repositories
review-branch
Review the current branch's diff against base by dispatching atomic-reviewer. No orchestration loop, no spec required — pre-flight before /commit pr or /commit merge.
refactor
Systematic code refactoring with smart scope detection.
init
Install the formatters this repository needs, with every command visible before it runs.
spec-trace-requirements
You are verifying that implementation changes trace back to specification requirements.
merge-conflict-analysis
You are analyzing merge conflicts for PR #${{ pr-number }}.
boot
Start a new PromptKit prompt assembly session (alias for /bootstrap).