code-review
コード修正後にプロジェクトルールへの準拠をチェック。コードを書いた後、修正した後、実装が完了した時に使用。
When & Why to Use This Skill
This Claude skill automates the code review process by ensuring all modifications strictly adhere to predefined project rules and architectural standards. It streamlines the development workflow by automatically checking for compliance with specific guidelines—such as architecture, Supabase configurations, and general coding standards—providing actionable feedback with line numbers and executing essential build and test commands to maintain high code quality and consistency.
Use Cases
- Architectural Compliance: Automatically verify that new code follows the project's directory structure and architectural patterns defined in .claude/rules/01-architecture.md.
- Coding Standard Enforcement: Identify violations of specific coding rules, such as improper type usage (e.g., 'as any') or missing error logs, and receive immediate suggestions for fixes with specific line references.
- Pre-PR Validation: Use the skill after implementation to run a comprehensive check including formatting, linting, and build tests to ensure the code is production-ready before submission.
- Security and Integration Checks: Ensure that Supabase keys, authentication logic, and database interactions comply with project-specific security protocols.
| name | code-review |
|---|---|
| description | コード修正後にプロジェクトルールへの準拠をチェック。コードを書いた後、修正した後、実装が完了した時に使用。 |
| allowed-tools | Read, Grep, Glob |
Code Review - ルール準拠チェック
修正したコードがプロジェクトルールに準拠しているかをチェックします。
ルールファイル
以下のファイルを参照してチェックを実施:
.claude/rules/01-architecture.md- アーキテクチャ、ディレクトリ構成.claude/rules/02-supabase.md- Supabaseキー、認証、データベース.claude/rules/03-coding-rules.md- API、型、ログ、テスト、ワークフロー
チェック手順
- 修正されたファイルを特定
- 上記ルールファイルを読み込み
- 各ルールに違反していないか確認
- 違反があれば具体的な行番号と修正案を提示
- 最後に
npm run format && npm run lint:fix && npm run test && npm run buildを実行
出力フォーマット
## ルール準拠チェック結果
### 違反なし
- ✅ アーキテクチャ (01-architecture.md)
- ✅ Supabase (02-supabase.md)
### 違反あり
- ❌ コーディングルール (03-coding-rules.md)
- `src/app/api/xxx/route.ts:25` - `as any`を使用
- 修正案: 適切な型定義を作成
### 要確認
- ⚠️ コーディングルール (03-coding-rules.md)
- 新規UseCaseにテストがありません