ワンクリックで
branch-reviewer
// Comprehensive read-only code review of branch changes. Use when reviewing a branch before merging or when wanting a thorough code audit.
// Comprehensive read-only code review of branch changes. Use when reviewing a branch before merging or when wanting a thorough code audit.
Get personalized, evidence-based recommendations for improving your Claude Code/Nimbalyst workflow
Write blog posts with strong voice and SEO structure. Use when writing blog posts, articles, or thought leadership content.
Create structured technical and product documentation. Use when writing docs, guides, API references, or knowledge base articles.
Product launch announcements and release notes. Use when writing launch emails, release notes, changelog entries, or product announcements.
Battlecards, demo scripts, and GTM materials. Use when creating sales collateral, competitive battlecards, or go-to-market content.
HTML slide decks with consistent design system. Use when creating presentations, pitch decks, or slide-based content.
| name | branch-reviewer |
| description | Comprehensive read-only code review of branch changes. Use when reviewing a branch before merging or when wanting a thorough code audit. |
Perform a comprehensive read-only review of code changes.
Scope: By default, review the current git branch changes using the command below. However, if the user specifies a different scope (e.g., specific files, a directory, a PR, or a commit range), respect that and adjust your review accordingly.
CRITICAL: This is a READ-ONLY review. Do NOT:
Steps:
MAIN_WORKTREE=$(git worktree list | head -1 | awk '{print $1}'); CURRENT_DIR=$(git rev-parse --show-toplevel); if [ "$MAIN_WORKTREE" != "$CURRENT_DIR" ]; then BASE=$(git -C "$MAIN_WORKTREE" branch --show-current); else BASE="main"; fi; echo "=== Base branch: $BASE ===" && echo "" && echo "=== STATUS ===" && git status && echo "" && echo "=== COMMIT LOG ===" && git log $BASE..HEAD --oneline && echo "" && echo "=== COMMITTED CHANGES ===" && git diff $BASE...HEAD && echo "" && echo "=== UNCOMMITTED CHANGES ===" && git diff HEAD
main as the base branch (unless the user specifies otherwise)Each sub-agent should receive the diff content and return findings for its specific area. Wait for all sub-agents to complete, then synthesize their findings into the final report.
Analysis Required:
Provide your review in the following format:
[Brief 2-3 sentence description of what this branch does]
[List any schema changes, migrations, new tables/columns, or note "None"]
[List potential security vulnerabilities:]
[List potential performance issues:]
[Check for platform-specific issues that could break functionality on different operating systems:]
[Check package.json, package-lock.json for changes:]
[Evaluate if logging is appropriate, too verbose, or missing. Note any console.log that should be removed]
[List any any types, missing type definitions, or type assertions that should be reviewed]
[Identify duplicated code that should be extracted into shared utilities, functions, or components:]
[List specific scenarios that should be tested, edge cases not handled, null checks missing, etc.]
[List commented code, debug statements, unused imports, TODOs, etc.]
[Any additional issues not covered above:]
[Evaluate whether PostHog analytics events should be added for this feature/change. See docs/ANALYTICS_GUIDE.md for implementation details.]
Consider adding analytics for:
Do NOT add analytics for:
If analytics should be added, suggest specific events following the naming conventions:
feature_used, dialog_openedfile_opened, session_createdai_*, file_*, window_*, project_*[Note "Not needed for this change" if analytics are not applicable, or list suggested events]
[Evaluate whether Jotai atom usage follows the patterns documented in docs/JOTAI.md:]
Check for these issues:
sessionStoreAtom, not independent atoms with their own storageasync keyword or await import() inside atom definitionsGood patterns to verify:
[Note "No Jotai changes" if no atom code was modified, "Patterns followed correctly" if compliant, or list specific violations]
[Evaluate whether CLAUDE.md should be updated to document new patterns, conventions, or workflows introduced by this change.]
SHOULD update CLAUDE.md when the change introduces:
Should NOT update CLAUDE.md for:
[Note "Not needed for this change" if no documentation updates are required, or specify which sections of CLAUDE.md should be updated and what content should be added]
[Provide a well-formatted commit message for the entire branch following the project's commit style, but DO NOT create the commit]
Note: Include ALL files with changes - both committed and uncommitted/unstaged changes.
| File | Changes Summary |
|---|---|
| path/to/file1.ts | [Explain what changed and why - focus on WHAT and WHY, not line-by-line details] |
| path/to/file2.ts | [Explain what changed and why - focus on WHAT and WHY, not line-by-line details] |
| path/to/file3.tsx | [Explain what changed and why - focus on WHAT and WHY, not line-by-line details] |
| Category | Status | Notes |
|---|---|---|
| Database Changes | ✅ None / ⚠️ Schema / ⚠️ Migration | [Brief description if any] |
| Security Issues | ✅ None Found / ⚠️ See Below / ❌ Critical | [Count if any] |
| Performance Concerns | ✅ None Found / ⚠️ See Below | [Brief assessment] |
| Cross-Platform Compatibility | ✅ Compatible / ⚠️ See Below / ❌ Blocking | [Issues if any] |
| Dependencies | ✅ No Changes / ⚠️ Added/Updated | [List if any] |
| Logging | ✅ Appropriate / ⚠️ Too Verbose / ⚠️ Insufficient | [Brief assessment] |
| Type Safety | ✅ Fully Typed / ⚠️ Some Any Types / ❌ Missing Types | [Issues if any] |
| DRY Violations | ✅ None Found / ⚠️ See Below | [Count if any] |
| Potential Bugs | ✅ None Found / ⚠️ See Below | [Count if any] |
| Junk/Cleanup | ✅ Clean / ⚠️ See Below | [Items if any] |
| Jotai Patterns | ✅ No Changes / ✅ Compliant / ⚠️ Violations | [See docs/JOTAI.md] |
| Analytics Events | ✅ Not Needed / ✅ Already Added / ⚠️ Should Add | [See docs/ANALYTICS_GUIDE.md] |
| CLAUDE.md Updates | ✅ Not Needed / ⚠️ Should Update | [See criteria below] |
Based on the review findings, here are the recommended actions:
[If no actions needed, state: "No actions required - branch is ready for merge."]
To proceed: Reply with the numbers of the actions you want taken (e.g., "1, 3, 5" or "all").
Remember: This is a review only. Do not make any changes or take any git actions unless explicitly asked by the user.