Skip to content

Commit 0fbf44c

Browse files
committed
Extract /code-review skill and split /review-feature-branch into /review-feature-branch and /review-pr
1 parent 2564f29 commit 0fbf44c

6 files changed

Lines changed: 108 additions & 43 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Turbo
22

3-
Turbo is a modular collection of Claude Code skills — each skill teaches Claude a specific dev workflow. Skills connect into larger pipelines via orchestrator skills like `/finalize` and `/review-feature-branch`. See [README.md](README.md) for the full overview and dependency graph.
3+
Turbo is a modular collection of Claude Code skills — each skill teaches Claude a specific dev workflow. Skills connect into larger pipelines via orchestrator skills like `/finalize` and `/review-pr`. See [README.md](README.md) for the full overview and dependency graph.
44

55
## Project Structure
66

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,22 @@ graph TD
8585
commit-staged --> create-pr
8686
end
8787
88-
%% Review branch
89-
review-feature-branch([/review-feature-branch]):::review --> peer-review
90-
review-feature-branch --> fetch-pr-comments([/fetch-pr-comments]):::review
91-
review-feature-branch --> evaluate-findings
88+
%% Code review (reusable core)
89+
code-review([/code-review]):::review --> peer-review
90+
code-review --> evaluate-findings
91+
92+
%% Review orchestrators
93+
review-feature-branch([/review-feature-branch]):::review --> code-review
94+
review-pr([/review-pr]):::review --> code-review
95+
review-pr --> fetch-pr-comments([/fetch-pr-comments]):::review
9296
9397
%% Delegation
9498
peer-review -.-> codex([/codex]):::review
9599
96100
%% Debugging
97101
stage -. "test failures" .-> investigate([/investigate]):::debug
98102
review-feature-branch -. "phase failures" .-> investigate
103+
review-pr -. "phase failures" .-> investigate
99104
investigate -. "escalate" .-> oracle([/oracle]):::debug
100105
101106
%% Knowledge
@@ -272,7 +277,8 @@ Each session handles one prompt. This keeps context focused and avoids running o
272277
| Skill | What it does |
273278
|---|---|
274279
| `/finalize` | Post-implementation QA: test, simplify, review, commit, PR |
275-
| `/review-feature-branch` | Full branch review: AI review + PR comments + evaluation |
280+
| `/review-feature-branch` | Full branch review: code review + evaluation + optional finalization |
281+
| `/review-pr` | Full PR review: code review + PR comments + evaluation + optional finalization |
276282

277283
### Planning
278284

@@ -289,6 +295,7 @@ Each session handles one prompt. This keeps context focused and avoids running o
289295
|---|---|
290296
| `/code-style` | Enforce mirror, reuse, and symmetry principles |
291297
| `/simplify-plus` | Multi-agent review for reuse, quality, efficiency, clarity |
298+
| `/code-review` | AI code review + findings evaluation (reusable core) |
292299
| `/peer-review` | AI code review interface that delegates to `/codex` by default |
293300
| `/codex` | AI code review and task execution via codex CLI |
294301
| `/evaluate-findings` | Confidence-based triage of review feedback |

skills/code-review/SKILL.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: code-review
3+
description: Run AI code review and evaluate findings. Delegates to `/peer-review` for the review and `/evaluate-findings` for triage. Use when the user asks to "review code", "code review", "review my changes", or wants a reviewed and evaluated set of findings.
4+
---
5+
6+
# Code Review
7+
8+
Run AI code review and evaluate findings. This is the reusable review core used by orchestrators like `/review-feature-branch` and `/review-pr`.
9+
10+
## Step 1: Peer Review
11+
12+
Run the `/peer-review` skill. Pass the appropriate context:
13+
14+
- **Uncommitted changes**: `--uncommitted`
15+
- **Against a base branch**: `--base <branch>`
16+
- **Specific commit**: `--commit <sha>`
17+
18+
Default to reviewing against the repository's default branch (detect via `gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'`). If the caller specifies a different base, use that.
19+
20+
Capture the full review output.
21+
22+
## Step 2: Evaluate Findings
23+
24+
Run the `/evaluate-findings` skill on the review output.
25+
26+
If there are additional findings to include (e.g., PR comments passed in by the caller), combine them with the review output before evaluation.
27+
28+
If zero actionable findings survive evaluation, report that the code looks clean.
29+
30+
## Rules
31+
32+
- If the peer review tool is not available or returns malformed output, report the error and stop.
33+
- Process findings in file order to minimize context switching.
Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,35 @@
11
---
22
name: review-feature-branch
3-
description: Orchestrate a comprehensive feature branch review that combines AI code review (peer review), PR comment analysis, findings evaluation, and optional implementation finishing. Use when the user asks to "review feature branch", "review branch against main", "run full review", "check my branch before merging", or "review everything on this branch".
3+
description: Orchestrate a comprehensive feature branch review with AI code review, findings evaluation, and optional finalization. Use when the user asks to "review feature branch", "review branch against main", "run full review", "check my branch before merging", or "review everything on this branch".
44
---
55

6-
# Reviewing Feature Branch
6+
# Review Feature Branch
77

8-
Orchestrate a comprehensive feature branch review by running AI code review, fetching PR comments, evaluating all findings, and optionally finishing implementation.
8+
Orchestrate a feature branch review by running code review, evaluating findings, and optionally finishing with `/finalize`.
99

1010
## Task Tracking
1111

1212
At the start, use `TaskCreate` to create a task for each phase:
1313

14-
1. Peer review
15-
2. Review PR comments
16-
3. Evaluate findings
17-
4. Confirm implementation
18-
5. Finish implementation
14+
1. Code review
15+
2. Confirm implementation
16+
3. Finalize implementation
1917

20-
## Phase 1: Peer Review
18+
## Phase 1: Code Review
2119

22-
Run `/peer-review` skill to review the feature branch against the base branch. Capture the full output for evaluation in Phase 3.
20+
Run the `/code-review` skill to review the feature branch against the base branch.
2321

24-
If the branch should be compared against a different base, the user will specify it. Default to the repository's default branch (detect via `gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'`).
22+
## Phase 2: Confirm Implementation
2523

