How do you accept AI-written code? Beyond reviewing the diff, drive the real app with a verification skill (Cursor pstack)

Accepting AI changes shouldn't stop at "it compiles" or a diff review. This article separates pre-PR AI code review from a verification skill (driving the real app and leaving evidence), walking through Cursor pstack's /create-verification-skill: the install chain, Launch/Doctor/Drive/Evidence/Cleanup, the feature map and Prove. No timing figures we did not reproduce.

6 分钟阅读
How do you accept AI-written code? Beyond reviewing the diff, drive the real app with a verification skill (Cursor pstack)

Coding Agents are getting bolder about changing repositories, yet acceptance often still stops at one of two things: it compiles, or before opening a PR another model reads through the diff. The first only shows it builds; the second is good at finding logic traps, missing tests and style issues, but neither amounts to running the user's path end to end in the real app. To evaluate an agent or accept an AI-written feature, you need to keep these two layers apart at the very least.

For pre-PR AI code review (reading the diff, finding problems), see the use case AI code review. This article covers the other layer: how to give a repository a verification skill that "drives the real app and leaves evidence". Cursor's official plugin pstack provides /create-verification-skill for exactly this.

The process and section names follow create-verification-skill/SKILL.md raw, the install guide and Verify and ship. This time we did not run the generator end to end on a real production repository or time it, so we do not quote any seconds or screenshot counts we did not reproduce.

The bottom line first:

  • Evaluating / accepting AI changes: diff review (finding code problems) and a verification skill (driving the real app for end-to-end proof) are two separate toolsets; don't let one stand in for the other.
  • When you want the second, the install chain in Cursor is /add-plugin pstack → /setup-pstack → /create-verification-skill.
  • Output: .cursor/skills/verify-<app>/; the body contains Launch / Doctor / Drive / Evidence / Cleanup (+ Helpers) and a features/ map.
  • The generator must Prove it once itself; it only counts as delivered if the evidence survives Cleanup. disable-model-invocation: true, so it must be invoked explicitly.

Create an API Key →

Two layers of acceptance: diff review vs driving the real app

LayerWhat it doesWhat it provesTypical entry point
Pre-PR AI diff reviewReads the changed code, finds defects, missing tests, risks"This change makes sense / has problems at the code level"AI code review use case
Verification skillStarts the real app, clicks/types/calls along the user's path, captures evidence"The feature observably works in the running app"/create-verification-skill → /verify-<app>

Diff review won't click buttons, look at pages or check whether side effects reached the database for you; a verification skill won't replace the design discussion of a static review either. Full acceptance usually needs both layers: first (or in parallel) use code review to catch basic mistakes, then use the verify skill to prove the user path. Do only one, and it is easy to misjudge a Coding Agent as "looking very capable."

If what you mainly lack is automatic / semi-automatic diff review on PRs, start with https://aicodewith.ai/en/use-cases/ai-code-review; the rest of this article is about putting "real-app proof" into the repository.

What a verification skill solves

The gist of the official introduction: every serious project needs a scripted proof that drives the real app the way a user does: start it, operate it, capture evidence. Without one, the Agent can only report verbally, and the human becomes the bottleneck again.

What gets generated is repository infrastructure: committed to git and shared by people and Agents. Name /verify-<app> in a task (the name follows what was generated), for example from the official guide:

text
/poteto-mode build the bulk-archive action. use /verify-<app> to verify your changes and show me a video and screenshots as proof.

Install: /add-plugin pstack → /setup-pstack → /create-verification-skill

Following 01-setup.md:

1. Install the plugin

text
/add-plugin pstack

2. Configure models and budget

text
/setup-pstack

This writes ~/.cursor/rules/pstack-models.mdc; the rules take effect in new sessions, so start a new chat after setup.

3. Generate the verification skill

If setup finds no verify-* or existing harness, it will offer once to run /create-verification-skill. You can also do it manually later:

text
/create-verification-skill

Claude Code: the official path is /plugin marketplace add cursor/plugins, then /plugin install pstack@cursor-plugins; commands carry a pstack: prefix (e.g. /pstack:setup-pstack), and rules are written to ~/.claude/rules/pstack-models.md.

Why it must be invoked explicitly

The YAML header (raw) of create-verification-skill contains:

yaml
disable-model-invocation: true

