Purr CLI
Writing Skills
How to write OpenClaw skills that use purr for wallet operations.
Writing Skills
A skill is a directory containing a SKILL.md file. The file has a YAML frontmatter header and a markdown body describing the skill's tools and execution flows. OpenClaw reads this file to understand what the skill can do and how to invoke it.
SKILL.md structure
my-skill/
└── SKILL.mdSKILL.md format:
---
name: my-skill
description: One-sentence description of what this skill does.
---
# My Skill
(Describe tools, API operations, and how the agent should use them.)Example: check-balance skill
A skill that reads the user's wallet balance and reports it.
SKILL.md:
---
name: check-balance
description: Check the user's on-chain wallet balance.
---
# Check Balance Skill
## Tool: check_wallet_balance
Checks the current wallet balance.
### Execution
Run these commands and return the balance output to the user:
```bash
purr wallet balance
```Example: send-payment skill
A skill that transfers tokens to a specified address.
SKILL.md:
---
name: send-payment
description: Transfer tokens to a recipient address.
---
# Send Payment Skill
## Tool: send_payment
Transfers assets to a recipient.
### Parameters
- `to` — recipient wallet address
- `amount` — the amount to send
- `token` — token symbol (e.g. `eth`, `usdc`)
### Execution
1. Confirm intent with the user before executing.
2. Run:
```bash
purr wallet transfer --to <to> --amount <amount> --token <token>
```
3. Return the transaction hash from the output.Using purr in skill execution
Call purr commands exactly as documented in the Command Reference. All wallet operations are under purr wallet <subcommand>. DeFi operations use their own namespaces (purr pancake, purr lista, etc.).