---
title: "Ask before a skill changes data or spends · Agent Wranglers"
url: https://agentwranglers.se/playbook/ai-assisted-development/agent-skills/skill-asks-first
updated: 2026-10-21
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Ask before a skill changes data or spends money

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers). Updated 2026-10-21.

For AI agents: [llms.txt](https://agentwranglers.se/llms.txt) is a short guide that sends you to the rules your problem needs, and [rules.json](https://agentwranglers.se/playbook/ai-assisted-development/rules.json) holds every rule of this playbook as JSON.

- Level: Required
- Chapter: [Agent skills](https://agentwranglers.se/playbook/ai-assisted-development/agent-skills)
- Rule: 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.
- Risk: Data leaked or lost
- How: 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](https://agentwranglers.se/playbook/ai-assisted-development/safety-and-permissions/least-privilege-agents) says. Do not rely on the skill text alone. Back the stop with permission rules or [blocking hooks](https://agentwranglers.se/playbook/ai-assisted-development/rules-the-agent-cannot-break/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.
- 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.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### Markdown example

```markdown
## 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

```python
# 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

```js
// 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}.`);
```

## Related rules

- [Give agents the fewest rights they need](https://agentwranglers.se/playbook/ai-assisted-development/safety-and-permissions/least-privilege-agents) in AI development
- [Block dangerous actions with hooks](https://agentwranglers.se/playbook/ai-assisted-development/rules-the-agent-cannot-break/blocking-hooks) in AI development

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/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 development playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Keep project skills in the repository and review them like code](https://agentwranglers.se/playbook/ai-assisted-development/agent-skills/project-skills-in-repo)
- Next: [Test each skill and keep it current](https://agentwranglers.se/playbook/ai-assisted-development/agent-skills/test-and-maintain-skills)
- [Agent skills](https://agentwranglers.se/playbook/ai-assisted-development/agent-skills)
