Code Reviewerのロゴ

Code Reviewer

組織
TSS-Blue-AI-Lab
code-reviewer

Automated code review for security, quality, and performance. Catches bugs, vulnerabilities, and anti-patterns before they ship. Use when: reviewing PRs, auditing code before release, or checking your own work.

概要

公開者TSS-Blue-AI-Lab
リポジトリai-lab-agent-skills
スキル名code-reviewer
スター
26
フォーク
3
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

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

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/TSS-Blue-AI-Lab/ai-lab-agent-skills.git /tmp/ai-lab-agent-skills
mkdir -p .claude/skills
cp -r /tmp/ai-lab-agent-skills/skills/code-reviewer .claude/skills/code-reviewer
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

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

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

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

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

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

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

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

スキルの指示

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

Code Reviewer

Review code systematically for bugs, security issues, and quality problems.

When to Use

  • Before merging a pull request
  • After finishing a feature (self-review)
  • Auditing code for security or compliance
  • Onboarding to an unfamiliar codebase
  • Before deploying to production

How It Works

1. Review Checklist

Go through these categories in order:

Priority 1 — Security
├── SQL injection (raw queries, string concatenation)
├── XSS (unescaped user input in HTML/JSX)
├── Auth bypass (missing middleware, broken checks)
├── Secrets in code (API keys, passwords, tokens)
├── Insecure dependencies (known CVEs)
└── CSRF / CORS misconfiguration

Priority 2 — Correctness
├── Logic errors (off-by-one, wrong operator, inverted condition)
├── Null/undefined access without checks
├── Race conditions (async operations, shared state)
├── Error handling (uncaught exceptions, silent failures)
├── Edge cases (empty arrays, zero values, large inputs)
└── Type safety (any casts, missing types)

Priority 3 — Performance
├── N+1 queries (loop with DB call inside)
├── Missing pagination on list endpoints
├── Unnecessary re-renders (React)
├── Large bundle imports (import entire library for one function)
├── Missing indexes on queried columns
└── Memory leaks (uncleared intervals, listeners, subscriptions)

Priority 4 — Maintainability
├── Function length (> 30 lines = too long)
├── Naming clarity (can you understand it without context?)
├── Duplication (same logic in 2+ places)
├── Dead code (unused imports, unreachable branches)
├── Missing tests for new logic
└── Consistent patterns with rest of codebase

2. Security Deep Dive

SQL Injection:

typescript
// BAD — string interpolation
const users = await db.query(`SELECT * FROM users WHERE name = '${name}'`)

// GOOD — parameterized query
const users = await db.query('SELECT * FROM users WHERE name = $1', [name])

// GOOD — ORM (Prisma)
const users = await db.user.findMany({ where: { name } })

XSS:

tsx
// BAD — renders raw HTML from user input
<div dangerouslySetInnerHTML={{ __html: userComment }} />

// GOOD — React auto-escapes by default
<div>{userComment}</div>

// If HTML is needed — sanitize first
import DOMPurify from 'dompurify'
<div dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(userComment) }} />

Auth Checks:

typescript
// BAD — no auth on sensitive endpoint
export async function DELETE(req: Request, { params }: { params: { id: string } }) {
  await db.user.delete({ where: { id: params.id } })
  return NextResponse.json({ ok: true })
}

// GOOD — verify authentication and authorization
export async function DELETE(req: Request, { params }: { params: { id: string } }) {
  const session = await getServerSession()
  if (!session) return NextResponse.json({ error: 'Unauthorized' }, { status: 401 })
  if (session.user.id !== params.id && session.user.role !== 'admin') {
    return NextResponse.json({ error: 'Forbidden' }, { status: 403 })
  }
  await db.user.delete({ where: { id: params.id } })
  return NextResponse.json({ ok: true })
}

3. Performance Checks

N+1 Query:

typescript
// BAD — N+1: one query per post to get author
const posts = await db.post.findMany()
for (const post of posts) {
  post.author = await db.user.findUnique({ where: { id: post.authorId } })
}

// GOOD — single query with include
const posts = await db.post.findMany({
  include: { author: { select: { name: true, email: true } } }
})

React Re-renders:

tsx
// BAD — new object on every render triggers child re-render
<UserCard style={{ padding: 16 }} />

// GOOD — stable reference
const cardStyle = { padding: 16 } // outside component
// or
const cardStyle = useMemo(() => ({ padding: 16 }), [])

4. Review Output Format

For each issue found:

markdown
### [SEVERITY] Issue title

**File:** `src/api/users/route.ts:24`
**Category:** Security / Correctness / Performance / Maintainability

**Problem:** Description of what's wrong and why it matters.

**Fix:**
\`\`\`typescript
// suggested fix
\`\`\`

Severity levels:

  • CRITICAL — Must fix before merge (security vulnerability, data loss)
  • WARNING — Should fix (bug risk, performance issue)
  • INFO — Consider improving (readability, convention)

5. Quick Commands

bash
# Check for known vulnerabilities in dependencies
npm audit

# Find TODO/FIXME/HACK comments
grep -rn "TODO\|FIXME\|HACK" src/

# Check TypeScript errors
npx tsc --noEmit

# Run linter
npx eslint src/

# Check for unused exports
npx knip

Quality Checklist

  • No hardcoded secrets or API keys
  • All user input is validated/sanitized
  • Auth checks on every protected endpoint
  • No N+1 queries
  • Error states handled (try/catch, error boundaries)
  • Tests cover the new/changed code
  • No console.log left in production code

Examples

> Review all uncommitted changes for security issues
> Do a full code review of the /api directory
> Check this PR for performance problems

よくある質問

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

Automated code review for security, quality, and performance. Catches bugs, vulnerabilities, and anti-patterns before they ship. Use when: reviewing PRs, auditing code before release, or checking your own work.

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

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

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

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

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

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

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

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

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

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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