donaldfilimon/abi / .agents/skills/os-control-dryrun
os-control-dryrun
VerifiedBuild the abi CLI and exercise the OS-control policy in dry-run (planning) mode only, and verify the execute path refuses without --confirm. Use when working on OS-control handlers or the `abi agent os` handler, or to safely demo OS-command planning. Never executes a command.
dryrun.sh
View on GitHub#!/usr/bin/env bash
# os-control-dryrun driver: build the abi CLI and exercise the OS-control policy
# PLANNING path only — `abi agent os dry-run`. This NEVER executes a command;
# it only prints the plan. The execute path (`agent os execute --confirm`) is
# deliberately out of scope for this skill (destructive / requires confirmation).
#
# Usage: .agents/skills/os-control-dryrun/dryrun.sh [command [args...]]
set -uo pipefail
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
REPO_ROOT=$(cd -- "$SCRIPT_DIR/../../.." && pwd)
cd "$REPO_ROOT"
ABI="$REPO_ROOT/target/debug/abi"
if [ "$#" -eq 0 ]; then
COMMAND=(pwd)
else
COMMAND=("$@")
fi
fail=0
say() { printf '\n=== %s ===\n' "$*"; }
say "build cli"
./tools/cargo.sh build -p abi-cli >/dev/null 2>&1 && echo "[ok] build" || { echo "[FAIL] build"; exit 1; }
[ -x "$ABI" ] || { echo "[FAIL] no binary"; exit 1; }
say "abi agent os dry-run (planning only — no execution)"
out=$("$ABI" agent os dry-run "${COMMAND[@]}" 2>&1); rc=$?
printf '%s\n' "$out"
[ "$rc" -eq 0 ] || { echo "[FAIL] dry-run exit $rc"; fail=$((fail+1)); }
[[ "$out" == *"dry-run:"* ]] && echo "[ok] plan emitted (no execution)" \
|| { echo "[FAIL] missing 'dry-run:' marker"; fail=$((fail+1)); }
# Safety assertion: execute WITHOUT --confirm must be refused with usage (exit 2),
# never run. This guards the confirm gate without ever executing anything.
say "safety: execute without --confirm is refused"
"$ABI" agent os execute rm >/dev/null 2>&1; rc=$?
if [ "$rc" -eq 2 ]; then echo "[ok] execute without --confirm -> usage (exit 2)"; \
else echo "[FAIL] execute without --confirm returned $rc (expected 2)"; fail=$((fail+1)); fi
say "summary"; echo "failed: $fail"
[ "$fail" -eq 0 ] && echo "RESULT: PASS — OS-control dry-run + confirm-gate verified." || echo "RESULT: FAIL — $fail check(s)."
exit "$fail"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |