running-claude-smoke-tests
Skill81 starsChanged 6 months agoMITView on GitHub
This skill should be used when the user asks to run or verify a VBW smoke test with plain Claude Code (`claude`), capture visible `Skills:` output, validate `.vbw-planning/.skill-decisions.log`, or confirm consumer-smoke-worktree versus `--plugin-dir` provenance for local smoke coverage in this repo.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- vbw-fix-issueSkill
- vbw-qa-investigatorSkill
- vbw-review-contributor-prSkill
- running-ccr-smoke-testsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
37 rules. About 0 are common, 21 are distinctive, and 16 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈21
Distinctive · estimate
This author's own choices. Worth a look.
16
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Do not run the smoke test with the VBW plugin repo or plugin worktree as the working directory.
- Distinctive: line 14
Do not run the smoke test directly in the base consumer repo checkout.
- Very specific: line 15
Create or reuse a disposable consumer smoke worktree and run claude there, or use a sandbox repo when the real consumer repo cannot …
- Very specific: line 16
Use the candidate VBW checkout only as --plugin-dir.
- Very specific: line 17
If the smoke needs installed skill fixtures, seed them only under the consumer repo's .claude/skills/<skill>/ tree or the global Claude …
- Very specific: line 18
When documenting results, say: "smoke-tested from a consumer smoke worktree or sandbox while loading the candidate plugin checkout via …
- Distinctive: line 19
If the transcript path encodes the plugin repo or the base consumer repo checkout instead of the consumer smoke worktree or sandbox, treat …
- Distinctive: line 31
Keep these four locations distinct throughout the run:
- Very specific: line 57
Treat the candidate plugin checkout as the path passed to --plugin-dir.
- Distinctive: line 67
If it returns an absolute path, use that repo as the source checkout for the consumer smoke worktree.
- Distinctive: line 68
If it fails and the smoke target must represent real consumer-repo behavior, ask the user for the real consumer repo path.
- Distinctive: line 69
Use a dedicated sandbox repo only when the real consumer repo is unavailable or cannot exercise the targeted flow.
- Distinctive: line 70
If it resolves to the same path as the candidate plugin checkout, stop and correct the target.
- Distinctive: line 74
Use a disposable worktree derived from the consumer repo checkout so smoke artifacts do not land in the production checkout.
- Very specific: line 96
Run all consumer-repo smoke commands from SMOKE_WORKTREE, never from CONSUMER_REPO.
- Distinctive: line 100
Use the consumer smoke worktree for flows that do not require special phase state:
- Distinctive: line 106
Use a sandbox repo when the real consumer repo cannot exercise a phase-routed flow cleanly, for example:
- Distinctive: line 111
When you split coverage this way, say so explicitly in the verification summary.
- Distinctive: line 115
Use the plain Claude Code entrypoint for this variant:
- Very specific: line 125
Before each smoke command, explicitly cd into the consumer smoke worktree or sandbox repo.
- Very specific: line 129
When the smoke target can spawn subagents or task worktrees (for example /vbw:debug, /vbw:fix, or any flow that asks the agent to inspect …
- Very specific: line 131
Commit the minimal seed fixtures that define the bug premise before invoking claude.
- Very specific: line 132
If the smoke depends on a file being present, absent, or containing exact text, make that file part of HEAD first so subagent worktrees and …
- Very specific: line 133
Keep runtime artifacts such as .vbw-planning/ untracked unless the smoke specifically needs tracked planning state, but do not assume …
- Very specific: line 135
When driving that persistent session through repeated -p calls, create the first call with --session-id <uuid> and continue later calls …
- Distinctive: line 140
Commit the fixture file whose content establishes the premise.
- Very specific: line 143
Run /vbw:list-todos and /vbw:debug N in the same session.
- Very specific: line 149
If claude -p "...prompt..." reports an input error, switch to stdin and keep it that way for the run:
- Very specific: line 157
Use printf '%s\n' instead of echo so punctuation and backslashes are preserved in a shell-portable way.
- Very specific: line 196
If plain output does not surface the Skills: line, use this dedicated stream-capture mode:
- Distinctive: line 211
Use this when you only need mode or skill-selection behavior and do not want the workflow to keep going:
- Distinctive: line 231
If the transcript path or cwd points at the plugin repo, do not document the smoke test as consumer coverage.
- Distinctive: line 235
If you suspect the smoke ran in the wrong place:
- Distinctive: line 236
run git status --short in the base consumer repo checkout
- Distinctive: line 237
run git status --short in the consumer smoke worktree
- Distinctive: line 238
run git status --short in the main plugin repo checkout
- Distinctive: line 239
run git status --short in the candidate plugin checkout if it is a separate worktree
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Running Claude Code smoke tests
Use this skill when validating VBW behavior with plain Claude Code so future issue-fix runs do not have to rediscover the local CLI entrypoint, the consumer repo path, or the provenance checks. This is the plain-Claude counterpart to the CCR smoke-test workflow: keep the worktree and provenance rules the same, but replace ccr code with claude.
Core rule
- Do not run the smoke test with the VBW plugin repo or plugin worktree as the working directory.
- Do not run the smoke test directly in the base consumer repo checkout.
- Create or reuse a disposable consumer smoke worktree and run
claudethere, or use a sandbox repo when the real consumer repo cannot exercise the flow. - Use the candidate VBW checkout only as
--plugin-dir. - If the smoke needs installed skill fixtures, seed them only under the consumer repo's
.claude/skills/<skill>/tree or the global Claude configskills/directory after sourcingscripts/resolve-claude-dir.shand using${CLAUDE_DIR}. Do not use.agents/or.pi/as positive fixtures. - When documenting results, say: "smoke-tested from a consumer smoke worktree or sandbox while loading the candidate plugin checkout via
--plugin-dir". - If the transcript path encodes the plugin repo or the base consumer repo checkout instead of the consumer smoke worktree or sandbox, treat the smoke result as suspect until proven otherwise.
Expected inputs
- Candidate plugin checkout path, usually the current VBW worktree under test.
- Preferred consumer repo path, resolved from the VBW checkout with:
bash scripts/resolve-debug-target.sh repo
- Smoke worktree label such as
smoke-fix-issue-502orsmoke-skill-audit. - Optional sandbox path such as
/tmp/vbw-skill-smoke-<issue>for phase-routed flows the real consumer repo cannot exercise.
Location roles
Keep these four locations distinct throughout the run:
- Candidate plugin checkout — the VBW repo checkout under test. Pass this path only through
--plugin-dir. - Consumer repo — the real target repo used to resolve the testing target and create or remove the smoke worktree. Do not run
claudefrom this checkout. - Consumer smoke worktree — the disposable worktree created from the consumer repo. This is the real cwd for consumer-repo smoke tests.
- Sandbox repo — a temporary repo used only when the consumer repo cannot exercise the required phase-routed flow.
Workflow
Copy this checklist into the run if the task is multi-step:
Claude Smoke Test Progress:
- [ ] Confirm candidate plugin checkout/worktree path
- [ ] Resolve real consumer repo path
- [ ] Create or enter the consumer smoke worktree
- [ ] Decide consumer worktree vs sandbox per flow
- [ ] Run smoke command(s) with `claude`
- [ ] Capture visible `Skills:` evidence when needed
- [ ] Capture `.skill-decisions.log` deltas
- [ ] Verify transcript/project path provenance
- [ ] Confirm the base consumer repo and plugin checkout did not become the smoke cwd1. Confirm the candidate plugin path
Treat the candidate plugin checkout as the path passed to --plugin-dir. In issue-fix runs, this is usually the feature worktree, not the main plugin repo checkout.
2. Resolve the real consumer repo first
From the VBW checkout, resolve the preferred smoke target with:
bash scripts/resolve-debug-target.sh repo- If it returns an absolute path, use that repo as the source checkout for the consumer smoke worktree.
- If it fails and the smoke target must represent real consumer-repo behavior, ask the user for the real consumer repo path.
- Use a dedicated sandbox repo only when the real consumer repo is unavailable or cannot exercise the targeted flow.
- If it resolves to the same path as the candidate plugin checkout, stop and correct the target. The smoke cwd must be the consumer smoke worktree or sandbox, never the candidate plugin checkout.
3. Create or enter the consumer smoke worktree
Use a disposable worktree derived from the consumer repo checkout so smoke artifacts do not land in the production checkout.
CONSUMER_REPO=/absolute/path/to/consumer-repo
SMOKE_LABEL=smoke-fix-issue-502
CONSUMER_NAME=$(basename "$CONSUMER_REPO")
CONSUMER_PARENT=$(cd "$CONSUMER_REPO/.." && pwd)
SMOKE_BASE="${CONSUMER_PARENT}/${CONSUMER_NAME}-worktrees"
SMOKE_WORKTREE="${SMOKE_BASE}/${SMOKE_LABEL}"
mkdir -p "$SMOKE_BASE"
if git -C "$CONSUMER_REPO" worktree list --porcelain | grep -Fqx "worktree $SMOKE_WORKTREE"; then
:
elif [ -e "$SMOKE_WORKTREE" ]; then
echo "Target smoke worktree path exists but is not a registered worktree: $SMOKE_WORKTREE" >&2
exit 1
else
git -C "$CONSUMER_REPO" worktree add --detach "$SMOKE_WORKTREE" HEAD
fiRun all consumer-repo smoke commands from SMOKE_WORKTREE, never from CONSUMER_REPO.
4. Pick the right target for each flow
Use the consumer smoke worktree for flows that do not require special phase state:
/vbw:debug/vbw:fix/vbw:research/vbw:map
Use a sandbox repo when the real consumer repo cannot exercise a phase-routed flow cleanly, for example:
- consumer repo has
next_phase_state=no_phases - you need
/vbw:qaagainst a seeded phase - you need
/vbw:vibe --executeor/vbw:vibe --verifyagainst controlled phase or UAT state
When you split coverage this way, say so explicitly in the verification summary.
5. Use claude for this variant
Use the plain Claude Code entrypoint for this variant:
claude --helpWe have not runtime-validated this path here. Treat claude as the expected local equivalent of ccr code, and confirm any flag assumptions with claude --help before relying on them.
6. Run claude from the consumer smoke worktree or sandbox
Before each smoke command, explicitly cd into the consumer smoke worktree or sandbox repo. Do not rely on ambient shell state.
6.5. Shape sandbox repos for subagent-driven flows
When the smoke target can spawn subagents or task worktrees (for example /vbw:debug, /vbw:fix, or any flow that asks the agent to inspect repo files), the sandbox repo shape matters:
- Commit the minimal seed fixtures that define the bug premise before invoking
claude. - If the smoke depends on a file being present, absent, or containing exact text, make that file part of
HEADfirst so subagent worktrees and git-based checks see the same evidence. - Keep runtime artifacts such as
.vbw-planning/untracked unless the smoke specifically needs tracked planning state, but do not assume untracked repo fixtures will appear inside subagent worktrees. - For snapshot-backed numbered selection flows (for example
/vbw:list-todosfollowed by/vbw:debug 1), keep both commands in the same persistent session. Separate one-shot-pinvocations do not share the numbered snapshot. - When driving that persistent session through repeated
-pcalls, create the first call with--session-id <uuid>and continue later calls with-r <uuid>instead of repeating--session-id. Reusing--session-idon the follow-up call can fail withSession ID ... is already in use.
Good sandbox shape for an already-fixed debug smoke:
- Create sandbox repo.
- Commit the fixture file whose content establishes the premise.
- Run
/vbw:init. - Add the todo.
- Run
/vbw:list-todosand/vbw:debug Nin the same session.
For print-mode automation, that means: first call uses --session-id, second call uses -r for the same UUID.
7. Pipe the prompt through stdin
If claude -p "...prompt..." reports an input error, switch to stdin and keep it that way for the run:
cd /absolute/path/to/consumer-smoke-worktree && \
printf '%s\n' '/vbw:fix Investigate a SwiftData save failure during tests.' \
| claude -p --dangerously-skip-permissions --plugin-dir /absolute/path/to/candidate-plugin-checkoutUse printf '%s\n' instead of echo so punctuation and backslashes are preserved in a shell-portable way.
8. Add a smoke-test system prompt
For normal smoke checks, append a short system prompt that reduces side effects and keeps output easy to inspect:
Smoke test only. Avoid code edits. Keep output concise. Focus on diagnosis and reporting.For routing-only probes, make the stop condition explicit:
Smoke test only. Stop after choosing skills and mode. Do not modify project files. Keep output concise.9. Capture the right evidence
Always capture:
- command exit code
- transcript or project path proving the smoke cwd was the consumer smoke worktree or sandbox
Then capture the claim-matched evidence you actually need:
- Visible-selection claim → capture a visible
Skills:line - Activation or logging claim → capture
.vbw-planning/.skill-decisions.logdeltas - Domain-skill claim → capture task-specific keyword matches when relevant, such as
SwiftDataorswiftdata
Standard smoke pattern
cd /absolute/path/to/consumer-smoke-worktree && \
printf '%s\n' '/vbw:research Research SwiftData persistence failures.' \
| claude -p --dangerously-skip-permissions \
--plugin-dir /absolute/path/to/candidate-plugin-checkout \
--append-system-prompt 'Smoke test only. Avoid code edits. Keep output concise. Focus on diagnosis and reporting.'Visible Skills: capture pattern
If plain output does not surface the Skills: line, use this dedicated stream-capture mode:
cd /absolute/path/to/consumer-smoke-worktree && \
printf '%s\n' '/vbw:fix Investigate a SwiftData save or schema failure.' \
| claude -p --verbose --dangerously-skip-permissions \
--plugin-dir /absolute/path/to/candidate-plugin-checkout \
--append-system-prompt 'Smoke test only. Avoid code edits. Keep output concise. Focus on diagnosis and reporting.' \
--output-format stream-json --include-partial-messagesThen search the captured output for Skills:.
Routing-only probe pattern
Use this when you only need mode or skill-selection behavior and do not want the workflow to keep going:
cd /absolute/path/to/sandbox-repo && \
printf '%s\n' '/vbw:vibe --execute 1' \
| claude -p --permission-mode plan --dangerously-skip-permissions \
--plugin-dir /absolute/path/to/candidate-plugin-checkout \
--append-system-prompt 'Smoke test only. Stop after choosing skills and mode. Do not modify project files. Keep output concise.'10. Verify provenance before trusting the result
Use these checks:
- The shell cwd for
claudemust be the consumer smoke worktree or sandbox. - The transcript path should encode the consumer smoke worktree or sandbox path under
<claude-config-dir>/projects/..., not the candidate plugin checkout or base consumer repo checkout.- Resolve
<claude-config-dir>the same way this repo does:CLAUDE_CONFIG_DIRif set, else$HOME/.config/claude-codewhen that directory exists, else$HOME/.claude. - Consumer worktree example:
<claude-config-dir>/projects/-path-to-consumer-repo-worktrees-smoke-fix-issue-502/... - Sandbox example:
<claude-config-dir>/projects/-private-tmp-vbw-skill-smoke-502/...
- Resolve
- The candidate plugin checkout should appear only as
--plugin-dir.
If the transcript path or cwd points at the plugin repo, do not document the smoke test as consumer coverage.
11. Verify repo cleanliness when provenance is in doubt
If you suspect the smoke ran in the wrong place:
- run
git status --shortin the base consumer repo checkout - run
git status --shortin the consumer smoke worktree - run
git status --shortin the main plugin repo checkout - run
git status --shortin the candidate plugin checkout if it is a separate worktree - inspect diffs for unexpected
.vbw-planningchanges
Expected smoke artifacts belong in the consumer smoke worktree or sandbox, not the base consumer repo checkout or the plugin repo.
Decision points
resolve-debug-target.sh repofails and you need real consumer coverage → ask for the consumer repo path instead of guessing.- Need real consumer coverage → create or reuse the consumer smoke worktree before running any
claudecommand. - Real consumer repo cannot exercise
/vbw:vibeor/vbw:qa→ use a sandbox for those flows and keep the consumer smoke worktree for/vbw:debug,/vbw:fix,/vbw:research, and/vbw:map. - Plain
-pinvocation reports missing input → switch to stdin and keep it that way. - Need visible
Skills:output → use stream-json plus--verboseand search the capture. - Need routing proof without side effects → use
--permission-mode planplus the routing-only smoke prompt. - Base consumer repo checkout, candidate plugin checkout, or main plugin repo shows unexpected
.vbw-planningchanges → stop and investigate provenance before writing the verification summary.
Completion checks
A smoke run is ready to cite only when all are true:
- The working directory was the consumer smoke worktree or sandbox.
--plugin-dirpointed at the candidate plugin checkout.- Required command outputs were captured for the claim being made.
- Provenance evidence was captured.
.skill-decisions.logand/or visibleSkills:evidence supports the specific claim being made.- The base consumer repo checkout did not become the smoke cwd or collect smoke artifacts.
- Any sandbox use is called out explicitly.
- The plugin repo is not being misrepresented as the smoke-test cwd.
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
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.

