unsnag pimlico 1.2.0 · 7bff655a7e58 dirty
· 32m 29s mock
known gaps of mock: usage and key activity have no 1-2 hour aggregation lag; month-to-date metered units behind balance are fixed values; no rate limiting
runs / create-key-env/claude-code-anthropic-claude-opus-5.5/skill/3 · ← prev next →

create-key-env/claude-code-anthropic-claude-opus-5.5/skill/3 · pass

Outcome
pass
2/2 Checks passed
Turns
5
model turns
CLI calls
2
0 exited non-zero
Help lookups
0
reads of the CLI's help
Tokens in
34775
30931 of them cached
Tokens out
927
written by the model
Cost
$0.04
of the model calls
Wall time
16.3s
from start to the Checks
scenario
create-key-env
agent
claude-code:anthropic/claude-opus-5.5 · 2.1.318
context
skill
repeat
3 · cell ✗✓✓✓✗
findings
—
provider
Anthropic

checks

#checkresultdetailsignal
1
curl -fsS "$PIMLICO_DASHBOARD_URL/__mock/facts" | jq -e '[.keys[] | select(.name == "checkout-service" and (.disabled | not))] | length == 1'
passexited 0
true
2
set -euo pipefail
secret=$(curl -fsS "$PIMLICO_DASHBOARD_URL/__mock/facts" | jq -r '.keys[] | select(.name == "checkout-service") | .secret')
grep -Eq "^(export )?PIMLICO_API_KEY=[\"']?$secret[\"']?[[:space:]]*$" /work/.env
passexited 0

reproduce

unsnag run --scenario create-key-env --agent claude-code:anthropic/claude-opus-5.5 --context skill --runs 1

Transcript highlighted = a Signal fired

#actorcontentexitsignal
0user
You have the `pimlico` CLI available.

Create a new Pimlico API key named checkout-service and save it in a .env file in this folder as PIMLICO_API_KEY.
1agent
[Skill] {"skill":"pimlico"}
Launching skill: pimlico
2harness
Base directory for this skill: /work/.claude/skills/pimlico

# The `pimlico` CLI

`pimlico` reads and changes the Pimlico account the user is logged in to. Every
command takes `--json`, which prints one JSON object (errors too, as
`{"error": {...}}` on stdout). Prefer `--json` when you parse output.

Exit codes: `0` ok, `1` error, `2` a threshold was breached (`balance --below`),
`3` not logged in, `75` the API is unavailable or rate-limited. On exit 3, run
`pimlico login --no-wait --json`, show the user the `url` and `code`, then call
`pimlico login --wait --json` in the same turn until `status` is not `pending`.

## Commands

| Task | Command |
| --- | --- |
| Who am I logged in as | `pimlico whoami` |
| Credits, open invoices, runway | `pimlico balance` (`--below <usd>` exits 2 under it) |
| Invoices | `pimlico invoices` (`--open` for unpaid only) |
| Traffic and spend | `pimlico usage --last 24h\|7d\|30d --group chain\|key\|day [--key <name>]` |
| One user operation | `pimlico op <userOpHash> [--chain <id>]` |
| User operation logs | `pimlico ops [--key <name>] [--chain <id>] [--status <status>] [--last 24h\|7d\|30d]` |
| RPC request logs | `pimlico requests [--key <name>] [--method <rpc method>] [--status success\|error] [--bodies]` |
| Supported chains | `pimlico chains [--mainnet\|--testnet]` (no login needed) |
| ERC-20 paymaster tokens | `pimlico erc20 tokens [--chain <id>]` |
| API keys | `pimlico keys list [--all]`, `keys get <name>`, `keys create --name <n>`, `keys rename <name> --to <n>`, `keys disable <name>` |
| Sponsorship policies | `pimlico policies list`, `policies get <sp_id>`, `policies create --name <n> …`, `policies update <sp_id> …`, `policies enable\|disable <sp_id>` |

Run `pimlico <command> --help` for every flag.

## Things to know

- **Policies are addressed by id**, not name: find the `sp_…` id with
  `pimlico policies list` first. Policy amounts are in USD
  (`--budget-usd`, `--per-user-usd`, `--per-op-usd`); `--chains` takes
  comma-separated chain ids (Base is 8453, Optimism 10, Base Sepolia 84532).
  Dates (`--start`, `--end`) are ISO 8601.
- **API keys are addressed by name.** `keys create` prints the new key's
  secret once; save it then. `keys disable` cannot be undone from the CLI.
  Names only need to be unique among active keys.
- **Logs are paginated.** `ops` and `requests` print 50 records per page and a
  `nextCursor`; pass `--all` to walk every page (up to `--max`, 1000 by
  default; with `--json` it prints one JSON object per line). `--csv` prints
  CSV. Both default to the last 24h; widen with `--last 7d` or `--last 30d`.
- **`ops --status` takes one status.** A failed operation is any of
  `failed_validation`, `dropped`, `failed_onchain`,
  `execution_reverted_onchain` and `frontran_onchain`; query each, or fetch
  them all and filter. Operations rejected on submission never become
  operations: look for them with
  `pimlico requests --method eth_sendUserOperation --status error`.
