home / skills / shotaiuchi / dotclaude / ghwf4-review

ghwf4-review skill

/dotclaude/skills/ghwf4-review

This skill creates or updates a structured review document for Plan or Code reviews and records outcomes.

npx playbooks add skill shotaiuchi/dotclaude --skill ghwf4-review

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.4 KB
---
name: ghwf4-review
description: Plan またはコードのレビュー記録を作成
argument-hint: "[plan | code]"
context: fork
agent: general-purpose
---

**Always respond in Japanese. Write all workflow documents (*.md) in Japanese.**

# /ghwf4-review

Plan または実装コードのレビューを行い、記録を作成する。

## Usage

```
/ghwf4-review         # 自動判定
/ghwf4-review plan    # Plan レビュー
/ghwf4-review code    # コードレビュー
```

## Prerequisites

- `ghwf3-plan` 完了済み

## Processing

### 1. Load Context

- Read `state.json` for active work
- Fetch Issue/PR with comments:
  ```bash
  gh issue view <issue> --json body,comments
  gh pr view <pr> --json comments,reviews
  ```

### 2. Determine Review Target

- 実装前: Plan レビュー
- 実装後: Code レビュー

### 3. Create/Update 04_REVIEW.md

- Template: `~/.claude/templates/04_REVIEW.md`
- Sections:
  - Review Summary
  - Issues Found
  - Recommendations
  - Approval Status

### 4. Commit & Push

**Execute immediately without confirmation:**

```bash
git add docs/wf/<work-id>/04_REVIEW.md
git commit -m "docs(wf): create review <work-id>"
git push
```

### 5. Update PR & Labels

- PR チェックリスト更新
- `ghwf:step-4` ラベル追加

### 6. Update State

```json
{
  "current": "ghwf4-review",
  "next": "ghwf5-implement",
  "last_execution": "<ISO8601>"
}
```

Overview

This skill automates creation and updating of a formal review record for a plan or implementation code. It runs reviews based on project state, generates a 04_REVIEW.md from a template, commits the file, updates the PR checklist and labels, and advances the workflow state. It is designed to be executed as part of a GitHub workflow step after plan definition or after implementation.

How this skill works

The skill loads the active work context from state.json and fetches the related Issue or PR comments and reviews using gh commands. It determines whether to perform a Plan review or a Code review based on the current stage, fills the 04_REVIEW.md template with Review Summary, Issues Found, Recommendations, and Approval Status, and commits the document. Finally it updates the PR checklist, applies the workflow label, and writes the next workflow state to state.json.

When to use it

  • When the project state indicates a plan is ready for review (pre-implementation).
  • When implementation is complete and a code review record is required.
  • After ghwf3-plan has finished and you need an official review artifact.
  • When you want consistent, auditable review documentation committed to the repo.

Best practices

  • Ensure ghwf3-plan step is completed and state.json reflects the correct work-id before running the skill.
  • Keep the 04_REVIEW.md template in ~/.claude/templates and maintain consistent section headings for automation parsing.
  • Run the gh commands with appropriate permissions and authenticated gh CLI to fetch issues, PRs, comments, and reviews.
  • Review the generated content quickly to ensure recommendations and findings are accurate before relying on them downstream.
  • Automate label and checklist updates to maintain clear workflow progress and avoid manual drift.

Example use cases

  • Perform a Plan review: generate review summary and recommendations for a proposed Terraform plan before implementation.
  • Perform a Code review: collect PR reviews and comments, summarize issues found, and record approval status after implementation.
  • Add a formal review artifact to a workflow for audit and compliance purposes, ensuring the record is committed to the repo.
  • Automate workflow progression by committing the review file and updating the next workflow step in state.json.

FAQ

What files does the skill read to determine context?

It reads state.json for the active work-id and uses gh to fetch the Issue or PR body, comments, and reviews.

Does it require confirmation before committing the review?

No. The skill commits and pushes the generated 04_REVIEW.md immediately as part of the automated workflow step.