スキル一覧に戻る
achiurizo

local-review

by achiurizo

These are my dotfiles, my configurations, my shell home I'd like to share.

7🍴 5📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: local-review description: Use when reviewing local branch changes before merge, when you want code review feedback without a PR, or before committing significant changes

Local Branch Code Review

Review all changes on current branch vs base branch. Reports findings by severity with file:line references. Focus exclusively on changed code and its immediate context. Ignore changes that come from merge commits.

Process

digraph local_review {
    "Get diff size" [shape=box];
    "< 500 lines?" [shape=diamond];
    "Quick scan" [shape=box];
    "Deep analysis (subagents)" [shape=box];
    "Present summary + findings" [shape=box];
    "Offer to fix?" [shape=diamond];
    "User selects fixes" [shape=box];
    "Apply fixes" [shape=box];
    "Done" [shape=doublecircle];

    "Get diff size" -> "< 500 lines?";
    "< 500 lines?" -> "Quick scan" [label="yes"];
    "< 500 lines?" -> "Deep analysis (subagents)" [label="no"];
    "Quick scan" -> "Present summary + findings";
    "Deep analysis (subagents)" -> "Present summary + findings";
    "Present summary + findings" -> "Offer to fix?";
    "Offer to fix?" -> "User selects fixes" [label="yes"];
    "Offer to fix?" -> "Done" [label="no"];
    "User selects fixes" -> "Apply fixes";
    "Apply fixes" -> "Done";
}

Step 1: Validate & Detect Base Branch

# Validate git repo
git rev-parse --git-dir

# Detect base branch (in order)
# 1. Use argument if provided
# 2. Check for 'main'
# 3. Check for 'master'
# 4. Use git default
git show-ref --verify --quiet refs/heads/main && echo "main" || \
git show-ref --verify --quiet refs/heads/master && echo "master" || \
git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'

# Validate not on base branch
current=$(git branch --show-current)
# If current == base, abort with message

Step 2: Analyze Diff Size

# Get total lines changed
git diff $(base)...HEAD --stat | tail -1
# Parse: "X files changed, Y insertions(+), Z deletions(-)"
# If Y + Z < 500 → quick scan
# If Y + Z >= 500 → deep analysis

Step 3: Review Categories

CategoryPriorityChecks
SecurityCritical/HighHardcoded secrets, injection vectors, auth issues, unsafe deserialization
BugsCritical/HighNull handling, off-by-one, race conditions, unhandled promises, resource leaks
PerformanceMediumN+1 queries, expensive loops, memory leaks, bundle impact
Code QualityMedium/LowDead code, complexity, missing error handling, style
Test CoverageMediumUntested code paths, missing edge cases

Quick scan: Read diff directly, check each category.

Deep analysis (500+ lines):

  1. Group files by domain
  2. Spawn parallel subagents (max 5):
    • Security agent scans all files
    • Per-file agents review logic + tests
  3. Aggregate results

Step 4: Output Format

## Review Summary

Branch: `feature/xyz` → `main`
Files changed: N | Lines: +X / -Y
Review depth: Quick scan | Deep analysis

| Severity | Count |
|----------|-------|
| Critical | N     |
| High     | N     |
| Medium   | N     |
| Low      | N     |

## Critical

### [SEC-01] Issue title
`path/to/file.ts:47`
Description of issue and suggested fix.

## High
...

## What's Next?

Would you like me to address any of these findings?
- Fix all Critical issues
- Fix specific issues (e.g., "SEC-01, BUG-01")
- Skip and continue

Step 5: Fix Workflow

When user selects fixes:

  1. Create TodoWrite with selected findings
  2. For each fix:
    • Read file context
    • Apply fix
    • Mark todo complete
  3. Offer to re-review fixed files
CategoryFix Approach
SecurityApply fix, warn if needs verification
BugsFix logic, add defensive checks
PerformanceAsk before applying (may change behavior)
Code QualityAuto-fix (safe refactors)
Test CoverageOffer to write missing tests

Common Mistakes

MistakeInstead
Reviewing base branchCheck current != base first
Missing context in deep reviewAlways read imports and related files
Fixing without askingAlways present findings first, let user choose
Overwhelming outputGroup by severity, use IDs for reference

スコア

総合スコア

55/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

レビュー

💬

レビュー機能は近日公開予定です