Skip to content

Commit 98ae52c

Browse files
justin808claude
andcommitted
Add file-by-file-review command, update address-review, fix README
- Add /file-by-file-review command and supporting bin scripts for reviewing massive PRs file-by-file with parallel subagents (credit: Romex91/claude-code-file-by-file-review) - Update address-review.md with improved version that adds issue comment support, comment filtering, error handling, and auto-reply - Fix README header and clone URL to match actual repo name (claude-code-commands-skills-agents, not claude-code-boosters) - Add "Codex CLI" to repo description Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent becdb80 commit 98ae52c

10 files changed

Lines changed: 500 additions & 41 deletions

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# claude-code-boosters
1+
# claude-code-commands-skills-agents
22

3-
ShakaCode Team Shared Claude Code Commands, Agents, Skills, and Tips.
3+
ShakaCode Team Shared Claude Code and Codex CLI Commands, Agents, Skills, and Tips.
44

55
## Quick Install
66

77
Copy what you need to your `~/.claude/` directory:
88

99
```bash
1010
# Clone the repo
11-
git clone https://github.com/shakacode/claude-code-boosters.git
12-
cd claude-code-boosters
11+
git clone https://github.com/shakacode/claude-code-commands-skills-agents.git
12+
cd claude-code-commands-skills-agents
1313

1414
# Install all commands
1515
mkdir -p ~/.claude/commands
@@ -36,6 +36,7 @@ For project-level sharing, copy to your project's `.claude/commands/` or `.claud
3636
| [`/merge-commit-msg`](commands/merge-commit-msg.md) | Generate a structured merge commit message from PR changes |
3737
| [`/optimize`](commands/optimize.md) | Analyze code for performance issues with structured recommendations |
3838
| [`/security-review`](commands/security-review.md) | Review code for security vulnerabilities (OWASP Top 10 checklist) |
39+
| [`/file-by-file-review`](commands/file-by-file-review.md) | Review massive PRs file-by-file with parallel subagents (credit: [Romex91](https://github.com/Romex91/claude-code-file-by-file-review)) |
3940

4041
## Agents
4142

@@ -69,6 +70,13 @@ Starter templates for new projects:
6970
| Script | Description |
7071
|--------|-------------|
7172
| [`bin/chrome-mcp`](bin/chrome-mcp) | Launch Chrome with a separate profile for MCP browser debugging |
73+
| `bin/set-review-instructions` | Initialize file-by-file review with instructions and changed file list |
74+
| `bin/print-git-diff` | Print diff, before/after, and review instructions for a single file |
75+
| `bin/mark-git-diff-as-good` | Mark a reviewed file as GOOD with a reason |
76+
| `bin/mark-git-diff-as-bad` | Mark a reviewed file as BAD with a reason |
77+
| `bin/check-missing-reviews` | Check which files still need review |
78+
| `bin/compose-summary` | Compose final GOOD/BAD summary report |
79+
| `bin/get-number-of-changed-files` | Get count of changed files in the review |
7280

7381
## GitHub Actions
7482

bin/check-missing-reviews

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
REVIEW_DIR="/tmp/file-by-file-review"
5+
6+
if [ ! -f "$REVIEW_DIR/changed_files.txt" ]; then
7+
echo "ERROR: Run set-review-instructions first."
8+
exit 1
9+
fi
10+
11+
TOTAL=$(wc -l < "$REVIEW_DIR/changed_files.txt")
12+
MISSING=0
13+
MISSING_LIST=""
14+
15+
for i in $(seq 1 "$TOTAL"); do
16+
FILEPATH=$(sed -n "${i}p" "$REVIEW_DIR/changed_files.txt")
17+
SANITIZED=$(echo "$FILEPATH" | sed 's|/|__|g')
18+
19+
if [ ! -f "$REVIEW_DIR/report/${SANITIZED}_GOOD.txt" ] && [ ! -f "$REVIEW_DIR/report/${SANITIZED}_BAD.txt" ]; then
20+
MISSING=$((MISSING + 1))
21+
MISSING_LIST="${MISSING_LIST} ${i}. ${FILEPATH}\n"
22+
fi
23+
done
24+
25+
echo "Reviewed: $((TOTAL - MISSING)) / $TOTAL"
26+
27+
if [ "$MISSING" -eq 0 ]; then
28+
echo "All files have been reviewed."
29+
exit 0
30+
else
31+
echo "Missing reviews ($MISSING):"
32+
printf "$MISSING_LIST"
33+
exit 1
34+
fi

bin/compose-summary

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
REVIEW_DIR="/tmp/file-by-file-review"
5+
REPORT_DIR="$REVIEW_DIR/report"
6+
SUMMARY="$REVIEW_DIR/summary.txt"
7+
8+
if [ ! -d "$REPORT_DIR" ]; then
9+
echo "ERROR: No report directory found. Run the review first."
10+
exit 1
11+
fi
12+
13+
GOOD_COUNT=0
14+
BAD_COUNT=0
15+
GOOD_FILES=""
16+
BAD_FILES=""
17+
18+
for f in "$REPORT_DIR"/*_GOOD.txt; do
19+
[ -f "$f" ] || continue
20+
GOOD_COUNT=$((GOOD_COUNT + 1))
21+
GOOD_FILES+="$(cat "$f")"$'\n\n'
22+
done
23+
24+
for f in "$REPORT_DIR"/*_BAD.txt; do
25+
[ -f "$f" ] || continue
26+
BAD_COUNT=$((BAD_COUNT + 1))
27+
BAD_FILES+="$(cat "$f")"$'\n\n'
28+
done
29+
30+
TOTAL=$((GOOD_COUNT + BAD_COUNT))
31+
32+
cat > "$SUMMARY" <<EOF
33+
# Review Summary
34+
35+
Total files reviewed: $TOTAL
36+
GOOD: $GOOD_COUNT
37+
BAD: $BAD_COUNT
38+
39+
## BAD files
40+
41+
$BAD_FILES
42+
## GOOD files
43+
44+
$GOOD_FILES
45+
EOF
46+
47+
echo "Summary written to $SUMMARY ($TOTAL files: $GOOD_COUNT good, $BAD_COUNT bad)"

bin/get-number-of-changed-files

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
REVIEW_DIR="/tmp/file-by-file-review"
5+
6+
if [ ! -f "$REVIEW_DIR/changed_files.txt" ]; then
7+
echo "ERROR: Run set-review-instructions first."
8+
exit 1
9+
fi
10+
11+
wc -l < "$REVIEW_DIR/changed_files.txt"

bin/mark-git-diff-as-bad

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
if [ $# -lt 2 ]; then
5+
echo "Usage: mark-git-diff-as-bad <file_index> \"<reason>\""
6+
exit 1
7+
fi
8+
9+
REVIEW_DIR="/tmp/file-by-file-review"
10+
INDEX="$1"
11+
REASON="$2"
12+
13+
if [ ! -f "$REVIEW_DIR/changed_files.txt" ] || [ ! -f "$REVIEW_DIR/base_ref.txt" ]; then
14+
echo "ERROR: Run set-review-instructions first."
15+
exit 1
16+
fi
17+
18+
FILEPATH=$(sed -n "${INDEX}p" "$REVIEW_DIR/changed_files.txt")
19+
BASE=$(cat "$REVIEW_DIR/base_ref.txt")
20+
SANITIZED=$(echo "$FILEPATH" | sed 's|/|__|g')
21+
22+
mkdir -p "$REVIEW_DIR/report"
23+
24+
# Remove any existing GOOD verdict for this file
25+
rm -f "$REVIEW_DIR/report/${SANITIZED}_GOOD.txt"
26+
27+
cat > "$REVIEW_DIR/report/${SANITIZED}_BAD.txt" <<EOF
28+
$FILEPATH
29+
git diff $BASE..HEAD -- $FILEPATH
30+
BAD: $REASON
31+
EOF
32+
33+
echo "Marked file $INDEX ($FILEPATH) as BAD: $REASON"

bin/mark-git-diff-as-good

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
if [ $# -lt 2 ]; then
5+
echo "Usage: mark-git-diff-as-good <file_index> \"<reason>\""
6+
exit 1
7+
fi
8+
9+
REVIEW_DIR="/tmp/file-by-file-review"
10+
INDEX="$1"
11+
REASON="$2"
12+
13+
if [ ! -f "$REVIEW_DIR/changed_files.txt" ] || [ ! -f "$REVIEW_DIR/base_ref.txt" ]; then
14+
echo "ERROR: Run set-review-instructions first."
15+
exit 1
16+
fi
17+
18+
FILEPATH=$(sed -n "${INDEX}p" "$REVIEW_DIR/changed_files.txt")
19+
BASE=$(cat "$REVIEW_DIR/base_ref.txt")
20+
SANITIZED=$(echo "$FILEPATH" | sed 's|/|__|g')
21+
22+
mkdir -p "$REVIEW_DIR/report"
23+
24+
# Remove any existing BAD verdict for this file
25+
rm -f "$REVIEW_DIR/report/${SANITIZED}_BAD.txt"
26+
27+
cat > "$REVIEW_DIR/report/${SANITIZED}_GOOD.txt" <<EOF
28+
$FILEPATH
29+
git diff $BASE..HEAD -- $FILEPATH
30+
GOOD: $REASON
31+
EOF
32+
33+
echo "Marked file $INDEX ($FILEPATH) as GOOD: $REASON"

bin/print-git-diff

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
if [ $# -lt 1 ]; then
5+
echo "Usage: print-git-diff <file_index>"
6+
exit 1
7+
fi
8+
9+
REVIEW_DIR="/tmp/file-by-file-review"
10+
INDEX="$1"
11+
12+
if [ ! -f "$REVIEW_DIR/changed_files.txt" ] || [ ! -f "$REVIEW_DIR/base_ref.txt" ]; then
13+
echo "ERROR: Run set-review-instructions first."
14+
exit 1
15+
fi
16+
17+
TOTAL=$(wc -l < "$REVIEW_DIR/changed_files.txt")
18+
if [ "$INDEX" -lt 1 ] || [ "$INDEX" -gt "$TOTAL" ]; then
19+
echo "ERROR: Index $INDEX out of range (1-$TOTAL)"
20+
exit 1
21+
fi
22+
23+
FILEPATH=$(sed -n "${INDEX}p" "$REVIEW_DIR/changed_files.txt")
24+
BASE=$(cat "$REVIEW_DIR/base_ref.txt")
25+
26+
# Sanitize filename for report lookup
27+
SANITIZED=$(echo "$FILEPATH" | sed 's|/|__|g')
28+
29+
# Check review status
30+
REVIEW_STATUS="not yet reviewed"
31+
if [ -f "$REVIEW_DIR/report/${SANITIZED}_GOOD.txt" ]; then
32+
REVIEW_STATUS="GOOD"
33+
elif [ -f "$REVIEW_DIR/report/${SANITIZED}_BAD.txt" ]; then
34+
REVIEW_STATUS="BAD"
35+
fi
36+
37+
echo "========================================"
38+
echo "FILE: $FILEPATH"
39+
echo "INDEX: $INDEX / $TOTAL"
40+
echo "REVIEW STATUS: $REVIEW_STATUS"
41+
echo "========================================"
42+
43+
echo ""
44+
echo "======== GIT DIFF ========"
45+
git diff "$BASE"..HEAD -- "$FILEPATH"
46+
47+
echo ""
48+
echo "======== FILE BEFORE ========"
49+
if git show "$BASE":"$FILEPATH" &>/dev/null; then
50+
git show "$BASE":"$FILEPATH"
51+
else
52+
echo "(NEW FILE — did not exist at base)"
53+
fi
54+
55+
echo ""
56+
echo "======== FILE AFTER ========"
57+
if git show HEAD:"$FILEPATH" &>/dev/null; then
58+
git show HEAD:"$FILEPATH"
59+
else
60+
echo "(DELETED — does not exist at HEAD)"
61+
fi
62+
63+
echo ""
64+
echo "======== REVIEW INSTRUCTIONS ========"
65+
cat "$REVIEW_DIR/review_instructions.txt"

bin/set-review-instructions

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
if [ $# -lt 1 ]; then
5+
echo "Usage: set-review-instructions \"<instructions>\""
6+
exit 1
7+
fi
8+
9+
REVIEW_DIR="/tmp/file-by-file-review"
10+
mkdir -p "$REVIEW_DIR"
11+
12+
# Save review instructions
13+
echo "$1" > "$REVIEW_DIR/review_instructions.txt"
14+
15+
# Auto-detect base branch and fetch latest
16+
if git rev-parse --verify origin/main &>/dev/null; then
17+
BASE_BRANCH="origin/main"
18+
BASE_REF="main"
19+
elif git rev-parse --verify origin/master &>/dev/null; then
20+
BASE_BRANCH="origin/master"
21+
BASE_REF="master"
22+
else
23+
echo "ERROR: Could not find origin/main or origin/master"
24+
exit 1
25+
fi
26+
27+
echo "Fetching latest $BASE_REF from origin..."
28+
git fetch origin "$BASE_REF" --quiet
29+
30+
MERGE_BASE=$(git merge-base "$BASE_BRANCH" HEAD)
31+
echo "$MERGE_BASE" > "$REVIEW_DIR/base_ref.txt"
32+
33+
# Generate changed files list
34+
git diff --name-only "$MERGE_BASE"..HEAD > "$REVIEW_DIR/changed_files.txt"
35+
36+
FILE_COUNT=$(wc -l < "$REVIEW_DIR/changed_files.txt")
37+
echo "Review initialized."
38+
echo " Base: $MERGE_BASE (from $BASE_BRANCH)"
39+
echo " Changed files: $FILE_COUNT"
40+
echo " Instructions: $1"

0 commit comments

Comments
 (0)