本文へ移動
cccskills
無料GitHub で公開

code-reviewer

Review code for quality, simplicity, and maintainability. Identifies unnecessary abstractions, duplicated logic, oversized functions, missing error handling, and naming issues — then fixes them automatically before presenting the result.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md3.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Code Reviewer

Run a structured quality review pass over any code you write or modify. Use this skill to ensure code is production-ready before presenting it.

What This Skill Checks

  • Single responsibility: functions doing too much (> ~30 lines is a signal)
  • Duplication: logic repeated more than twice that should be extracted
  • Abstraction level: unnecessary indirection or over-engineering
  • Error handling: missing try/catch, unhandled promise rejections, no null checks
  • Performance: N+1 queries, unnecessary re-renders, blocking operations
  • Dead code: unused imports, unreachable branches, commented-out code
  • Naming: identifiers that don't communicate intent
  • TypeScript/typing: any usage, missing return types
  • Security: unvalidated inputs, hardcoded secrets, SQL concatenation

Review Workflow

After completing any implementation:

  1. Review the changed files for the issues listed above
  2. Fix what you find — don't just flag it
  3. Present the improved code, not the first draft
  4. Briefly note what was changed and why (one line per fix)

Example: Before and After

Before review:

const getUser = async (id: string) => {
  const res = await fetch(`/api/users/${id}`);
  const data = await res.json();
  return data;
};

const getPost = async (id: string) => {
  const res = await fetch(`/api/posts/${id}`);
  const data = await res.json();
  return data;
};

After review (pattern extracted, error handling added):

const fetchResource = async <T>(path: string): Promise<T> => {
  const res = await fetch(path);
  if (!res.ok) throw new Error(`Request failed: ${res.status}`);
  return res.json() as Promise<T>;
};

const getUser = (id: string) => fetchResource<User>(`/api/users/${id}`);
const getPost = (id: string) => fetchResource<Post>(`/api/posts/${id}`);

Project-Level Standards (configure in CLAUDE.md)

Add a section like this to CLAUDE.md to set project-specific thresholds:

## Code Review Standards
After completing any implementation, review for:
- Functions longer than 30 lines (likely doing too much)
- Logic duplicated more than twice (extract to utility)
- `any` type usage in TypeScript (replace with real types)
- Components with more than 3 props that could be grouped
- Missing error handling on async operations
- Unvalidated user input before database/API use

PHP-Specific Review Points

For WordPress / PHP code, additionally check:

  • Missing sanitize_*() on input, missing esc_*() on output
  • Nonces absent on state-changing requests
  • Direct $_POST/$_GET access without sanitization
  • wpdb->prepare() used for all dynamic queries
  • current_user_can() checked before privileged operations
  • wp_safe_remote_*() instead of raw curl

Thresholds

SignalAction
Function > 30 linesConsider splitting
File > 300 linesConsider modularizing
Duplication × 3Extract to shared utility
> 5 function parametersGroup into object/array
Nested callbacks > 3 deepRefactor to async/await

Tips

  • Run this review automatically — treat it as a mandatory pre-flight before presenting code
  • The goal is the second draft: clean, correct, and maintainable
  • Don't over-engineer: only extract when duplication is actual, not theoretical
  • When in doubt, favour readability over cleverness

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

日本語の概要は準備中です。原文の説明を表示しています。

nvdigitalsolutions/mcp-ai-wpoos72026年10月12日 更新

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

日本語の概要は準備中です。原文の説明を表示しています。

nvdigitalsolutions/mcp-ai-wpoos72026年10月12日 更新

Control a headless browser to navigate URLs, click elements, fill forms, extract content from JavaScript-rendered pages, take screenshots, and automate end-to-end web workflows.

日本語の概要は準備中です。原文の説明を表示しています。

nvdigitalsolutions/mcp-ai-wpoos72026年10月12日 更新

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

日本語の概要は準備中です。原文の説明を表示しています。

nvdigitalsolutions/mcp-ai-wpoos72026年10月12日 更新

WooCommerce store operations through NV oOS Pro — product research, catalog cross-referencing, inventory lookups, and Shopify or Flowhub comparisons where integrations are configured.

日本語の概要は準備中です。原文の説明を表示しています。

nvdigitalsolutions/mcp-ai-wpoos72026年10月12日 更新

Research, draft, and publish WordPress content — blog posts, product copy, SEO metadata, and media with accessible alt text — using NV oOS research and content tools.

日本語の概要は準備中です。原文の説明を表示しています。

nvdigitalsolutions/mcp-ai-wpoos72026年10月12日 更新

nvdigitalsolutions のスキルをすべて見る

このスキルの問題を報告する