skills/controller-cli/SKILL.md
Guidance for installing and operating the Cartridge Controller CLI (`controller`) to create human-approved sessions and execute Starknet transactions with JSON output, explicit network selection, scoped policies, paymaster control, and error recovery.
npx skillsauth add keep-starknet-strange/starknet-agentic controller-cliInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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...
data-ai
SNIP-36 virtual block proving on Starknet. Trigger on "virtual block", "SNIP-36", "off-chain proof", "anonymous vote", "heavy computation off-chain", "prove a transaction". Covers Cairo virtual contract, proof server, starknet.js integration, and on-chain verification.
development
Reference for integrating or maintaining applications built with keep-starknet-strange/starkzap, including StarkSDK setup, onboarding, wallet lifecycle, sponsored transactions, ERC20 flows, staking, and transaction builder usage.
testing
Create and manage Starknet wallets for AI agents. Transfer tokens, check balances, manage session keys, deploy accounts, and interact with smart contracts using native Account Abstraction.
development
Simple P2P payments on Starknet. Generate QR codes, payment links, invoices, and transfer ETH/STRK/USDC. Like Lightning, but native.