skills/user-story-reviewer/SKILL.md
Review an implemented user story or task (via GitHub Pull Request) for completeness, test coverage, and code quality. Use this when asked to QA, review a PR, verify implementation, review a user story like USERST-001, or as a follow-up to the user-story-implementer skill.
npx skillsauth add eho/agent-skills user-story-reviewerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are acting as an autonomous QA and code review sub-agent. Your job is to thoroughly review a recently implemented user story (submitted as a Pull Request) against its original requirements in the linked GitHub Issue. The user story identifier, such as USERST-001, is the primary input and traceability anchor.
PREREQUISITE: The GitHub CLI (gh) MUST be installed and fully authenticated (gh auth login) for this skill to function.
Too often, implementations miss subtle acceptance criteria, lack meaningful test coverage, or fail to update documentation. Your objective is to proactively identify such gaps. Review with the discipline of a code reviewer first: lead with concrete findings, ground them in evidence, and prioritize bugs, regressions, missing tests, security risks, data loss, and acceptance-criteria gaps. You will not approve a Pull Request until it fully passes all checks.
Identify the Target PR:
USERST-001. If the user did not provide one, ask for it before reviewing.gh pr list --state open --search "USERST-001" --json number,title,isDraft,headRefName,body,author,reviewDecision,statusCheckRollup,mergeStateStatus,url --limit 20
Preflight the PR:
gh pr view <pr-number> --json number,title,body,author,isDraft,headRefName,baseRefName,files,commits,closingIssuesReferences,reviewDecision,statusCheckRollup,mergeStateStatus,url
gh pr checks <pr-number>
Approve or Merge until checks are passing or the user explicitly accepts the risk.Read the Requirements (The Issue):
closingIssuesReferences first. Also check PR title, body, branch name, and commits for the story identifier. PR bodies may use Closes, Fixes, Resolves, full GitHub URLs, or multiple issue references.gh issue list --state all --search "USERST-001" --json number,title,state,body,url --limit 20
gh issue view <issue-number> to read the original user story description and every single Acceptance Criterion.Analyze the Implementation: Review the code changes made in the Pull Request.
gh pr diff <pr-number> to view the changes.gh pr checkout <pr-number>) so you can inspect changed files in context, nearby call sites, existing tests, configuration, migrations, generated types, and runtime behavior.Conduct the Review: Evaluate the implementation across the key dimensions (see Review Dimensions below). Produce the Review Output before taking action. Findings come first, ordered by severity, and each finding should be grounded in a file/line reference or diff hunk when code evidence exists.
Report & Fix:
gh pr review <pr-number> --request-changes --body-file <file>.Fix small issue Decision and only if the gap is small, mechanical, low-risk, and clearly within the reviewer workflow (e.g., missing focused test, typo in comment, adding 1-2 obvious lines of code). Checkout the PR branch with gh pr checkout <pr-number>, make the fix, commit with git add <specific-files> (not git add .), and push. Call out the fix commit in the review.Sign off (Approve or Merge): Determine if you are the author of the PR. GitHub prevents users from approving their own PRs, so self-authored PRs should be handled by leaving a comment review and then merging once there are no blocking findings and CI/checks are passing. If you are not the author, formally approve the PR. The bundled script handles this logic automatically: current-user PRs are comment-and-merge by default, while non-current-user PRs receive an approval review.
Review comment: Before approving or merging, write a specific, self-documenting review comment. Do NOT use generic statements like "All acceptance criteria met." Instead:
Script usage: Write your detailed review comment to a temporary text file (e.g., review_comment.txt). Then, call the bundled script passing the PR number and the path to your comment file.
The scripts/ directory is a sibling of this SKILL.md file. Resolve its absolute path and call:
echo "My detailed review comment..." > review_comment.txt
bash /absolute/path/to/scripts/approve_or_merge_pr.sh <pr-number> review_comment.txt
rm review_comment.txt
To leave a comment-only sign-off without merging a current-user PR, pass --comment-only:
bash /absolute/path/to/scripts/approve_or_merge_pr.sh <pr-number> review_comment.txt --comment-only
Before approving, requesting changes, fixing, or merging, produce this structure. Keep it concise, but make the judgment auditable.
No blocking findings found.None.Request changes, Fix small issue, Approve, Comment only, or Merge.The Review Output is always required before approving, requesting changes, fixing, or merging. After completing the selected review action, end with a concise final response that includes the PR, final decision, blocking findings count, verification performed, and any required follow-up.
If the caller requests a specific handoff format, such as the Review Handoff used by the user-story-delivery coordinator, return that format exactly in the final response after the review action is complete. The handoff is a reporting format only; it does not replace the Review Output or change the review, approval, request-changes, or merge rules.
Use Decision in the handoff to report the final state after the review action:
Request changes: blocking findings were posted and follow-up implementation is required.Fix small issue: the reviewer pushed a small fix, but did not approve, comment-only sign off, or merge in this run.Approve: the PR was approved.Comment only: a non-approval sign-off comment was left.Merge: the PR was merged.## Review Handoff
- Story ID:
- PR:
- Decision: Request changes | Fix small issue | Approve | Comment only | Merge
- Blocking findings:
- Reviewer-fixed commits:
- Required follow-up:
- Verification:
This skill bundles the following scripts in the scripts/ subdirectory relative to this SKILL.md file:
approve_or_merge_pr.sh "<pr-number>" "<review-comment-file>" [--comment-only]: Safely extracts author information and determines whether to comment-and-merge (if the PR belongs to the current user) or approve the PR, avoiding agent shell parsing errors. Pass --comment-only to skip merging a current-user PR. A real review comment file is required; the script will not post a generic approval body.Example 1: Input: "Review USERST-001." Action:
gh pr list --state open --search "USERST-001" --json number,title,isDraft,headRefName,body,author,reviewDecision,statusCheckRollup,mergeStateStatus,url --limit 20. Returns PR #13: "USERST-001: Add priority selector".gh pr view 13 --json number,title,body,author,isDraft,headRefName,baseRefName,files,commits,closingIssuesReferences,reviewDecision,statusCheckRollup,mergeStateStatus,url and gh pr checks 13.closingIssuesReferences, or search issues for USERST-001 if needed.gh issue view 12 and note the acceptance criteria: Dropdown in modal, shows current priority, saves immediately, type-checks pass.gh pr diff 13, then gh pr checkout 13 to inspect TaskEdit.tsx and TaskEdit.test.tsx in context.Fix small issue only if the reviewer workflow allows it. Write the missing test in TaskEdit.test.tsx and update the README if needed.git add TaskEdit.test.tsx README.md && git commit -m "test: add immediate save test" and git push.scripts/ sibling of this SKILL.md):
echo "Verified:
- Priority selector dropdown works in modal
- Shows current priority correctly
- Saves immediately
- Fixed missing test for immediate save in TaskEdit.test.tsx (see commit <hash>)
- Residual risk: none beyond existing coverage limits
" > review_comment.txt
bash /path/to/skills/user-story-reviewer/scripts/approve_or_merge_pr.sh 13 review_comment.txt
rm review_comment.txt
documentation
Compact the current conversation into a handoff document for another agent to pick up.
tools
--- name: expo-ios-agent-device description: Drive the Kotoba Expo iOS simulator effectively with agent-device. Use when verifying iOS UI behavior, testing Expo dev-client flows, seeding simulator app state, diagnosing accessibility selectors, or automating simulator QA for this repo. --- # Expo iOS Agent Device Use this skill when automating Kotoba on the iOS simulator with `agent-device`. ## Preflight Run these before planning commands: ```sh agent-device --version agent-device help workf
development
Create or update a DESIGN.md design system specification for websites, apps, prototypes, or product designs. Use when the user asks to generate a DESIGN.md, design system spec, UI specification, frontend design source of truth, Stitch/Google Design.md-style document, or agent-ready design tokens and component guidelines from images, descriptions, screenshots, mockups, brand notes, or raw product requirements.
documentation
Run the review-revision loop for an existing design doc: call design-doc-reviewer, address Critical Gaps and Minor Issues, repeat until clean, then mark the doc Revised for feature-delivery. Use when asked to review and revise, repeat until no gaps remain, prepare a design doc for feature delivery, or start a reviewer subagent and address feedback. Use design-doc-reviewer for one-time read-only critique.