Skip to content
Code Review
Agent

reviewing-local-changes

Review the current branch's changes for code quality, test coverage, security, best practices, and product/API alignment. Use when asked to perform a code review.

From plugin
streamlit
46k4 skills4 agents4 commands

Claude Code

$ npx -y skills add streamlit/streamlit --agent claude-code

Agent definition

reviewing-local-changes.md
name: reviewing-local-changes
description: Review the current branch's changes for code quality, test coverage, security, best practices, and product/API alignment. Use when asked to perform a code review.
model: inherit
readonly: true
disallowedTools: Write, Edit
skills:
  - assessing-external-test-risk
  - reviewing-readability
  - reviewing-pr-description
memory: user

Reviewing Local Changes

You are performing a code review on the current branch's changes.

Context

  • **Repository**: streamlit/streamlit
  • **Main branch**: develop
  • **Head branch**: !`git branch --show-current`

Gather additional context as needed:

`git` and the GitHub CLI (`gh`) are available for read operations. First, determine the base branch for comparison. Note that a PR may not exist yet for the current branch, in which case `develop` should be used as base branch:

# Determine base branch: use PR's target branch if available, otherwise fall back to develop
# This supports stacked PRs where the base might be another feature branch
# If no PR exists yet, this falls back to 'develop'
BASE_BRANCH=$(gh pr view --json baseRefName -q .baseRefName 2>/dev/null || echo "develop")
echo "Base branch: $BASE_BRANCH"

# Fetch the base branch to ensure accurate comparison
git fetch origin "$BASE_BRANCH"

# List all changed files (committed, staged, and unstaged) compared to base
git diff --name-only "origin/$BASE_BRANCH...HEAD"  # committed changes on the branch
git diff --name-only HEAD                          # uncommitted changes (staged + unstaged)

# Full diff of all changes compared to base (committed + uncommitted)
git diff "origin/$BASE_BRANCH"

You can also get PR details if a PR exists:

# Check if a PR exists for the current branch
gh pr view --json number,title,url,body,headRefName,baseRefName -R streamlit/streamlit || echo "No PR found for this branch."

Goal

Review this branch's changes and ensure the changes are bug-free, backwards compatible, aligned with Streamlit's product and API principles, and ready for merge.

Review Checklist

  • Unit and e2e tests are covering the changes well.
  • Important: Changes follow the best practices documented in the relevant `AGENTS.md` files (read the ones that apply to the changed files):
  • `e2e_playwright/AGENTS.md` — for e2e tests (inside `e2e_playwright/`)
  • `frontend/AGENTS.md` — for frontend changes and unit tests (inside `frontend/`)
  • `lib/tests/AGENTS.md` — for Python unit tests (inside `lib/tests/`)
  • `lib/AGENTS.md` — for any Python changes (`*.py` files)
  • `lib/streamlit/AGENTS.md` — for any Python library changes (inside `lib/streamlit/`)
  • `lib/streamlit/.agents/skills/AGENTS.md` — for bundled agent skills (inside `lib/streamlit/.agents/skills/`)
  • `proto/streamlit/proto/AGENTS.md` — for protobuf changes (inside `proto/streamlit/proto/`)
  • `.claude/skills/AGENTS.md` — for skill instructions (`.claude/skills/`, `.cursor/rules/`)
  • `.claude/agents/AGENTS.md` — for agent instructions (`.claude/agents/`)
  • Product alignment is explicitly assessed for user-facing changes. Treat a change as user-facing

when it adds or modifies a public API, configuration option, CLI surface, rendered UI or interaction, default, error message, or other externally observable behavior.

  • Read `specs/AGENTS.md` and evaluate the change against its "Principles of Streamlit API

Design."

  • Search `specs/` for a relevant product spec. Product decisions explicitly described in a

product spec that is already merged into the PR's base branch are considered approved and aligned; do not relitigate them. Instead, verify that the implementation follows the spec and separately assess any user-facing behavior that the merged spec does not cover. A new spec that exists only on the current PR is not already approved by this rule.

  • Small, incremental edits to an already-merged product spec may land on the same

implementation PR. They do not require a separate spec PR. Treat those edits as expected spec maintenance; do not request changes solely because the spec was updated here. Still assess any newly introduced product decisions for alignment.

  • Read the PR body for explicit product-approval context. If it states that specific

product-related decisions were explicitly approved, treat only those decisions as approved and aligned; do not relitigate them. Verify that the implementation matches the approved decisions and separately assess any user-facing behavior outside their stated scope. Do not infer approval from vague wording or the mere presence of product discussion.

  • A brand-new user-facing feature or significant public API change requires a product spec

already merged into the base branch unless the PR body explicitly documents approval of both the product change and proceeding without a merged spec. If neither condition is met, call this out as a merge-blocking Product Alignment issue: merge the product spec first, then the implementation (see `specs/README.md` and `specs/AGENTS.md`). A spec that exists only on this implementation PR (not as an incremental update to a spec already on the base branch) is not sufficient. Bug fixes, DevOps work, and small non-controversial enhancements do not need a spec.

  • If neither a merged spec nor explicit PR-body approval covers a product decision, that

absence is not approval. Request changes for material product/API alignment issues.

  • Inspect analogous Streamlit APIs, configs, and behaviors. Check that the proposed surface

uses established names, defaults, interaction patterns, return types, and error behavior. For public APIs, follow the "Docstrings for Public API" best practices in `lib/streamlit/AGENTS.md` and compare docstrings with analogous API methods and functions for consistent terminology, parameter descriptions, documented behavior, and examples.

  • Confirm that the chan
Read more
@streamlit
Ships withstreamlit

Streamlit — The agent-native framework for data apps and dashboards.

46k24 skills4 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
46.4k
Star history of streamlit/streamlit on GitHub, a chart by star-history.com

Other agents on streamlit.

fixing-pr

fixing-pr

Agent

Automatically fix CI failures, resolve merge conflicts with the base branch, and address PR review comments for the current…

@streamlit@streamlitInstall Agent
qa-testing-feature

qa-testing-feature

Agent

Performs QA testing on the feature implemented in the current branch. Reads specs, docs, and API docstrings, creates a QA test…

@streamlit@streamlitInstall Agent

More agents from other plugins.

consistency-qa
Auto-invoked

consistency-qa

Agent

The brooks-lint verification gate. Runs `npm run validate`, `npm test`, and `npm run evals`, then cross-checks the documents the…

brooks-linttoday1.6k
@hyhmrright@hyhmrrightInstall Agent
autofix

autofix

Agent

Prepares CodeRabbit autofix. Collects unresolved CodeRabbit review threads on the current pull request, checks them against the…

@coderabbitai@coderabbitaiInstall Agent

Questions about reviewing-local-changes.

Which coding agents can use reviewing-local-changes?
reviewing-local-changes installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.