Code Reviewのロゴ

Code Review

コミュニティ
korallis
code-review

プルリクエスト、機能実装、コード変更を体系的にレビューし、品質、保守性、セキュリティ、ベストプラクティスへの準拠を確認します。マージ前のコードレビュー、ピアレビュー、セルフレビュー、コード品質の監査、セキュリティ脆弱性の確認、一貫したコーディング規約の徹底、テストカバレッジの確認、パフォーマンスへの影響評価、アーキテクチャ上の判断の評価、チームのコード品質向上に向けた建設的なフィードバックなどに活用できます。

Add to TypingMind

概要

公開者korallis
リポジトリDroidz
スキル名code-review
スター
89
フォーク
9
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    korallisがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Code Review」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/korallis/Droidz/tree/main/droidz_installer/payloads/claude/default/skills/code-review
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/korallis/Droidz.git /tmp/Droidz
mkdir -p .claude/skills
cp -r /tmp/Droidz/droidz_installer/payloads/claude/default/skills/code-review .claude/skills/code-review
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでCode Reviewを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にCode Reviewを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Code Reviewは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Code Review - Systematic Code Quality Analysis

When to use this skill

  • Reviewing pull requests before merging to main branch
  • Conducting peer code reviews for team members
  • Performing self-reviews before submitting code for review
  • Auditing code quality and standards compliance
  • Checking for security vulnerabilities and bad practices
  • Verifying adequate test coverage exists
  • Assessing performance implications of changes
  • Evaluating architectural and design decisions
  • Ensuring consistency with project coding standards
  • Providing constructive feedback to improve code quality
  • Reviewing critical business logic or sensitive operations
  • Checking for common anti-patterns and code smells

When to use this skill

  • Reviewing pull requests, feature implementations, or code changes before merging to ensure quality, maintainability, and adherence to best practices.
  • When working on related tasks or features
  • During development that requires this expertise

Use when: Reviewing pull requests, feature implementations, or code changes before merging to ensure quality, maintainability, and adherence to best practices.

Core Principles

  1. Review for Understanding First - Before suggesting changes, ensure you understand the intent and context
  2. Be Specific and Actionable - Point to exact lines with concrete suggestions
  3. Balance Positives with Improvements - Acknowledge good patterns while suggesting enhancements
  4. Focus on Impact - Prioritize critical issues (security, correctness) over style preferences
  5. Educate, Don't Just Correct - Explain why a change matters

Review Checklist

1. Correctness & Logic

✓ Does the code do what it claims to do?
✓ Are edge cases handled (null, empty, boundary values)?
✓ Are there potential race conditions or timing issues?
✓ Is error handling appropriate and complete?
✓ Are assumptions validated?

2. Security

✓ Input validation on all user-provided data?
✓ SQL injection, XSS, CSRF protections?
✓ Secrets/credentials properly secured (env vars, not hardcoded)?
✓ Authentication and authorization checks?
✓ Rate limiting on public endpoints?

3. Performance

✓ N+1 query problems?
✓ Unnecessary database calls or API requests?
✓ Memory leaks (event listeners, subscriptions)?
✓ Proper pagination for large datasets?
✓ Efficient algorithms (avoid O(n²) when O(n log n) possible)?

4. Maintainability

✓ Clear, descriptive names for variables/functions?
✓ Functions do one thing well (Single Responsibility)?
✓ DRY - no copy-paste duplication?
✓ Magic numbers replaced with named constants?
✓ Complex logic explained with comments?

5. Testing

✓ Tests cover happy path and error cases?
✓ Tests are deterministic (no flaky tests)?
✓ Edge cases tested?
✓ Integration points mocked/stubbed appropriately?
✓ Test names describe what they verify?

6. Code Style & Standards

✓ Consistent with project conventions?
✓ Follows language idioms?
✓ No unused imports or dead code?
✓ Proper error types thrown/returned?
✓ TypeScript types specific (not 'any')?

Review Process

Step 1: High-Level Review

1. Read PR description and linked issues
2. Understand the "why" behind changes
3. Scan file list - does scope match description?
4. Check for missing files (tests, migrations, docs)

Step 2: Deep Code Review

1. Review critical paths first (security, data integrity)
2. Check test coverage and quality
3. Look for architectural issues
4. Review error handling
5. Check for performance concerns

Step 3: Provide Feedback

Format: [SEVERITY] Issue - Specific suggestion

Example:
[CRITICAL] SQL Injection vulnerability on line 45
- Use parameterized queries instead of string concatenation
- Change: `query = f"SELECT * FROM users WHERE id = {user_id}"`
- To: `query = "SELECT * FROM users WHERE id = ?"` with params

[SUGGESTION] Consider extracting this 50-line function into smaller pieces
- Lines 100-150 could be broken into:
  - `validateInput()` (lines 100-120)
  - `processData()` (lines 121-140)  
  - `formatOutput()` (lines 141-150)

