agentleFS
guillempucheguillempuche/shorts-studio/.agents/skills/verify/SKILL.md

verify

Skill3 starsChanged 4 days agoApache-2.0View on GitHub

Use a shorts-studio change the way a user or an agent would before it is committed or goes into a pull request - run the CLI commands and MCP tools it touches in a sandbox with fake keys and scratch posts, look at the pictures and video it makes - and write the proof as the PR's `## Verification` section. Use this skill before committing or opening or updating a PR that touches apps/, packages/ or a skill's commands, and whenever asked to verify, try, check or prove a change works ("verify this", "try it as a user", "does it really work"), even when the request doesn't say "verify". Not for debugging while building, and never against the user's real posts, keys or Keychain.

188 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use genie-hacks, workfly and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • automagik-devSkill

    genie-hacks

    Browse, search, and contribute community hacks — real-world patterns for provider switching, teams, skills, hooks, cost optimization, and more.

    Also in 3 projects that use this

  • automagik-devSkill

    workfly

    Discover a procedure and build its saved workflow — dynamic discovery, drafted script, adversarial verification, landed in the catalog.

    Also in 3 projects that use this

  • AviadPSkill

    risk-assess

    Assess the risk and blast radius of a proposed code change before implementing it. Evaluates CI impact, framework-wide vs localized scope, rollback path, and identifies blindspots. Use when user says "what's the risk", "is this safe", "assess the impact", "risk assess", "blast radius", or before applying framework-wide or CI-affecting changes. Do NOT use for code quality review (use code-quality) or plan validation (use design-validator).

    Also in 3 projects that use this

  • sanmidableSkill

    defaults

    Also in 3 projects that use this

  • diego-tobalinaSkill

    build-fix

    Fix build and compilation errors systematically. Run when build fails.

    Also in 7 projects that use this

  • TheKREATORSSkill

    instinct-export

    Export instincts from project/global scope to a file

    Also in 3 projects that use this

  • +2 more from automagik-dev

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 167 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Commands that record the user's decision are theirs: Every operation that calls requireUser (grep -rn "requireUser(" …

    line 15
  2. Distinctive:

    CLI: keep the command, the exit code and the part of the output that proves the step, never a whole JSON body.

    line 46
  3. Very specific:

    MCP: start bin/shorts-studio mcp serve in the sandbox's shell, write its process id to $SANDBOX/mcp.pid (echo $!

    line 47
  4. Very specific:

    Read the error and its fix, fix the cause, and walk the flow again from its first step.

    line 55
  5. Very specific:

    ### Checks: always last: only the commands you ran.

    line 89
  6. Very specific:

    Stop the mcp serve you started, and only that one: kill "$(cat "$SANDBOX/mcp.pid")".

    line 95

“Common” is measured: kept by at least 6 in 10 of the 167 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Verify a change before its commit or pull request

Tests and types pass on changes that still fail when used. Run what changed the way a person or an agent would, and leave the proof: each step, what you saw, and whether it passed. The pr skill puts the result in the PR body. For a commit without a PR, tell the user the result before showing the commit preview.

Gotchas

  • Never unset a key to test "missing key". The CLI then falls back to the Keychain. sandbox.sh sets USER to an account that doesn't exist, so the lookup finds nothing; keep it that way.
  • Commands that record the user's decision are theirs. Every operation that calls requireUser (grep -rn "requireUser(" packages/usecases/src/operations) refuses in an agent's shell. Never work around that with a pseudo-terminal. Build the state in memory (step 3) or mark the step not walked: needs the user.
  • A paid provider without a dead port isn't safe to call. doctor must show a SHORTS_<ID>_URL … 127.0.0.1:9 warning for every paid provider the change touches. If one is missing, the provider has no PaidService id or no URL override: fix the provider, or leave its step not walked.
  • Anything that writes outside $SANDBOX (a cache folder, a vault, a download) must be pointed into it first, or its step is not walked.

1. Which flows

pnpm verify:flows            # against origin/main; pass another base to compare with it

