code-review-web skill
✓ 検証済みWebアプリケーションのコードをレビューし、バグ、セキュリティの脆弱性、パフォーマンスのボトルネック、および保守性の問題を特定します。
- GitHubスター
- 1,066
- ファイル
- 5
- 最終コミット
- 2026年11月8日
- ライセンス
- MIT
- 許可されたツール
- —
code-review-web skillは何をしますか
Webアプリケーションのコードをレビューし、バグ、セキュリティの脆弱性、パフォーマンスのボトルネック、および保守性の問題を特定します。
skillのSKILL.mdから生成された要約。
code-review-web skill について
バグ、セキュリティの脆弱性、またはパフォーマンスのボトルネックについてWebアプリケーションの監査が必要な開発者は、このSKILLを使用して高いコード品質を維持できます。プルリクエストのレビュー、本番環境のインシデントのデバッグ、ビルド失敗の調査、あるいは既存のコードベースのセキュリティと保守性の監査を行うために設計されています。ユーザーがコード、エラーメッセージ、またはサイトの不具合の症状を提供した場合、エージェントはこのツールをロードすべきです。これにより、コンテキストを収集し、特定の失敗パターンを特定するのに役立ちます。
レビュープロセスは、正確性、セキュリティ、パフォーマンス、信頼性、保守性の5つの観点に従います。N+1問題、クライアントサイドのバンドルへの機密情報の露出、環境変数の不適切な伝播、不適切なキャッシュの無効化といった具体的な問題を特定します。このSKILLは、PRへのインラインコメント、正式なMarkdown形式のレビュードキュメント、または本番インシデントのポストモーテムレポートなどの構造化された出力を生成します。提供されたログ、特定の技術スタック、およびNext.jsやheadless WordPressなどのフレームワークの参照パターンに依存します。
エージェントができること
- 1プルリクエストのレビューを実行するメインブランチにマージされる前にコード変更をレビューし、品質基準を満たしていることを確認します。
- 2本番環境の障害をデバッグする稼働中のWebサイトが停止している理由や、4xxおよび5xxエラーが返される原因を調査します。
- 3セキュリティ監査を実施する機密データの露出、不適切な認証、または入力値検証の不足がないかコードベースをチェックします。
- 4ビルドおよびデプロイの失敗を診断するデプロイが失敗した理由や、環境変数が期待通りに動作しない理由を特定します。
skill の SKILL.md から作成されています。すべてのユースケースは、その引用と照合されています。
code-review-web skillのインストール方法
各コマンドはskillフォルダをクライアントのskillsディレクトリにコピーします。読み込むには、クライアントを再起動するか新しいセッションを開始してください。プラグインにcode-review-web skillをインストールする
/plugin marketplace add rampstackco/claude-skills /plugin install rampstack-skills@rampstack
Claude Codeにcode-review-web skillをインストールする
~/.claude/skills/code-review-web/SKILL.md
$ npx degit rampstackco/claude-skills/skills/code-review-web ~/.claude/skills/code-review-webClaude Code (project)にcode-review-web skillをインストールする
.claude/skills/code-review-web/SKILL.md
$ npx degit rampstackco/claude-skills/skills/code-review-web .claude/skills/code-review-webCodexにcode-review-web skillをインストールする
~/.agents/skills/code-review-web/SKILL.md
$ npx degit rampstackco/claude-skills/skills/code-review-web ~/.agents/skills/code-review-webGemini CLIにcode-review-web skillをインストールする
~/.gemini/skills/code-review-web/SKILL.md
$ npx degit rampstackco/claude-skills/skills/code-review-web ~/.gemini/skills/code-review-webClaude.aiにcode-review-web skillをインストールする
npx degit rampstackco/claude-skills/skills/code-review-web code-review-web && zip -r code-review-web.zip code-review-web # claude.ai → Customize → Skills → + → Create skill → Upload a skill → code-review-web.zip
自動チェック
実行日 2026年11月15日完全なレポート →自動チェックに合格しました。これはセキュリティ監査ではありません。エージェントに実行させる前にスクリプトを読んでください。 チェックの仕組み
- ソースリポジトリがリンクされており、アクセス可能rampstackco/claude-skills/skills/code-review-web is public and reachablegithub.com/rampstackco/claude-skills/tree/HEAD/skills/code-r ↗合格
- オープンソースライセンス (OSI)MITspdx.org/licenses/MIT.html ↗合格
- 過去1年以内にコミットまたはリリースありLast commit 2026-11-08github.com/rampstackco/claude-skills/commits ↗合格
- スクリプトにダウンロード実行や認証情報の窃取がないNo scripts in the skill folder合格
- SKILL.md に隠れた指示がないNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/rampstackco/claude-skills/blob/HEAD/skills/code-r ↗合格
- 事前許可ツールが限定されているNo pre-approved tools; the agent asks before using onegithub.com/rampstackco/claude-skills/blob/HEAD/skills/code-r ↗合格
- SKILL.md が Agent Skills の形式に従っているValid name and description; says when to use it; 214 linesgithub.com/rampstackco/claude-skills/blob/HEAD/skills/code-r ↗合格
SKILL.md
GitHubで表示Code Review for Web
Review and debug web application code with a focus on the patterns that actually break production. Stack-agnostic principles in SKILL.md. Stack-specific patterns in references.
When to use
- Reviewing a pull request before merging
- Debugging a production issue
- Investigating a build failure
- Auditing security or performance of existing code
- Investigating environment variable or configuration issues
- Triaging a "the site is broken" report
When NOT to use
- Writing a new feature spec (use
pm-spec-writing) - Pre-launch QA against the running site (use
qa-testing) - Performance deep-dive on Core Web Vitals (use
performance-optimization) - Deep accessibility compliance review (use
accessibility-audit)
Required inputs
- The code, PR, error message, or symptom under review
- Access to logs (build logs, function logs, server logs) if debugging
- The stack (framework, hosting, database) - even at high level
If just a symptom is provided ("the site is broken"), the workflow's first step is gathering enough context to investigate.
The framework: 5 review dimensions
Every code review covers five dimensions. Pick the depth based on the situation.
1. Correctness
Does the code do what it claims to do?
- Logic matches the intent stated in the spec or PR description
- Edge cases handled (empty states, error states, network failures)
- Off-by-one errors, null/undefined handling, async race conditions
- Tests exist for the change, or there's a reason they don't
- The change does not break existing functionality (regression risk)
2. Security
Does the code expose anything sensitive or open an attack surface?
- Secrets handling. No secrets, API keys, or service-role credentials in client-side code or version control
- Auth checks. Every mutation endpoint validates the caller before acting
- Input validation. User input sanitized before use in queries, file paths, or HTML
- External requests. Outbound URLs validated; no SSRF on user-controlled inputs
- CSRF protection. State-changing requests require a token or same-origin policy
- Rate limiting. Public-facing mutation endpoints have rate limits
- HTTPS-only. No HTTP in production code paths
- Cookies. Session cookies have
Secure,HttpOnly,SameSiteattributes set - Environment variables. Server-only secrets are not prefixed with anything that exposes them to the client bundle
3. Performance
Will this code scale and stay fast?
- Database queries. No N+1 patterns. Joins or batch fetches preferred over loops with queries.
- Pagination. Large result sets paginated, never loaded entirely.
- Caching. Appropriate cache strategy for the data freshness needs.
- Bundle size. Client-side dependencies justified. Tree-shaking working.
- Image handling. Modern formats, lazy loading, explicit dimensions.
- Background work. Slow operations moved off the request path.
- Cold start sensitivity. Cold paths optimized if frequently triggered.
4. Reliability
What happens when this fails?
- Error handling. Caught and handled, not swallowed. Errors logged with context.
- Retries. Network calls have retry logic for transient failures.
- Timeouts. External calls have explicit timeouts (no infinite waits).
- Graceful degradation. Failure of non-critical paths does not crash the page.
- Idempotency. Mutations that might be retried are safe to retry.
- Logging. Enough context in logs to diagnose without reproducing.
5. Maintainability
Will the next person (or future you) understand this in six months?
- Naming. Functions and variables named for what they do, not how.
- Comments. Explain why, not what. The code says what.
- Complexity. Functions do one thing. If a function takes 200 lines, it's doing too much.
- Duplication. Same logic in multiple places gets extracted.
- Dependencies. New dependencies justified. Each one is a maintenance burden.
- Magic values. No literal
60000in code. Use named constants.
Common bug patterns (stack-agnostic)
Patterns that recur across stacks and are worth checking on every review.
Build and deploy
- Build-time data fetches that timeout. Routes that query a database during static generation can fail at scale. Mark them as runtime-rendered if the data must be fresh.
- Environment variables not propagating. A var that works locally but breaks in production usually means it was not added to the production environment.
- Mismatched env between preview and production. Deploys that work in preview but break on the production domain often have stack-specific URLs hardcoded.
URL and domain issues
- Canonical pointing at staging or preview URL. Caused by client-exposed environment variables that pick up the wrong domain. Canonical domain should come from a server-only environment variable.
- API URL pointing at the main domain that loops back. After a DNS cutover, the main domain may now serve a different application. APIs should live on dedicated subdomains.
- HTTPS upgrade issues. Mixed content (HTTP resources loaded into HTTPS pages) breaks browsers' security model.
Cache invalidation
- Stale content after deploy. Either the cache was not invalidated, or the invalidation requires a manual trigger that did not run.
- CDN serving old asset under same filename. Always use a new filename or cache-bust query string when replacing assets.
- Cache headers too aggressive. Long max-age on resources that change frequently leads to users seeing stale content for hours or days.
Database and data
- N+1 queries. Loop with a query inside the loop. Replace with batch fetch or join.
- Missing limits on table scans. Forgetting
LIMITon queries that hit large tables. - Connection pool exhaustion. Too many concurrent connections, often from build-time fetches in parallel routes.
- Schema migration without backfill. Adding a NOT NULL column without populating it for existing rows.
Image handling
- Image not loading after upload. CDN cached the previous filename. Use new filenames for replacements.
- Layout shift from images. Missing width/height attributes. Always specify both.
- Slow LCP from large images. Hero images not optimized for size or format.
External integrations
- Bot mitigation blocking server-to-server calls. CDN or firewall is challenging legitimate automated traffic. Whitelist server IPs or disable challenges for API endpoints.
- API rate limit triggered in production. Worked locally where traffic was tiny. Add backoff and rate limiting awareness.
Security
- Unprotected revalidation or admin endpoints. Always require a secret token.
- PII in URLs. Visible in server logs, browser history, referrer headers.
- Secrets exposed in client bundle. Anything that gets sent to the browser is public.
Workflow
- Gather context. What stack? What's broken or under review? Logs available?
- Pick the depth. Quick scan for a small PR. Full review for a major change. Deep dive for a production incident.
- Run through the 5 dimensions. Note issues by severity (blocker, important, minor).
- Check stack-specific patterns. Reference the appropriate stack guide.
- For incidents: identify the smallest hypothesis-driven fix. Reproduce locally if possible.
- Write the review. Use the template in
references/review-template.mdfor formal reviews.
Failure patterns
- "Looks good to me" on a 500-line PR. If the review takes 5 minutes on a large PR, the review didn't happen.
- Reviewing without running the code. Some bugs only surface at runtime. Pull the branch and run it.
- Over-indexing on style. Bikeshedding on formatting while missing logic bugs.
- Skipping security review on "internal" features. Internal becomes external faster than expected.
- Treating warnings as decoration. Build warnings often become production errors after a dependency update.
- Debugging without reading the full error message. First line of the stack trace is often not the actual cause. Read all of it.
Debugging workflow
When a production issue is reported:
- Read the full error message. Including the stack trace.
- Check hosting build and function logs. The exact failing line is usually here.
- Identify the last working version.
git log --onelineand check recent commits. - Reproduce locally. Confirms it's a code issue and not an environment issue.
- Check environment variables. Especially after deploys or DNS changes.
- Check cache state. Force a cache invalidation before concluding it's a code bug.
- Make the minimal fix. Big refactors during incidents create more incidents.
- Verify in production. Check the actual fix worked, not just that the deploy succeeded.
- Document. What was the root cause? What would have prevented it? File the learnings.
Output format
For PR reviews: comments inline on the PR, plus a summary if needed.
For formal code reviews: a markdown document at code-review-[date].md with:
- Scope (what was reviewed)
- Summary (overall assessment)
- Critical issues (blockers)
- Important issues
- Minor issues
- Suggestions for follow-up
For incidents: a postmortem document. See after-action-report for that format.
Reference files
references/review-template.md- Markdown template for formal code reviews.references/nextjs-patterns.md- Stack-specific patterns for Next.js (App Router, ISR, Server Components, common bugs).references/wordpress-headless-patterns.md- Stack-specific patterns for headless WordPress integrations.
このスキルのファイル
5code-review-web skillに関する質問
Claude Codeにcode-review-web skillをインストールするには
npx degit rampstackco/claude-skills/skills/code-review-web ~/.claude/skills/code-review-webを実行してください。Claude Codeは~/.claude/skills(すべてのプロジェクト)または.claude/skills(単一プロジェクト)からskillsを読み込み、説明がタスクに一致する場合にskillを使用します。
code-review-web skillはどのクライアントで使用できますか
Agent Skills形式を読み込むすべてのクライアントで使用できます: Claude Code、Codex、Gemini CLI、claude.ai(ZIPとしてアップロード)。skill内のスクリプトは、クライアントがコード実行を許可した場合にのみ実行されます。
どのような時にこのSKILLを使用すべきですか?
プルリクエストのレビュー、本番環境のトラブルシューティング、ビルド失敗の調査、セキュリティ監査、またはサイト停止時の状況判断などに適しています。
コードレビューではどのような観点がカバーされますか?
正確性、セキュリティ、パフォーマンス、信頼性、および保守性の5つの観点からレビューを行います。