run-and-verify
Run a command, trace every step, verify the expected outcome, and retry on failure.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Run a command, trace every step, verify the expected outcome, and retry on failure.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | run-and-verify |
| description | Run a command, trace every step, verify the expected outcome, and retry on failure. |
| category | self-feedback |
| version | 1 |
| compatibility | devboy-tools >= 0.18 |
| activation | ["run and verify","verify this command worked","retry until green"] |
| tools | ["trace"] |
The opinionated wrapper that the other skills in this category assume.
It runs one command, emits a structured session trace for every attempt,
checks the expected outcome, and decides whether to retry. Downstream
skills (daily-report, retro,
knowledge-extract) consume the trace this skill produces.
Collect the following arguments from the caller:
--command "<shell command>" — the command to execute.--expect-exit 0 — exact exit code.--expect-stdout "<substring>" — stdout must contain this string.--expect-file "<path>" — this path must exist after the run.--expect-check "<verification command>" — a shell command whose
exit code 0 means "the main command did what it was supposed to".--max-retries 2 (default 2). The command runs up to
1 + max-retries times.--skill-name <name> — the name of the skill that invoked this
wrapper. Traces are written under
.devboy/sessions/<YYYY-MM-DD>/<skill-name>/<session_id>/ so
downstream readers attribute the work correctly.--allow-destructive — required before running anything that matches
the destructive-command guardrail (see below).If an expected-outcome flag is missing, the skill exits with an error — there is nothing to verify against.
result=$(devboy trace begin --skill "$SKILL_NAME")
SESSION_DIR=$(echo "$result" | jq -r .session_dir)
SESSION_ID=$(echo "$result" | jq -r .session_id)
Emit a decision event that records what the caller asked for:
devboy trace event \
--session-dir "$SESSION_DIR" --session-id "$SESSION_ID" \
--skill "$SKILL_NAME" --phase decision \
--payload "$(jq -nc --arg cmd "$COMMAND" --arg expect "$EXPECT" \
'{question:"what to run",decision:$cmd,expected:$expect}')"
For attempt in 1..=1+max_retries:
tool_call event describing the command about to run and
the attempt number.ERROR|WARN|FAIL|panic. Everything else
can be dropped — trace payloads should stay small (ADR-015 risks).tool_result event with {ok, exit, duration_ms, summary}.verify event with
{check, ok, detail}. The check is:
test -e <path>, or--expect-check shell command.ok: true, break out of the loop.note event explaining why
the next attempt is happening ("expect-exit 0 but got 1; retrying"),
and continue. If retries are exhausted, fall through to step 4.Pick the outcome:
success — some attempt produced ok: true on both tool-result and
verify.failure — every attempt failed the verification.aborted — the caller interrupted mid-run, or a destructive command
was rejected by the guardrail.devboy trace end \
--session-dir "$SESSION_DIR" --session-id "$SESSION_ID" \
--skill "$SKILL_NAME" --outcome "$OUTCOME" \
--summary "$SHORT_SUMMARY"
Print a 3-to-5-line summary to stdout naming: the command, attempts
used, final outcome, and the path to the trace directory. Do not
reprint the full captured output — the caller can cat the trace if
they want it.
start and one end event per invocation.tool_call / tool_result /
verify trio.meta.json lands with outcome set to one of success | failure | aborted.Destructive commands are refused unless the caller passes
--allow-destructive. The refusal path still opens a session, emits a
note event describing the rejection, and ends with
outcome: aborted so downstream skills can see what happened.
Treat the following substrings (case-insensitive) as destructive:
git push --force, git push -f, git reset --hard,
git clean -fdx, git branch -Drm -rfdrop table, drop database, truncatekubectl delete, helm uninstallnotify (category 5).Walk a project from "no values provisioned" to "doctor --secrets is green" — eight idempotent steps with resume support via setup-state.toml. Wraps the secret framework (ADR-023 §3.8) for AI agents and headless onboarding.
Bootstrap devboy from scratch — install the CLI if missing, register the MCP server, run `devboy onboard` for the active agent, optionally bootstrap the secret framework, verify with `doctor`. First-run skill for both manual installs and the Claude Code / Codex plugin.
First-run wizard for the devboy secret framework — walk a fresh project from "no secret manifest, no router, no daemon" to "every required secret provisioned and verified". Idempotent eight-step flow per ADR-023 §3.8 with state at ~/.devboy/secrets/setup-state.toml so the user can resume or skip.
Analyse the user's Claude Code (or other agent) logs and auto-configure the layered-pipeline compression profiles for their tools, models, and workflow.
Diagnose and fix a broken devboy-tools setup — corrupt config, missing tokens, keychain trouble, wrong paths, plugin install failures.
Enumerate and introspect the active tool bundle — names, categories, schemas, how to invoke each tool from the CLI.