It prints the flows of scripts/verify-flows.ts that the branch's changes need (commits, uncommitted work and new files), each with what to walk. Walk every one, and also what the change adds that no flow describes yet. Exit codes are in docs/architecture.md.

  • Nothing printed (docs, OpenSpec, CI, tests, a refactor no user sees): write No flow: <reason> and go to step 5.
  • The change adds a command or a kind of output: add its flow to the map in the same PR. Its test fails while a file under apps/, packages/ or bin/ belongs to no flow. A flow that takes more than a few lines to walk goes in references/<flow>.md, linked from here with when to read it.

2. Set up the sandbox

From the repository root, inside nix develop:

. .agents/skills/verify/scripts/sandbox.sh      # scratch folders, fake keys, dead provider ports
.agents/skills/verify/scripts/sample-media.sh   # tone, click track, test video and image in $SANDBOX/media
bin/shorts-studio doctor

sandbox.sh reads the providers from the code, so it covers a new one without edits. Run every command of the walk in that same shell. Use only the sample media, never the user's files; a flow that needs another kind of file adds it to sample-media.sh.

3. Walk each flow

For each step: do it, look, and write down what you saw, not what you expected.

  • CLI: keep the command, the exit code and the part of the output that proves the step, never a whole JSON body.
  • MCP: start bin/shorts-studio mcp serve in the sandbox's shell, write its process id to $SANDBOX/mcp.pid (echo $! > "$SANDBOX/mcp.pid": the next command's shell won't know $!), and send JSON-RPC lines on stdin: initialize, notifications/initialized, tools/list, tools/call.
  • Spending commands: --dry-run first and show the estimate; the real run only against the dead port.
  • States past the user's decision: build the post in memory with packages/usecases/src/test/{context,posts,fakes}.ts, from a scratch .ts in $SANDBOX run with node.
  • Pictures and video: look at every picture the change makes. For a video, extract a frame per beat (ffmpeg -ss <t> -i draft.mp4 -frames:v 1 frame-<n>.png) and check that the text is placed and readable, nothing is cut off, and the motion is the one expected. Pictures stay in $SANDBOX, never in a commit.
  • The change's own path too: the new flag, the fixed case, the error that now says something else.

4. When a step fails

  1. Read the error and its fix, fix the cause, and walk the flow again from its first step.
  2. Count the rounds of fixing for the same failing step.
  3. After three rounds that don't make it pass, stop. Tell the user the flow and step, what you saw, the three things you tried, and the output. Don't commit or open the PR, and don't write the step as passed.

A step that can't be walked here is not walked, with the reason. It is never pass.

5. Write ## Verification

The pr skill puts this section in the PR body as it is, in place of its own ## Verification. The Verification workflow checks it on every pull request with scripts/check-verification.ts, so keep its shape exactly. To check it before pushing: PR_BODY="$(cat body.md)" node scripts/check-verification.ts.

## Verification

| Flow | Walked on          | Result |
| ---- | ------------------ | ------ |
| cli  | sandbox, fake keys | pass   |
| mcp  | sandbox, mcp serve | pass   |

### cli

- `post show --post demo --json` on a post with a transcript → exit 0, `next.cli` is `beat plan --post demo`. pass
- `image generate --post demo --dry-run` → estimate 0.12 USD, no `budget.stoppedBy`. pass

### mcp

- `tools/call post_show {"post":"demo"}` → the same `next` as the CLI. pass

### Checks

- `pnpm check`, `pnpm check-types`, `pnpm test` and `pnpm check-links`, on the branch rebased on `main`.
  • One table row per flow walked. Walked on: sandbox, fake keys, sandbox, mcp serve, or in memory, test helpers. Result: pass, fail or not walked.
  • One ### <flow> per row, one line per step: what you did → what you saw, then pass, fail or not walked: <reason>.
  • ### Checks always last: only the commands you ran.
  • With no flow: No flow: <reason> under the heading, then ### Checks.
  • No user content and no brand names (rules 2 and 3): use slugs like demo.

6. Leave nothing running

Stop the mcp serve you started, and only that one: kill "$(cat "$SANDBOX/mcp.pid")". A pattern for pkill would also stop other sessions' servers. Then delete $SANDBOX.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.