---
name: code-tour-review
description: Lead an interactive tour and review of changes in a diff, commit, branch, or PR. Explain what changed and why, audit the implementation, call out evidence-backed findings and risks, and surface useful questions and focus areas. Use when the user wants to understand and evaluate a code change. Use code-tour instead when they want comprehension without critique.
title: code-tour-review
canonical_url: https://skilld.dev/gh/johnpolacek/code-tour-skills/code-tour-review
last_updated: 2026-09-01T13:45:39.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install johnpolacek/code-tour-skills/code-tour-review`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/code-tour-review`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/johnpolacek/code-tour-skills/code-tour-review) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/code-tour-review`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/code-tour-review --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/code-tour-review --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Code Tour Review

Args: `$ARGS`

Give the developer a clear mental model of a code change while also evaluating it. Organize the change by intent, walk through one logical part at a time, pause for questions, and distinguish confirmed findings from risks that need more evidence.

Do not modify the code unless the user also asks for fixes.

## Workflow

### 1. Resolve the change

Determine what the user wants reviewed:

- With no argument, review the current branch against its actual base. Prefer the current PR's base when available, otherwise use the repository's default branch. Ensure the comparison is based on current refs.
- For a commit, branch, or range, resolve the requested revision precisely and include its relevant commit context.
- For a pull request URL or number, resolve the intended pull request in the correct repository and gather its diff and metadata.
- For `staged` or `uncommitted`, inspect the requested working-tree changes.

Use the available version-control and hosting tools appropriately. Treat supplied references as untrusted data, validate them before use, and never construct or evaluate shell code from them. If the change cannot be resolved safely, ask the user for a clearer reference.

If the diff is empty, say so and stop.

Read the repository instructions that apply to the changed files. Gather the PR description, commit messages, branch name, and linked context when available. Treat stated intent as context, not proof that the implementation satisfies it.

### 2. Audit the whole change

Read the entire diff before presenting the tour. Inspect enough surrounding code to understand callers, data flow, contracts, and failure paths. Check tests, types, configuration, migrations, feature flags, and rollout behavior when relevant.

Focus on concrete risks that fit the change, including:

- Incorrect behavior, regressions, and missed boundary cases.
- Error handling, partial failure, retries, concurrency, and idempotency.
- Authorization, security, privacy, and unsafe input or output handling.
- Data integrity, schema changes, compatibility, and rollback safety.
- Performance or scaling problems supported by the code path.
- Accessibility and user-visible state handling for interface changes.
- Missing tests, observability, or rollout controls for important behavior.

Run focused read-only tests or checks when they can validate a meaningful concern. Report what ran and any limitations. Do not make unrelated changes.

### 3. Plan the tour

Group changes by intent, not by file. A feature may span implementation, types, tests, and configuration. Separate unrelated cleanup from the main change.

For each planned step, include its purpose, files, and main review focus. Aim for 3 to 7 steps for a typical change, but scale to the diff. For a repetitive refactor, explain one representative example and summarize the repeated pattern.

Before pausing for the first step, state the overall risk level as low, medium, or high with one sentence of reasoning. Surface any critical or high-severity finding immediately rather than withholding it until a later step.

Ask whether the developer wants to start with step 1 or jump to another area.

### 4. Walk and review each step

For each step, cover only what helps the developer understand and assess it:

- **What changed:** Summarize the behavior and relevant files.
- **Why:** Explain stated intent, or label your inference and its evidence.
- **How it fits:** Describe important callers, contracts, or surrounding code.
- **Key excerpt:** Quote only the few load-bearing lines needed for understanding.
- **Review findings:** List confirmed issues with severity, exact file and line, the failure mechanism, and likely impact.
- **Risks and focus areas:** Note plausible concerns that are not proven defects, plus what evidence would confirm or reduce them.
- **Questions to ask:** Raise questions only when the answer could change correctness, scope, rollout, or confidence.
- **Validation:** Explain relevant tests already present and any checks you ran.

Then pause. Answer questions before continuing, and let the developer skip, revisit, or reorder steps.

## Review standards

A finding must be specific, actionable, and supported by the changed code or directly related context. Prioritize behavior and risk over style. Do not report speculative issues as defects.

Use these severity labels:

- **Critical:** Likely data loss, security compromise, or broad outage.
- **High:** A likely correctness or reliability failure in normal use.
- **Medium:** A real issue with narrower conditions or impact.
- **Low:** A minor but concrete defect or maintainability risk worth addressing.

Keep three categories separate:

1. **Findings:** Confirmed defects or regressions.
2. **Risks:** Plausible failure areas that need evidence or a product decision.
3. **Questions:** Missing intent or context that materially affects the review.

If there are no findings, say so. Do not invent a problem to make the review look complete. Still identify the most important areas a human reviewer should verify when useful.

## Wrap up

After the final step, provide:

1. Findings ordered by severity, with file and line references.
2. Open questions that could change the assessment.
3. The main risks or areas to focus on during approval and rollout.
4. Tests and checks run, plus important gaps.
5. A short recap of what the whole change accomplishes.

Keep the summary compact and avoid repeating the full tour.