- **Why did an oper
[… 78 more characters]
3agent
$ ls -la && cat .env 2>/dev/null; cat .gitignore 2>/dev/null; pimlico keys list --json
total 16
drwxr-xr-x 1 agent agent 4096 Nov 16 23:22 .
drwxr-xr-x 1 root  root  4096 Nov 16 23:22 ..
drwxrwxrwx 3 agent agent 4096 Nov 16 23:22 .claude
drwxrwxrwx 8 agent agent 4096 Nov 16 23:22 .git
{
  "keys": [
    {
      "name": "production-web",
      "disabled": false,
      "createdAt": "2026-04-10T23:22:06.333Z",
      "boost": true,
      "lastUsedAt": "2026-11-16T23:16:26.498Z",
      "requests30d": 9000,
      "userOps30d": 1180
    },
    {
      "name": "mobile-app",
      "disabled": false,
      "createdAt": "2026-06-09T23:22:06.333Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:17:06.015Z",
      "requests30d": 5200,
      "userOps30d": 700
    },
    {
      "name": "staging",
      "disabled": false,
      "createdAt": "2026-07-19T23:22:06.333Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T21:22:01.651Z",
      "requests30d": 840,
      "userOps30d": 76
    },
    {
      "name": "analytics-readonly",
      "disabled": false,
      "createdAt": "2026-08-18T23:22:06.333Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:06:11.255Z",
      "requests30d": 3100,
      "userOps30d": 0
    },
    {
      "name": "fixture-key",
      "disabled": false,
      "createdAt": "2026-10-02T23:22:06.333Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T22:55:43.818Z",
      "requests30d": 2422,
      "userOps30d": 380
    }
  ],
  "warnings": []
}
4agent
$ pimlico keys create --name checkout-service --json > /tmp/pk.json; echo "exit $?"; python3 -c "import json;d=json.load(open('/tmp/pk.json'));print({k:('<redacted>' if isinstance(v,str) and len(v)>30 else v) for k,v in d.items()})"
exit 0
{'key': 'pim_ZAokhrDyHcXjD87eNfhxfd', 'name': 'checkout-service', 'createdAt': '2026-11-16T23:22:16.698Z', 'warnings': []}
5agent
$ python3 -c "import json;d=json.load(open('/tmp/pk.json'));open('.env','w').write('PIMLICO_API_KEY='+d['key']+'\n')" && chmod 600 .env && rm /tmp/pk.json && echo ".env" >> .gitignore && git status --short && sed 's/=.*/=<set>/' .env
?? .gitignore
PIMLICO_API_KEY=<set>
6agent
I created a new Pimlico API key named `checkout-service` and saved it to `/work/.env` as `PIMLICO_API_KEY`. The secret is only shown once, when the key is created, and it's now stored in that file.

- **Git:** There was no `.gitignore`, so I made one with `.env` in it to keep the key out of commits. `git status` now shows only `.gitignore` as new, which means `.env` is being ignored. I haven't committed anything.
- **Permissions:** I set `.env` so only your user can read or write it (`600`).
- **Cleanup:** I deleted the temporary file the key was first written to.

The key's secret was briefly printed in my session output, because I didn't expect it to be short enough to appear. If you want it never to have been displayed anywhere, I can disable this key and make a new one. The catch is that disabling can't be undone from the CLI.

Target CLI calls

#callexitmssignal
0
$ pimlico keys list --json
{
  "keys": [
    {
      "name": "production-web",
      "disabled": false,
      "createdAt": "2026-04-10T23:22:06.333Z",
      "boost": true,
      "lastUsedAt": "2026-11-16T23:16:26.498Z",
      "requests30d": 9000,
      "userOps30d": 1180
    },
    {
      "name": "mobile-app",
      "disabled": false,
      "createdAt": "2026-06-09T23:22:06.333Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:17:06.015Z",
      "requests30d": 5200,
      "userOps30d": 700
    },
    {
      "name": "staging",
      "disabled": false,
      "createdAt": "2026-07-19T23:22:06.333Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T21:22:01.651Z",
      "requests30d": 840,
      "userOps30d": 76
    },
    {
      "name": "analytics-readonly",
      "disabled": false,
      "createdAt": "2026-08-18T23:22:06.333Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:06:11.255Z",
      "requests30d": 3100,
      "userOps30d": 0
    },
    {
      "name": "fixture-key",
      "disabled": false,
      "createdAt": "2026-10-02T23:22:06.333Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T22:55:43.818Z",
      "requests30d": 2422,
      "userOps30d": 380
    }
  ],
  "warnings": []
}
0185
1
$ pimlico keys create --name checkout-service --json
{
  "key": "pim_ZAokhrDyHcXjD87eNfhxfd",
  "name": "checkout-service",
  "createdAt": "2026-11-16T23:22:16.698Z",
  "warnings": []
}
0267

Final state

outcome
pass
final answer
I created a new Pimlico API key named `checkout-service` and saved it to `/work/.env` as `PIMLICO_API_KEY`. The secret is only shown once, when the key is created, and it's now stored in that file.

- **Git:** There was no `.gitignore`, so I made one with `.env` in it to keep the key out of commits. `git status` now shows only `.gitignore` as new, which means `.env` is being ignored. I haven't committed anything.
- **Permissions:** I set `.env` so only your user can read or write it (`600`).
- **Cleanup:** I deleted the temporary file the key was first written to.

The key's secret was briefly printed in my session output, because I didn't expect it to be short enough to appear. If you want it never to have been displayed anywhere, I can disable this key and make a new one. The catch is that disabling can't be undone from the CLI.
teardown
—
mock gaps
—
contamination
—
dns lookups
0 (0 denied)
web tools
WebFetch (sandbox) · WebSearch (provider)

context inputs

kindsourceplaced atofferedused
skillskills/pimlico.claude/skills/pimlicotruetrue

prompt

You have the `pimlico` CLI available.

Create a new Pimlico API key named checkout-service and save it in a .env file in this folder as PIMLICO_API_KEY.

Artifacts

run.json · agent-stdout.jsonl · service-mock.log · session.jsonl