Feedback Severity Levels

  • [CRITICAL] - Security issue, data loss risk, broken functionality
  • [MAJOR] - Performance problem, poor error handling, incorrect logic
  • [MINOR] - Code smell, maintainability concern, style inconsistency
  • [SUGGESTION] - Nice-to-have improvement, alternative approach
  • [PRAISE] - Well-done pattern worth highlighting

Example Code Review

Pull Request: Add user authentication endpoint

Review Comments:

[CRITICAL] Missing authentication on password change endpoint (line 67)

typescript
// Current - No auth check
app.post('/change-password', (req, res) => {
  const { userId, newPassword } = req.body;
  updatePassword(userId, newPassword);
});

// Should be:
app.post('/change-password', requireAuth, (req, res) => {
  // Only allow users to change their own password
  if (req.user.id !== req.body.userId) {
    return res.status(403).json({ error: 'Forbidden' });
  }
  const { newPassword } = req.body;
  updatePassword(req.user.id, newPassword);
});

[MAJOR] Password not hashed before storage (line 23)

typescript
// Never store plain text passwords
await db.users.update({ password: req.body.password }); // ❌

// Use bcrypt or argon2
const hashedPassword = await bcrypt.hash(req.body.password, 10);
await db.users.update({ passwordHash: hashedPassword }); // ✅

[MINOR] Magic number for token expiry (line 45)

typescript
const token = jwt.sign(payload, secret, { expiresIn: 3600 }); // ❌

// Use named constant
const TOKEN_EXPIRY_SECONDS = 60 * 60; // 1 hour
const token = jwt.sign(payload, secret, { expiresIn: TOKEN_EXPIRY_SECONDS }); // ✅

[PRAISE] Excellent input validation (lines 12-20) The zod schema here is comprehensive and includes all necessary checks. This prevents malformed data from reaching the database.

Common Anti-Patterns to Flag

1. Silent Failures

typescript
// Bad - errors disappear
try {
  await criticalOperation();
} catch (e) {
  console.log('oops'); // ❌
}

// Good - proper error handling
try {
  await criticalOperation();
} catch (e) {
  logger.error('Critical operation failed', { error: e, context: {...} });
  throw new CriticalOperationError('Failed to process', { cause: e });
}

2. Callback Hell / Pyramid of Doom

typescript
// Bad
getData((data) => {
  processData(data, (result) => {
    saveResult(result, (saved) => {
      // 3+ levels deep ❌
    });
  });
});

// Good - use async/await
const data = await getData();
const result = await processData(data);
const saved = await saveResult(result);

3. God Functions

typescript
// Bad - function doing too much
function handleUserRequest(req) {
  // 200 lines of validation, processing, formatting, saving ❌
}

// Good - split responsibilities
function handleUserRequest(req) {
  const validated = validateRequest(req);
  const processed = processUserData(validated);
  const formatted = formatResponse(processed);
  return saveAndRespond(formatted);
}

When to Block vs Approve with Comments

Block merge (Request Changes):

  • Security vulnerabilities
  • Data loss risks
  • Broken functionality
  • Missing critical tests
  • Major performance issues

Approve with comments:

  • Style improvements
  • Refactoring suggestions
  • Minor performance optimizations
  • Documentation enhancements
  • Nice-to-have tests

Automated Checks

Before manual review, ensure automated checks pass:

bash
✓ Linting (ESLint, Pylint, etc.)
✓ Type checking (TypeScript, mypy)
✓ Unit tests passing
✓ Integration tests passing
✓ Code coverage meets threshold
✓ Security scanning (SAST)
✓ Dependency vulnerability scanning

Review Response Template

markdown
## Summary
[High-level assessment of the PR]

## Critical Issues
- [List blocking issues]

## Major Concerns  
- [List important but not blocking issues]

## Suggestions
- [List nice-to-have improvements]

## Positive Highlights
- [Call out well-done patterns]

## Questions
- [Clarifying questions about intent or approach]

## Approval Status
- [ ] Approved - ready to merge
- [ ] Approved with minor comments
- [ ] Request changes - blocking issues need resolution

Resources


Remember: The goal is to improve code quality while maintaining team morale. Be thorough but respectful, specific but not pedantic, and always explain the "why" behind suggestions.

よくある質問

AIスキル「Code Review」では何ができますか?

プルリクエスト、機能実装、コード変更を体系的にレビューし、品質、保守性、セキュリティ、ベストプラクティスへの準拠を確認します。マージ前のコードレビュー、ピアレビュー、セルフレビュー、コード品質の監査、セキュリティ脆弱性の確認、一貫したコーディング規約の徹底、テストカバレッジの確認、パフォーマンスへの影響評価、アーキテクチャ上の判断の評価、チームのコード品質向上に向けた建設的なフィードバックなどに活用できます。

TypingMindでCode Reviewを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Code Reviewはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにCode Reviewをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/korallis/Droidz/tree/main/droidz_installer/payloads/claude/default/skills/code-reviewを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Code Reviewを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Code Reviewで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもCode Reviewを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Code Review」は無料ですか?

korallisがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