com um clique
agkan-review
Use when checking review tasks against GitHub PR status to automatically move them to done or closed.
Menu
Use when checking review tasks against GitHub PR status to automatically move them to done or closed.
Use when managing tasks with the agkan CLI tool - creating, listing, updating tasks, managing tags, blocking relationships, or tracking project progress with the kanban board.
Use when reviewing backlog tasks to assess decomposition, implementation readiness, and priority ordering before development begins.
Use when starting a development session to pick the highest priority Todo task from agkan, implement it directly without PR/branch, and mark it done.
Use when starting a development session to pick the highest priority Todo task from agkan, implement it, create a pull request, and mark it done.
Use when a task has been selected and you need to implement it directly without PR/branch creation - handles in_progress update, implementation, and marking done.
Use when a task has been selected and you need to implement it in an isolated (forked) context - handles in_progress update, branch creation, implementation, PR creation, and marking review.
| name | agkan-review |
| description | Use when checking review tasks against GitHub PR status to automatically move them to done or closed. |
Workflow to retrieve tasks with Review status in agkan, check the merge/close status of GitHub PRs, and automatically update their status.
Run the bundled review.sh script to process all review tasks in one command:
bash "$(dirname "$(agkan skill path agkan-review 2>/dev/null || echo "$BASE_DIR")")/review.sh"
The base directory for this skill is provided at session start. Use it to resolve the script path:
bash "$BASE_DIR/review.sh"
Where $BASE_DIR is the base directory shown at the top of the skill (e.g. /home/gen/.claude/skills/agkan-review).
The script:
--status reviewPR: <URL>) or metadata (pr key)gh pr view <URL> --json state,mergedAt for each PRdone (MERGED) or closed (CLOSED without merge), skips OPENdone: X件, closed: X件, スキップ(OPEN): X件, PR未設定: X件To register the script in .claude/settings.json to eliminate per-command permission prompts, add the script path to allowedTools or the relevant bash allowlist.
Use the manual steps below if the script is unavailable or you need to process tasks individually.
agkan task list --status review --json
Before processing tasks, initialize the following counters to track results:
done_count = 0closed_count = 0skipped_open_count = 0no_pr_count = 0First, extract the PR URL from the task body in the format PR: <URL>.
If no URL is found in the body, check the task metadata as a fallback:
agkan task meta list <id>
Use the value of the pr key if present.
If no URL is found in either the body or metadata, increment no_pr_count, skip the task and output a message indicating manual verification is needed.
gh pr view <PR URL> --json state,mergedAt
| Field | Meaning |
|---|---|
state | OPEN / CLOSED / MERGED |
mergedAt | Merge date/time (null if not merged) |
| PR State | agkan Status | Command | Counter |
|---|---|---|---|
MERGED | done | agkan task update <id> status done | Increment done_count |
CLOSED (mergedAt is null) | closed | agkan task update <id> status closed | Increment closed_count |
OPEN | No change | Skip (still under review) | Increment skipped_open_count |
After updating status to done or closed, record the merge date/time and reason:
agkan task comment add <id> "<comment>"
Comment format by status:
| Status | Comment Example |
|---|---|
done | Merged at <mergedAt>. PR was merged and task is complete. |
closed | PR was closed without merging. Task moved to closed. |
done: <done_count>件, closed: <closed_count>件, スキップ(OPEN): <skipped_open_count>件, PR未設定: <no_pr_count>件
Retrieve all Review tasks
↓
Initialize counters (done=0, closed=0, skipped_open=0, no_pr=0)
↓
Repeat for each task
↓
Does the body contain "PR: <URL>"?
Yes → Use that URL
No → Check metadata: agkan task meta list <id>
Does metadata contain "pr" key?
Yes → Use that URL
No → Increment no_pr_count → Skip (output message prompting manual verification)
↓
Check PR status
↓
What is the PR state?
MERGED → Move to done → Increment done_count → Add comment with mergedAt timestamp
CLOSED → Move to closed → Increment closed_count → Add comment noting PR closed without merge
OPEN → Skip (waiting for review) → Increment skipped_open_count
↓
Move to next task (repeat until all tasks are processed)
↓
Display summary: done: X件, closed: X件, スキップ(OPEN): X件, PR未設定: X件
PR: <URL>pr key from agkan task meta list <id> is used as a fallbackdone means successful completion, closed means suspended or withdrawngh command is required and will not work in environments where it is unavailable