Guides installation and operation of Cartridge Controller CLI for human-approved Starknet sessions and transactions with JSON output, explicit network selection, scoped policies, paymaster control, and error recovery.
npx claudepluginhub keep-starknet-strange/starknet-agentic --plugin starknet-agentic-skillsThis skill is limited to using the following tools:
Use this skill when you need to run the Cartridge Controller CLI (`controller-cli`) to create a scoped session (human-approved) and then execute Starknet transactions via that session.
Build Starknet dApps with starknet.js v9 SDK: contract interactions, account management, transactions, fee estimation, wallet and paymaster integration.
Provides expertise in ERC-4337 account abstraction: smart contract wallets, paymasters, bundlers, user operations, social recovery, session keys, gas sponsorship, wallet SDKs.
Executes Alchemy CLI (@alchemy/cli) for live blockchain queries, transaction/NFT/token lookups, simulation, tracing, Solana RPC/DAS, webhooks, and app admin. For agent runtime tasks with local install.
Share bugs, ideas, or general feedback.
Use this skill when you need to run the Cartridge Controller CLI (controller-cli) to create a scoped session (human-approved) and then execute Starknet transactions via that session.
controller or controller_safe.py for human-approved Starknet transactions.Related modules: skills catalog.
--json and treat outputs as JSON.--chain-id SN_MAIN|SN_SEPOLIA, or--rpc-url <explicit url>.controller register requires human browser authorization. Do not automate/bypass it.https://voyager.online/tx/0x...https://sepolia.voyager.online/tx/0x...curl -fsSL https://raw.githubusercontent.com/cartridge-gg/controller-cli/main/install.sh | bash
export PATH="$PATH:$HOME/.local/bin"
controller --version
This skill includes a small wrapper that enforces the rules above and normalizes output:
python3 scripts/controller_safe.py status
python3 scripts/controller_safe.py register --preset loot-survivor --chain-id SN_MAIN
python3 scripts/controller_safe.py execute 0xCONTRACT entrypoint 0xCALLDATA --rpc-url https://api.cartridge.gg/x/starknet/sepolia
Behavior:
--json if missing.call|execute|register|transaction without --chain-id or --rpc-url..status == "error", prints error_code, message, recovery_hint and exits non-zero.controller generate --json
The private key is stored locally (typically ~/.config/controller-cli/).
controller status --json
Common states:
no_session (no keypair)keypair_only (needs registration)active (registered and not expired)Requirement: a human must approve in a browser.
Option A (preferred): preset policies:
controller register --preset loot-survivor --chain-id SN_MAIN --json
Option B: least-privilege policy file:
controller register --file policy.json --rpc-url https://api.cartridge.gg/x/starknet/sepolia --json
Authorization output includes short_url and/or authorization_url:
short_url if present; otherwise display authorization_url.Single call (positional args: contract, entrypoint, calldata):
controller execute 0xCONTRACT transfer 0xRECIPIENT,0xAMOUNT_LOW,0xAMOUNT_HIGH \
--rpc-url https://api.cartridge.gg/x/starknet/sepolia \
--json
Multiple calls from file:
controller execute --file calls.json --rpc-url https://api.cartridge.gg/x/starknet/sepolia --json
Optional confirmation wait:
controller execute --file calls.json --rpc-url https://api.cartridge.gg/x/starknet/sepolia --wait --timeout 300 --json
controller call 0xCONTRACT balance_of 0xADDRESS --chain-id SN_SEPOLIA --json
controller transaction 0xTX_HASH --chain-id SN_SEPOLIA --wait --timeout 300 --json
controller lookup --usernames alice,bob --json
controller lookup --addresses 0x123...,0x456... --json
Always be explicit about network.
Supported networks:
| Chain ID | RPC URL |
|---|---|
SN_MAIN | https://api.cartridge.gg/x/starknet/mainnet |
SN_SEPOLIA | https://api.cartridge.gg/x/starknet/sepolia |
Priority order:
--rpc-url flagIf network is ambiguous:
controller status --jsonchain_id, or ask the userDefault behavior uses the paymaster (free execution). If the paymaster is unavailable, the transaction fails (no silent fallback).
To self-pay with user funds:
controller execute ... --no-paymaster --json
Many ERC20-style amounts are u256 split into (low, high) u128 limbs.
For values that fit in u128 (most cases): set high = 0x0.
Example calldata:
0xRECIPIENT,0x64,0x0
Errors are JSON:
{
"status": "error",
"error_code": "ErrorType",
"message": "...",
"recovery_hint": "..."
}
Always branch on error_code and follow recovery_hint.
Common recoveries:
NoSession: run controller generate --jsonSessionExpired: re-run controller register ... --jsonManualExecutionRequired: policy does not authorize the call; tighten/adjust policy and re-registerCallbackTimeout: user did not approve quickly enough; re-run register and retryAddresses must be 0x-prefixed hex.
python3 scripts/validate_hex_address.py 0xabc...