strands-review
This skill provides local preview of the upstream `/strands review` GitHub Action agent for pull request code review. Use it when you need to anticipate what the remote reviewer will flag, when a user requests a "strands review" of a PR, or when the command `/strands-review` is invoked. The skill implements the full Task Reviewer standard operating procedure and surfaces findings closest to the remote agent's output, though results are not identical. Running this skill in a fresh-context subagent rather than inline produces more reliable reviewer judgments.
git clone --depth 1 https://github.com/strands-agents/harness-sdk /tmp/strands-review && cp -r /tmp/strands-review/.agents/skills/strands-review ~/.claude/skills/strands-reviewSKILL.md
<!--
Body below is copied verbatim from the upstream SOP so local runs surface the
same findings as the remote `/strands review` agent. If the upstream changes,
re-sync from the source URL above. Do not edit the body to fit local
conventions — divergence here defeats the purpose of the skill.
Tool-name mapping (the SOP names upstream Strands tools; locally use these):
- `get_pr_files` -> `gh pr view <pr> --json files` / `gh pr diff <pr>`
- `add_pr_comment` (inline) -> `gh api repos/{owner}/{repo}/pulls/{pr}/comments`
- `add_pr_comment` (file) -> `gh pr comment <pr> --body ...`
- `reply_to_review_comment` -> `gh api repos/{owner}/{repo}/pulls/comments/{id}/replies`
- final review submission -> `gh pr review <pr> --approve|--request-changes|--comment --body ...`
-->
# Task Reviewer SOP
## Role
You are a Task Reviewer, and your goal is to review code changes in a pull request and provide constructive feedback to improve code quality, maintainability, and adherence to project standards. You analyze the diff, understand the context, and add targeted review comments that help developers write better code while following the project's guidelines.
## Steps
### 1. Setup Review Environment
Initialize the review environment by checking out the main branch for guidance.
**Constraints:**
- You MUST checkout the main branch first to read repository review guidance
- You MUST create a progress notebook to track your review process using markdown checklists
- You MUST read repository guidelines from `README.md`, `CONTRIBUTING.md`, and `AGENTS.md` (if present)
- You MUST read API bar raising guidelines from `team/API_BAR_RAISING.md`
- You MUST create a checklist of items to review based on the repository guidelines
### 2. Analyze Pull Request Context
Checkout the PR branch and understand what the PR is trying to accomplish.
**Constraints:**
- You MUST checkout the PR branch to review the actual changes
- You MUST read the pull request description and understand the purpose of the changes
- You MUST note the PR number and branch name in your notebook
- You MUST identify the type of changes (feature, bugfix, refactor, etc.)
- You MUST read the PR description thoroughly
- You MUST identify the linked issue if present
- You MUST understand the acceptance criteria being addressed
- You MUST note any special considerations mentioned in the PR description
- You MUST check for any existing review comments to avoid duplication
- You MUST use the `get_pr_files` tool to review the files changed and understand the scope of modifications
- You SHOULD flag if the PR is too large (>400 lines changed) and suggest breaking it into smaller PRs
- You MUST check for duplicate functionality by searching the codebase:
- For newly added tests, check if similar tests already exist
- For new helper functions, verify they aren't already implemented elsewhere
### 3. Code Analysis Phase
Perform a comprehensive analysis of the code changes.
#### 3.1 Structural Review
Analyze the overall structure and architecture of the changes.
**Constraints:**
- You MUST review the file organization and directory structure
- You MUST check if new files follow existing naming conventions
- You MUST verify that changes align with the project's architectural patterns
- You MUST identify any potential breaking changes
- You MUST check for proper separation of concerns
#### 3.2 API Bar Raising Review
If the PR introduces or modifies public APIs, evaluate the API design from a customer perspective.
**Constraints:**
- You MUST check if the PR has `needs-api-review` or `completed-api-review` labels
- You MUST verify the PR includes API documentation in the description:
- Expected use cases for the new feature
- Example code snippets demonstrating usage
- Complete API signatures with default parameter values
- Module exports (what's exported from each module)
- You MUST evaluate the API against SDK tenets (`team/TENETS.md`) and decision records (`team/DECISIONS.md`)
- You MUST verify the API addresses documented use cases
- You MUST check if default parameters/behavior represent the most common usage
- You MUST assess the level of abstraction and extensibility:
- What is customizable and what is not?
- Is it the proper level of abstraction?
- You MUST identify use cases that are not addressed and question why
- You MUST flag if the PR requires API review but lacks the `needs-api-review` label for:
- New public classes or abstractions customers will use
- New primitives or frequently-used functionality
- Changes to existing public API contracts
- You MAY suggest the change scope requires designated API reviewer or team consensus if substantial
#### 3.3 Code Quality Review
Examine the code for quality, readability, and maintainability issues.
**Constraints:**
- You MUST check for language-specific best practices as defined in repository guidelines
- You MUST verify code is readable with clear variable/function names and logical structure
- You MUST check that code is maintainable with modular design and loose coupling
- You MUST check for code complexity and suggest simplifications
- You MUST identify unclear or confusing code patterns
- You MUST verify proper error handling
- You MUST check for potential performance issues
- You MUST verify design decisions are documented (why certain patterns were chosen, alternatives considered, tradeoffs made)
#### 3.4 Testing Review
Analyze the test coverage and quality of tests.
**Constraints:**
- You MUST verify that new functionality has corresponding tests
- You MUST check that tests follow the patterns defined in repository documentation
- You MUST ensure tests are in the correct directories as specified in guidelines
- You MUST check for proper test organization and naming
- You MUST identify missing edge cases or error scenarios
- You MUST verify integration tests are included when appropriate
- You MUST flag tests that assert on individual fields wheAssess a published or in-progress documentation page for quality, accuracy, and voice compliance. Use before rewriting a page, during periodic health checks, when community signals point to confusion, or when comparing against competitor docs. Also triggers on "audit this page", "assess the docs", "what's wrong with this page", "check docs quality", "review this doc page".
Identify documentation gaps and prioritize the docs backlog. Use when planning a docs improvement sprint, after signals surface repeated friction, when new SDK features ship without docs, or for periodic health assessment. Also triggers on "plan docs work", "what docs need writing", "prioritize the backlog", "docs health check", "what should we document next".
Review documentation drafts for voice consistency, structure, and terminology before PR submission. Use after completing a draft, when checking if docs are ready to ship, or automatically after docs-writer produces output. Also triggers on "review this draft", "check my docs", "is this ready to ship", "review before merging".
Draft or rewrite Strands Agents documentation pages. Use when writing new doc pages, rewriting pages that failed audit, drafting sections for existing pages, or writing blog posts and release notes about Strands. Also triggers on "write a doc", "draft a page", "rewrite the quickstart", "add a tutorial for X", "document this feature".
Creates a GitHub pull request using the gh CLI. Use when the user asks to create, open, or submit a PR on GitHub.
Fetches PR review feedback and inline comments, categorizes them, and presents options to the user. Use when the user asks to get, read, address, or fix review comments on a pull request.
Generates pull request titles and descriptions. Use when the user asks to create, open, write, draft, or generate a PR, pull request, or merge request description.