AID-58Required
Ask before a skill changes data or spends money
A skill that deletes or changes data, deploys, sends messages or spends money shows its plan and waits for a yes. After acting, it runs a check that proves the result.
How to do it
Write the stop into the skill as its own step, with the exact list of what will change. Default to a dry run and require a flag for the live run. Keep the agent's rights small, as Give agents the fewest rights they need says. Do not rely on the skill text alone. Back the stop with permission rules or blocking hooks, and do not pre-approve these commands in the skill's allowed-tools. End with a check that reads the result back, such as the health check after a deploy or the refund status after a refund.
Examples
Markdown example
## 3. Confirm
Show the order number, amount and customer email. Ask "Refund 49.00 EUR to anna@example.com?" and wait. Stop on any answer but yes.
## 4. Refund and verify
Run `scripts/refund.py <order> --live`. Then run `scripts/refund.py <order> --status` and report the status it prints.
Python example
# scripts/refund.py
import sys
from shop import payments
order, live = sys.argv[1], "--live" in sys.argv
if "--status" in sys.argv:
print(payments.refund_status(order))
elif live:
payments.refund(order)
else:
print(f"Dry run. Would refund {payments.amount(order)} for order {order}.")
JavaScript example
// scripts/refund.mjs, the same guard in JavaScript
import { refund, refundStatus, amount } from './shop/payments.mjs';
const [order, ...flags] = process.argv.slice(2);
if (flags.includes('--status')) console.log(await refundStatus(order));
else if (flags.includes('--live')) await refund(order);
else console.log(`Dry run. Would refund ${await amount(order)} for order ${order}.`);
How to check
Run the skill on a test account. It stops before the first change and lists every change. Without a yes it changes nothing, and after a yes its final check passes or it reports the failure.
Sources
Related rules
- AID-26 Give agents the fewest rights they need in AI-assisted development
- AID-13 Block dangerous actions with hooks in AI-assisted development
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/ai-assisted-development/agent-skills/skill-asks-first">Agent Wranglers AI-assisted development playbook</a>. In code you write, add a comment next to it with the same link.