The model will not run the generator on its own just because "it seems time to verify." /maintain-verification-skill has the same switch. For trigger rules when writing your own Skill, see How to write SKILL.md; for general installation, see How to use Agent Skills.

The generator's five steps (aligned with the official SKILL.md)

1. Interview the repo

Infer from the code, and ask a person only when it can't be worked out:

AxisWhat to pin down
SurfaceWhat the user touches: Web / CLI·TUI / desktop / API / mobile / library
RunHow to start it locally: prefer the repository's own dev command; ports, environment, seed data, login
DriveFirst use existing Playwright/Cypress/expect/PTY/curl; then fall back to CDP / tmux·PTY / HTTP
ObserveScreenshots, terminal recordings, response bodies, logs, exit codes, DB
IsolateWhether two instances can run side by side; if not, say so and prefer not to run two

If the repository won't start, fix that first. Unrelated assets added temporarily just to start it must be marked as verification scaffolding and deleted in Cleanup.

2. Generate skill

Writes .cursor/skills/verify-<app>/SKILL.md: name: verify-<app> + a description that names the surface (without frontmatter it won't register). The body must put the interview results into practice:

  • Launch: start command + ready criterion; from an empty data directory to a usable state; includes teardown. For short-lived CLIs: build first, then drive in an isolated PTY/tmux.
  • Doctor: read-only "is this instance still worth opening?"
  • Drive: this repository's real selectors/commands, preferring stable handles.
  • Evidence: what to capture and where to put it; the real user path; action + resulting state; side effects; dry-run confirmed by observation.
  • Cleanup: kill only what it started; evidence must be kept and its path stated.
  • Helpers: scripts are executable, and how to call them is written in the body.

3. Seed feature map

Create features/README.md + one file per feature (3–5 to start). For the shape, see the official feature-map-example. We checked the four H2s in the example:

  • Sub-features
  • How to get to it (user POV)
  • Driving it with <harness> (the example uses Driving it with control-notes)
  • Gotchas

Missing preconditions should fail and be written into Gotchas; weakening the journey to get a green result is not allowed.

4. Prove

text
launch → doctor → drive 一个已映射 feature → evidence → cleanup

After Cleanup, confirm the evidence is still there: a cleanup that deletes the proof counts as a failure. Output that has never been executed is only a draft. In a stand-in environment, list the extra steps it took that the real target would not.

5. Offer maintenance

Points to /maintain-verification-skill: outcomes clean / changed (at most one PR, changing only the verify directory) / blocked. It does not change product code; product regressions are only reported.

How it works with diff review (in practice)

  • During feature development: the main loop edits code; when you need a static opinion, use a "read the diff" flow like AI code review.
  • When it claims "done": use /verify-<app> to drive the real app along the feature map, and require video/screenshot/side-effect evidence.
  • Review is green but verify fails: trust the runtime evidence first, then go back and fix the code or update the map (use maintain for map drift; don't paper over product bugs by editing docs).

For the discussion on folding sub-Agents into main-loop Skills, see Don't rush to stack sub-Agents. That is about orchestration shape; a verification skill is acceptance infrastructure, and neither replaces the other.

After generation

  • Commit .cursor/skills/verify-<app>/
  • Write in prompts use /verify-<app> to verify…
  • Once the map is stable, use /swarm to split acceptance by feature
  • If you keep writing one-off click scripts, follow the guide and build a small control CLI (--dry-run, machine-readable output) for the skill to call

Common pitfalls

  • Treating "the diff was reviewed" as "the feature works in the app."
  • Treating "the process is up" as ready.
  • Cleanup killing by process name, or deleting the evidence directory.
  • The map lists several items but only one convenient entry point gets tested.
  • Expecting the model to run the generator on its own (it has disable-model-invocation).

FAQ

Which comes first, diff review or the verification skill?

There is no single order. A common pattern is reviewing diffs anytime during development, with at least one real-app proof required before claiming delivery. If you lack a review entry point, see AI code review; if you lack the ability to drive the app, run /create-verification-skill.

Where does the output go?

.cursor/skills/verify-<app>/, containing SKILL.md and features/.

Does this article include your own end-to-end timings?

No. We only checked the public raw files and the heading structure of feature-map-example. After you Prove it in your own repository, go by your own commands and evidence.

Create an API Key →