/starknet-agentic-skills:controller-clifrom starknet-agentic-skills
Guides installation and operation of Cartridge Controller CLI to create human-approved sessions and execute Starknet transactions with JSON output, explicit network selection, scoped policies, and paymaster control.
Ships in starknet-agentic-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
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...
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub keep-starknet-strange/starknet-agentic --plugin starknet-agentic-skills18 skills in this plugin
/account-abstractionStarknet account abstraction correctness and security guidance for validate/execute paths, nonces, signatures, and session policies./cairo-auditorSecurity audit of Cairo/Starknet code. Trigger on "audit", "check this contract", "review for security". Modes - default (full repo), deep (+ adversarial reasoning), or specific filenames./cairo-contract-authoringCairo smart-contract authoring on Starknet. Trigger on "write a contract", "create a contract", "implement this in Cairo", "add storage/events/interface", "compose components". Guides structure, security patterns, and component wiring./cairo-deployDeployment guidance for Cairo contracts on Starknet covering sncast commands, account setup, declare/deploy workflow, network configuration, and contract verification./cairo-optimizationImproves Cairo performance after correctness is established. Trigger on "optimize", "gas usage", "reduce steps", "profile", "BoundedInt", "storage packing", "benchmark". Guides profiling, arithmetic optimization, and bounded-int hardening./cairo-testingCairo smart-contract testing with snforge. Trigger on "write tests", "add unit tests", "fuzz test", "integration test", "test this contract", "regression test". Guides test strategy, cheatcode usage, and coverage.Other plugins' skills for the same job