/alamops-skills:code-reviewfrom alamops-skills
Performs thorough, read-only code reviews of PRs, diffs, uncommitted edits, or recent commits. Flags bugs, security gaps, reliability issues, unwired code, test holes, and drift between claims and code. Re-reviews fix rounds with scoring.
Ships in alamops-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
A read-only review skill: produce findings the author can act on without reopening the code, and never edit code. Tone: a direct, friendly senior teammate — plain words, concrete scenarios, firm where you have evidence, a question where you don't.
The defects that cost the most in a finished change are rarely typos in the changed lines. They are:
The diff alone shows none of these. Each one needs you to look past the changed lines, at callers, entry points, the deployment shape and the repo's own docs.
The other half of what reviews miss sits inside the changed lines. It's easy to read past because each line looks right on its own:
await. The code checks state, awaits a probe, then acts on the old answer.A reviewer who looks only past the diff misses these, and so does one who only skims it. §5's Line by line questions are how to catch them. Give both halves real effort.
| Trigger | How to gather the diff |
|---|---|
| User names a PR (URL or number) | gh pr view <n> --json title,body,headRefOid,baseRefName,commits,files and gh pr diff <n>; read the review comments too (gh api repos/{owner}/{repo}/pulls/<n>/comments, gh pr view <n> --comments) since an earlier review changes the job (see §4). |
| "Review this branch" / "my changes" / "what I'm about to push" | git status, git diff <base>...HEAD, git log <base>..HEAD --stat. Default <base> to origin/main (or origin/master); fall back to main. |
| Uncommitted / pending / staged work | git status, git diff and git diff --cached. |
| "Recent commits" / "the last commit" | git log -n <N> --stat, git show <sha> for each. |
| Code we just wrote or discussed in this conversation | The files edited this session — re-read them from disk; don't trust your memory of the patch. |
| "Re-review" / "check the fixes" / a prior review is pasted or exists on the PR | Re-review mode — §4. |
| Ambiguous ("review my code") | Ask once: "The open PR, your uncommitted changes, the diff against main, recent commits, or the code we just wrote?" Then proceed. |
Pin it. Record the head SHA and the base SHA (git merge-base) you reviewed, and say so in the header. A review that doesn't name its commit can't be checked again after the next push, and a re-review needs the earlier review's SHA to diff from.
Read from a pinned checkout when the branch might move. If the PR is still being pushed to, or you're fanning out passes (§3), make a detached worktree of the head SHA: git worktree add --detach <scratch>/review-<sha> <sha>. Read from there, and remove it when you're done. Never git checkout over the user's working tree.
Shallow first: title, description, linked issues, commit messages, the user's stated goal. Then:
docs/plans/<slug>.md), spec or PRD the change was built against. Half of a review is checking whether the change does what it set out to do. If the change cites a spec that isn't in the repo, that is a finding: nobody can check the change against it. This includes an absolute local path like /Users/..., a chat or artifact link, a line number in a file nobody else has, or a ticket that quotes no text. Ask for the relevant sections to be committed under docs/. If the spec arrived with amendments already applied and the original isn't in history, the amendments can't be reviewed as a diff. Say so, and say who approved them. An amendment the author approved for themselves isn't approved.docs/lessons-learned*, incident write-ups, ADRs, checklists and runbooks, or a tech-debt register. Also look at how sibling modules or subtrees are laid out. A finding that cites "the repo already says this at docs/lessons-learned.md:25" is the strongest kind there is. A change that repeats a documented lesson or a registered tech-debt item is at least a must-fix. A convention from another repo or an outside spec doesn't override this repo's layout.Gates first. Before reading the diff, run the bundled checks against the pinned range. They take seconds even on a 30,000-line diff:
python3 scripts/quality_gates.py wiring --repo <repo> --base <base-sha> --head <head-sha>
python3 scripts/quality_gates.py hygiene --repo <repo> --base <base-sha> --head <head-sha>
scripts/ sits next to this file. wiring lists two kinds of problem:
hygiene lists recurring patterns in the added lines:
LIMIT 1, swallowed errors;Every hit is a lead, not a finding. Confirm it against the code, then report it in your own words with a scenario, or drop it. Hand the output to every pass below. If Python isn't available, run the same searches by hand.
Small change. One pass, yourself, through every dimension in §5.
Large change. Roughly more than 1,500 changed lines, several subsystems, a trust-sensitive surface, or infrastructure. Run parallel agents, spawned in one message, each reading the same pinned worktree. On Claude Code, use general-purpose agents briefed to be strictly read-only. A search-only agent type is built to locate code, not to audit it, so it misses what this needs. There are two kinds of pass, and you need both:
Dimension passes cut across the whole diff, one concern each:
references/structure-and-wiring.md.references/trust-boundaries.md.references/reliability.md.references/test-quality.md.references/infra-and-ops.md.references/client-and-platform.md.Correctness passes go one subsystem or user flow at a time. Use one per major area, and group small areas together. Each walks its flows end to end and asks whether the logic does what the feature intends. That covers:
await and acted on after it, when the state could have changed in between.Cross-cutting checklists miss this whole class of bug, because no single concern owns "is this flow right?". A review built only from dimension passes finds the classic defects and misses the feature's own logic errors.
Each correctness pass also reads every changed hunk in its area and asks §5's Line by line questions of it. Paste those questions into the brief. A pass that only traces flows at the function level walks right past a stale check after an await or a regex that misses a wrapped line.
Size correctness passes by changed lines, not by subsystem. Keep each one to roughly 1,500 changed lines of logic. Split a big subsystem by file group, and give a single huge file to its own pass. A reviewer given a 300-line diff tends to catch these line-level bugs. Given 5,000 lines, it skims, and these are the bugs it drops first. Tests, fixtures and docs go to the pass that owns the code they cover, so it can check them against that code.
Each brief carries:
When they return, you merge:
Without a sub-agent tool, run the passes yourself in sequence. The references still apply.
When an earlier review exists, the re-review has two jobs, in this order. The earlier review can be PR comments, a pasted review, a docs/reviews/ file, or a fix plan with a finding map.
1. Score every earlier finding at the new head: fixed, partial, not fixed, or regressed.
2. Review what the fix round introduced. Fix rounds go wrong in predictable ways. Check each:
await inside an old check-then-act. The fix adds a refresh, probe or warm-up in the middle of a function that checked state and then acted. Everything read above the new await is stale below it, so the guards above it no longer protect the action.The scorecard goes first in the report, followed by the new findings.
Walk every changed file through these dimensions. The bold lead-ins are the minimum; each reference file holds the full checklist with scenarios and fixes.
Before the checklists, walk each user flow the change touches from start to finish, and ask whether the code does what the feature intends:
These are the feature's own bugs. No cross-cutting checklist owns them, and they are what the author most needs to hear.
Flow-level reading catches wrong intent. These questions catch code that looks right and breaks on timing, on input shape or on a branch nobody tried. Ask each one wherever it applies in a changed hunk. Most hunks trigger two or three.
await, callback or timer. What did the code read before it, and does it act on that after it? Tasks get deleted, retries get cleared, sessions get replaced, and the user clicks again, all while the await is pending. Re-read live state after the await, and re-check ownership or currency before each side effect, not just the last one. An await newly added to a function that used to be synchronous deserves the closest look. The old check-then-act was atomic, and callers still assume it is.useRef)? A per-caller queue doesn't order two mounts or two clients writing the same thing.slice(-N), scan window, buffer or length cap. Does it hold the largest input the feature says it supports? A 512-character code wraps across about seven 80-column rows. Walk the real input shapes: payload on the same line, alone on the next line, wrapped over N lines, split across two reads, cut off at the window edge. Then check the other side: does unrelated output in the window still stop a false match?switch, first-match routing). Take each case the spec, plan or a comment says must hold, and check it reaches its rule instead of returning on an earlier one. A rule order that contradicts the plan's own assumptions ships with green tests, because the tests were written from the same order.Report what these turn up as ordinary findings, with a scenario. A question that has no concrete failure in this code is not a finding.
For every new export, handler, route, job type, message type, config key, metric and command, check:
'', [] or null, that always throw, or exported no-ops that get called on a real path.Full checklist: references/structure-and-wiring.md.
Check each claim from §2 against the code at head.
An unbacked claim about security, data, or the main output is a must-fix, or a blocker when the gap is large. A stale count or doc is a should-fix.
select … where parent_id = $1 limit 1, with no key for the specific child and no order by, returns some row, like the author of a linked item rather than this one.CHANGE_ME) must not be accepted. Compares must be constant-time. A kill switch must act as a ceiling and not be overridable from the runtime.USING / WITH CHECK that queries the table it protects, directly or through a view, throws 42P17 at query time. Fix it with a SECURITY DEFINER helper. When a new query touches table T, scan T's existing policies too.PUBLIC until revoked, and Supabase also grants anon and authenticated by default. A SECURITY DEFINER helper that clients can call directly lets any signed-in user run it with arguments of their choosing. Check each new function, scope and IAM action is granted only to the roles that call it directly. A helper called only from inside another SECURITY DEFINER function needs no client grant.Full checklist: references/trust-boundaries.md.
Ask what happens with two instances, during a rolling deploy, on a crash between two steps, and during a dependency outage. Also ask what happens inside one process when other code runs during an await (see Line by line above):
void loop(), overlapping setInterval(async …) runs need a single-flight guard, and an unguarded JSON.parse in an event listener can take the process down.Full checklist: references/reliability.md.
When the change runs on a device or in a browser, list the contexts it runs in (foreground, background, headless task, push handler, cold start from a link) and what state each has. Then check:
canAskAgain, and revoked-while-away against the app's own consent flags. Every screen using a shared gate calls its actions, and every dialog transition is handled.Full checklist: references/client-and-platform.md.
42703. A new column that nothing reads is stranded.Full checklist: references/structure-and-wiring.md.
Ask one question about every test in the diff: if the bug this test names came back, would this test fail? For headline tests, the ones a claim rests on, check it. Reintroduce the bug in a scratch copy, or reason through the exact assertion.
Watch for these:
return when the database is missing;Also check that every variant of a new union or kind passes through at least one test.
When the change is reviewed before its tests exist by design (e.g. implement's Phase 5), don't flag absent coverage. The caller will say so.
Full checklist: references/test-quality.md.
When the diff touches IaC, CI/CD, deploy scripts or runbooks, check these:
Verify external facts live, with read-only queries, when you can. Examples: gh api …, a cloud CLI describe, checking that a branch is pushed or an environment exists.
Full checklist: references/infra-and-ops.md.
Docs, comments, README trees and examples that the change made untrue need updating. Process docs (fix plans, investigation notes) should be self-contained. "Findings 1–N" with no titles can't be checked. Failures should be handled, not punted upward without context.
The highest-impact bugs are often in the code that should have changed but didn't. For every modification:
Severity follows consequence, not how dramatic the code looks.
| Severity | Meaning |
|---|---|
| blocker | Must not merge. Includes an exploitable security or trust hole, data loss or corruption, a change that can't deploy or run as written, or one that doesn't do the main thing it claims. It also includes a defect that fires in the normal production configuration: the deployed instance count, every rolling deploy, or every run of the main flow. |
| must-fix | A real defect on a reachable path, to fix before merge. Includes a bug, a reliability failure that needs an unusual but realistic event (a crash mid-step, a dependency outage), a missing guard, a repeated documented lesson, an unbacked claim about security or data, or a headline test that can't fail. |
| should-fix | Real but bounded. Includes hardening with no current exploit path, a standards deviation, structural drift that will cost later, a missing negative test, or stale docs. |
| nit | Polish. One line each, grouped. |
Calibrate before you publish.
Put questions only the author can answer in their own numbered Questions list, separate from findings. Prioritize the questions that would change a finding.
Give each finding an ID by severity: B1, M1, S1, N1. IDs let a fix round and a re-review refer to findings exactly. Anywhere outside the review, cite the ID and the title together, never a bare number. If the codebase or its spec already uses IDs of the same shape (trigger M1, acceptance S2), prefix yours with R-, as in R-M1, so nobody confuses a finding with a spec item.
One defect per ID. Each finding names one mechanism with one fix. The exception is a single table finding that lists unwired items or unbacked claims of the same kind. Three defects bundled under one ID become one fix-round task that gets one-third done and marked fixed.
Every finding earns its place. Before writing one, ask whether the author would do anything differently for knowing it. If not, drop it. On a large review, merge duplicates aggressively. Group the should-fix list, and keep only the ten or so nits most worth an author's minute. A report with 100 findings gets skimmed, and the blockers drown.
**M3. <What is wrong, as one plain sentence.>**
`path/to/file.ts:120-144` (plus other anchors)
<Mechanism: what the code does and why that's wrong. Cite the repo standard it
breaks, if one exists.>
Scenario: <who does what, in which state → what goes wrong, concretely>.
Fix: <the concrete change, and the test that would prove it>.
When a should-fix list runs long, group it by area (Security / Reliability / Tests / Structure & docs) and keep each item to one or two sentences plus anchors. Nits are one line each.
**B1. The export permission check reads the owner of any document in the folder, not the one being exported.**
`src/exports/authorize.ts:31-36`, `src/folders/attach.ts:88`
`select owner_id from documents where folder_id = $1 limit 1` has no filter on the
document being exported and no ordering, and any member can attach a document to a
shared folder. The export then runs with whichever owner the database returns first.
Scenario: a guest attaches their own document to a folder an admin owns; the admin
exports the folder; the guest's document is exported under the admin's permissions,
including fields the guest's role must never see.
Fix: filter the lookup by the document under export, and make folder-wide actions
check each document's own permissions instead of inheriting the caller's. Add a test
where one folder holds documents from two owners with different roles.
**M2. A whole batch of outbound webhook calls happens inside one database transaction.**
`src/notify/dispatch.ts:40-112`
Each row's HTTP call runs while the batch transaction holds row locks. Any later
error rolls back every `sent` mark, so the next tick re-sends them. Locks are held
across network latency, which blocks every other writer to those rows.
Scenario: the fourth row hits a lock timeout after the first three webhooks were
delivered; rollback; the next tick delivers those three again.
Fix: one short transaction per row (claim → commit → call → record), stop at the
first failure within a sequence, and add a max-attempts dead state.
Track progress with this checklist in your working notes, never in the report. The author doesn't need your process, only its results:
Review progress:
- [ ] Target identified and pinned (head SHA, base SHA)
- [ ] Intent, contract (spec/plan location), repo rules, and claims gathered
- [ ] Gates run (wiring, hygiene); every lead confirmed or dropped
- [ ] Earlier review scored (re-reviews only)
- [ ] All changed files reviewed (dimension passes: …; correctness passes: …)
- [ ] Every changed hunk asked the *Line by line* questions (awaits, out-of-order writes, queue scope, releases, rollbacks, windows, keys, branches, input transforms, failed lookups, rule order, local copies of shared state)
- [ ] Wiring checked (new exports → production callers; objective outputs → production path)
- [ ] Claims audited against the code at head
- [ ] Security & trust boundaries swept
- [ ] Reliability swept (instances, transactions, retries, loops, cleanup parity)
- [ ] Tests checked for whether they can fail
- [ ] Client & platform checks (if app screens, permissions, background work or deep links are in the diff)
- [ ] Infra/runbook checks (if in the diff)
- [ ] Blast radius traced
- [ ] Every blocker / must-fix re-verified by hand
- [ ] Severities calibrated: no finding with a user-visible scenario rated nit
- [ ] Report written
## Review: <PR / branch / change, in plain words>
Reviewed at head `<sha>` against `<base>` at `<sha>`. <How: one pass, or N
read-only passes (names)>. <What was re-verified by hand>. <What was not run:
CI, migrations, plan/apply, the e2e suite>.
**Does:**
- <2–4 bullets: what the change actually does, from the code, in plain words>
**Needs attention:**
- <the 2–5 problems that matter most, one or two plain sentences each>
**Verdict: <Approve | Request changes | Comment>.** <One or two sentences: why, and
what has to happen first. Name what is solid underneath, if it is.>
| Severity | Count |
| --- | --- |
| BLOCKER | n |
| MUST-FIX | n |
| SHOULD-FIX | n |
| NIT | n |
### Claims vs the code (when the change makes claims about itself: claim | where it's made | what the code does — the fastest read for the author)
### Re-review scorecard (re-reviews only: table by area, then the not-fixed and partial items by ID + title)
### BLOCKER
### MUST-FIX
### SHOULD-FIX (grouped by area when long)
### NIT
### KEEP (large reviews only: specific patterns, with file:line, the fix round must not break)
### QUESTIONS (numbered; the ones that would change a finding first)
### Cross-repo order (only when the change depends on unmerged or unpushed work elsewhere)
### Shape of the change (only when the change is too large to review well)
references/client-and-platform.md (opens in a new tab)references/infra-and-ops.md (opens in a new tab)references/reliability.md (opens in a new tab)references/structure-and-wiring.md (opens in a new tab)references/test-quality.md (opens in a new tab)references/trust-boundaries.md (opens in a new tab)scripts/quality_gates.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub alamops/skills --plugin alamops-skills15 skills in this plugin
/appstore-review(alamops) Use whenever the user wants their iOS app checked against Apple's App Store Review Guidelines and submission requirements, or asks if Apple will reject something. Triggers — "will Apple reject this?", pre-submission audit, App Store readiness, pre-flight before TestFlight or App Store Connect upload, ITMS upload errors, rule compliance (3.1.1, 4.8, 5.1.1, 2.5.19…), iPhone Duo / foldable readiness, Xcode/SDK minimums and deadlines, or whether a change is allowed (subs moved off IAP to Stripe or a web link, tracking SDKs, sending user data to an AI API, remote feature flags, social login, permissions, privacy manifest, ATT, account deletion, age rating). Native Swift, React Native, Expo, Flutter, Capacitor, Unity. Fetches the live guidelines and Apple Developer News as exact text, then returns findings keyed by guideline number with severity, file:line evidence and fixes, plus upcoming deadlines. Read-only. Not for general code review, implementing features, or store-listing ASO (use appstore-seo)./appstore-seo(alamops) App Store Optimization (ASO) for the iOS App Store and Google Play — audit, write and rewrite store listings to rank and convert. Triggers — "/appstore-seo", app store SEO/ASO, "improve my app store ranking", "nobody finds my app", keyword research, writing app name / subtitle / keyword field / short & full description / promotional text / release notes / screenshot captions, auditing a listing from an App Store ID or store link, competitor teardowns, localizing a listing, store A/B tests (PPO, Play experiments), custom product pages and their keywords, creative briefs for screenshots, iPhone Duo sets and the new product page header / search result assets, pre-launch metadata, and **Apple Ads keyword and campaign planning** (Brand/Generic/Competitor/Discovery, negatives, Search Terms). Pulls live listings and competitors from Apple's public endpoints, then emits character-validated fields saved under `docs/appstore/`. Not for App Review compliance (use `appstore-review`) and not for website SEO./break-fix(alamops) Adversarial end-to-end bug hunt on a running app. Drives the real app like a hostile, confused, or impatient user — junk and boundary input, double-submits, out-of-order steps, back-button and refresh mid-flow, expired sessions, two tabs on one record, flaky network, tampered URL params — to make it throw, corrupt state, lose data, or strand the UI. Watches console, network and server logs, not just the viewport. Then reproduces each finding deterministically, traces the root cause in code, writes a *failing* e2e regression test, fixes the defect, and proves the suite goes green. Use whenever the user says break my app, try to break it, bug hunt, bug bash, QA sweep, exploratory / adversarial / chaos / monkey / fuzz testing, "find bugs by actually using it", "click around and see what explodes", or asks for an e2e test so a bug can't come back. Runs only against local/dev/staging targets the user controls. Not for reviewing a diff (code-review), building a feature (implement), or triaging production errors from Sentry./business-review(alamops) Analyzes a product/business from its public-facing materials (landing, pricing, onboarding, docs, app/UI, screenshots), separates real value from claimed value, generates 5–8 concrete buyer personas, ranks them across abundance / pain / urgency / WTP / retention / strategic leverage, recommends a primary ICP plus secondary and weak-fit segments, pressure-tests positioning and pricing against alternatives, and proposes messaging, landing-page, onboarding, demo, and product-experience improvements. Saves Markdown artifacts under `docs/` (personas, ICP analysis, positioning, product-experience). Read-only on source; prefers strategic clarity over flattery. Use when asked to analyze a business/product, generate personas, find or rank an ICP, pressure-test positioning or pricing, review a landing page or onboarding, or get a buyer-side strategic critique./create-tasks(alamops) Senior Technical PM that turns a PRD, brief, ticket, or conversation into a small set of deep, end-to-end dev/QA tasks. Performs mandatory deep repo-context analysis (entry points, data models, utilities, API patterns, sibling code paths) before drafting, asks one structured pass of clarifying questions, then writes each task with problem, business rules, technical goals, dependencies, file paths, related existing code, data model, API specs, non-functional requirements, implementation guide, error handling, blast radius, testing, acceptance criteria, QA steps, and design specs. Layer-prefixed titles (`[Full-Stack]`, `[Backend+DB+Tests]`, `[Frontend+Backend+Tests]`, `[DevOps]`). No time, effort, or staffing estimates. Saves an INDEX plus one task file under `docs/tasks/<feature-slug>/`; read-only on source code. Use when asked to create, draft, scaffold, or break down dev/QA tasks, engineering tickets, sprint tasks, or implementation tickets from a PRD, spec, or feature description./execute-plan(alamops) Executes only the coding work of an approved implementation plan, with parallel sub-agents that never collide. Cuts a branch and records the base SHA, checks no two tasks in a wave own the same file, gives each task's agent a self-contained brief with a no-TODO completeness clause, holds wave barriers, isolates unavoidable shared files in worktrees, routes reported remainder into the next wave, and commits a checkpoint per wave. Use when the user hands over a plan (`docs/plans/<slug>.md`, a `write-plan` output, or a task breakdown with file ownership) and limits the job to writing code — just the code and I'll review and test it myself, only run the coding waves, fan these tasks out with no tests — or asks for this skill by name. A plain "execute this plan" with no such limit belongs to `implement`, which carries the plan through review and tests to green. Phase 4 of `implement`, runnable alone. Not for writing the plan (write-plan) or a single pinpointed edit.Other plugins' skills for the same job