26-
## Phase 2: Review PR Comments
24+
After the code review summary, use `AskUserQuestion` to ask whether to proceed with finalization:
2725

28-
Check whether a PR exists for the current branch:
26+
- **Proceed** — continue to Phase 3
27+
- **Skip** — stop here, leave changes as-is for manual review
2928

30-
```bash
31-
gh pr view --json number,title,url 2>/dev/null
32-
```
33-
34-
- **PR exists**: Run the `/fetch-pr-comments` skill to fetch and display unresolved review threads. Retain the output for evaluation in Phase 3.
35-
- **No PR exists**: Note that no PR was found and proceed to Phase 3 with only the codex review output.
36-
37-
## Phase 3: Evaluate Findings
38-
39-
Run the `/evaluate-findings` skill on the combined output from Phases 1 and 2.
40-
41-
If both phases produced zero actionable findings, report that the branch looks clean and skip to the end.
42-
43-
## Phase 4: Confirm Implementation
44-
45-
After the evaluate-findings summary, use `AskUserQuestion` to ask whether to proceed with finishing the implementation:
46-
47-
- **Proceed** -- continue to Phase 5
48-
- **Skip** -- stop here, leave changes as-is for manual review
49-
50-
## Phase 5: Finalize Implementation
29+
## Phase 3: Finalize Implementation
5130

5231
Run the `/finalize` skill.
5332

5433
## Rules
5534

56-
- If the peer review tool is not available or returns malformed output, report the error and stop.
5735
- If any phase fails, run the `/investigate` skill to diagnose the failure, apply the suggested fix, and retry. If investigation cannot identify a root cause, stop and report with investigation findings. Do not skip ahead.
58-
- Process findings in file order to minimize context switching.

skills/review-pr/SKILL.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: review-pr
3+
description: Orchestrate a comprehensive PR review with AI code review, PR comment analysis, findings evaluation, and optional finalization. Use when the user asks to "review PR", "review pull request", "review this PR", "check PR before merging", or "full PR review".
4+
---
5+
6+
# Review PR
7+
8+
Orchestrate a PR review by running code review, fetching PR comments, evaluating all findings together, and optionally finishing with `/finalize`.
9+
10+
## Task Tracking
11+
12+
At the start, use `TaskCreate` to create a task for each phase:
13+
14+
1. Code review and PR comments
15+
2. Confirm implementation
16+
3. Finalize implementation
17+
18+
## Phase 1: Code Review and PR Comments
19+
20+
Run the `/code-review` skill to review the feature branch against the base branch. Pass any PR comments as additional findings.
21+
22+
Fetch PR comments by running the `/fetch-pr-comments` skill. Include the unresolved comments as additional findings for the `/code-review` evaluation step.
23+
24+
## Phase 2: Confirm Implementation
25+
26+
After the code review summary, use `AskUserQuestion` to ask whether to proceed with finalization:
27+
28+
- **Proceed** — continue to Phase 3
29+
- **Skip** — stop here, leave changes as-is for manual review
30+
31+
## Phase 3: Finalize Implementation
32+
33+
Run the `/finalize` skill.
34+
35+
## Rules
36+
37+
- If any phase fails, run the `/investigate` skill to diagnose the failure, apply the suggested fix, and retry. If investigation cannot identify a root cause, stop and report with investigation findings. Do not skip ahead.

skills/update-turbo/SKILL.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,18 @@ npx skills add tobihagemann/turbo --skill '*' --agent claude-code -y -g
5353

5454
## Step 4: Clean Up Removed Skills
5555

56-
Compare installed Turbo skills (symlinks in `~/.claude/skills/` pointing to the Turbo repo) against the current repo skill list. If a symlinked skill no longer exists in the repo, inform the user and remove it:
56+
Compare installed skills against the current repo skill list. A skill is a Turbo skill if `~/.claude/skills/<name>` is a symlink (non-symlinked directories are user-owned and should be skipped). Check without trailing slash so `-L` works:
57+
58+
```bash
59+
remote_skills=$(gh api repos/tobihagemann/turbo/contents/skills --jq '.[].name')
60+
for skill in ~/.claude/skills/*; do
61+
[ -L "$skill" ] || continue
62+
name=$(basename "$skill")
63+
echo "$remote_skills" | grep -qx "$name" || echo "REMOVED: $name"
64+
done
65+
```
66+
67+
If any removed skills are found, inform the user and remove each one:
5768

5869
```bash
5970
npx skills remove <skill-name> -g -y

0 commit comments

Comments
 (0)