Splits

From BankrBot/skills · View interactive version

Splits is an AI agent skill from the GitHub repository BankrBot/skills. Use Splits with Bankr for onchain treasury operations: secure assets, process revenue, manage operating subaccounts, pay expenses, govern contracts, and maintain clean accounting books.

How to use this skill

Skill file

Splits

Splits is a self-custodied onchain treasury platform: multisig accounts with configurable approval thresholds, crosschain operating subaccounts, USD/EUR bank off/on-ramps, automated swap-and-sweep accounts for revenue processing, and clean accounting. Humans design the rules and restrictions in which agents can act.

Division of labor with Bankr: Bankr handles market/trading reasoning and fast small-value moves from its own wallet; Splits holds the treasury, enforces the approval policy, and executes governed payments and revenue operations. Keep day-to-day spending in Bankr and larger balances (revenue, reserves, payroll) in Splits; the agent moves funds between the two as needed.

Using Splits and Bankr together: a Bankr agent operates Splits through the CLI, and gets execution power on an account one of two ways. As a multisig signer — a dedicated Splits EOA the agent generates (separate from the Bankr wallet); every action is a proposal, and the account threshold sets whether the agent acts alone or needs human co-approval. Or as a module — the Bankr wallet itself, enabled on a bounded subaccount to execute directly with no per-action proposal (full, unilateral access; bounded subaccounts only, never the Treasury). Both setups are in references/bankr-agent-signer.md.

When to use Splits

When NOT to use Splits

Simple one-off Bankr trades, market research, or actions that only need the Bankr wallet/agent APIs. Reach for Splits when the action touches the treasury, needs an approval policy, or needs durable accounting.

Setup

A Bankr agent gets execution power on an account one of two ways — full walkthrough for both in references/bankr-agent-signer.md:

The Splits CLI is the primary programmatic path (@splits/splits-cli, also ships a built-in MCP server exposing the same surface). For an agent that calls it repeatedly, install once globally — the package is tiny but pulls in viem (~24 MB), so a one-time install avoids re-downloading that on every npx call:

npm install -g @splits/splits-cli@0.2.9   # recommended for agents — pin the version, install once
# quick one-off without installing (lower footprint; downloads deps on first run):
npx -y @splits/splits-cli@0.2.9 --help

Pin the version (don't track @latest) so the agent runs a known build — verify integrity against the registry (npm view @splits/splits-cli@0.2.9 dist.integrity) and bump deliberately on release. The only thing the CLI writes locally is ~/.splits/config.json (mode 0600): the saved API-key auth state and the agent's generated signer key — see Key & secret handling. After a global install, get the full command reference with splits --llms-full.

1. Human creates a Splits API key (browser-only; requires a Splits team; free):

https://teams.splits.org/settings/team/api-keys/. The agent should ask the user for the key or read an injected SPLITS_API_KEY. Never paste it into shell history.

2. Authenticate and verify the org/key source:

echo "$SPLITS_API_KEY" | splits auth login   # prefer stdin, not --apiKey
splits auth whoami                            # confirm org, key name, scopes, local EOA

3. Give the agent a signing key (its own dedicated Splits EOA — distinct from its Bankr wallet and from any human passkey):

splits auth create-key --register --name "Bankr Agent"   # create local EOA + register in one call
splits auth whoami                                        # localKey.signerId is now set

4a. Create a bounded agent subaccount with human + agent signers from the start:

splits members list                       # find the human USER_ID
splits members signers <USER_ID>          # discover the human's passkey IDs
splits auth signers                        # discover the agent's EOA signer id
splits accounts create --name "Bankr Agent Ops" \
  --eoaSignerIds <AGENT_SIGNER_ID> --passkeyIds <HUMAN_PASSKEY_ID> --threshold 2

Default to --threshold 2 (human-in-the-loop) everywhere the agent is a signer. On a threshold-1 account the agent's lone signature auto-submits with no human in the loop, so create or use one only when the user has explicitly stated they want it, and only for constrained sandbox / low-value accounts. (This is distinct from Splits automation accounts, which are unilateral by design — see references/swap-and-sweep.md.)

4b. Or add the agent to an existing account. This creates a proposal the human must approve on the web:

splits accounts update-signers <ACCOUNT> --addEoaSignerIds <SIGNER_ID> --memo "Add Bankr agent signer"
# hand the returned signUrl to the human, then poll:
splits transactions get <TRANSACTION_ID>   # CREATED -> EXECUTED

Note: members signers lists passkeys (human); auth signers lists the agent's registered EOA signer ids. Passkeys require a biometric second factor agents cannot provide, so agents always sign with their local EOA.

Advanced: module-based execution (direct, unilateral)

Advanced / opt-in only. This grants the Bankr wallet unilateral execution from a subaccount with no per-action approval. Do not set it up unless the user explicitly asks for it.

Beyond being a signer, an agent can be enabled as a module on a subaccount: the account enableModule(<eoa>)s the agent, after which it calls executeFromModule to run transactions directly from the subaccount — no proposal/threshold per action, with msg.sender = the subaccount (so it satisfies msg.sender-gated calls like fee-locker claims). For Bankr this reuses the Bankr wallet itself — enable its address as a module, then execute via Bankr's raw-transaction submit, no separate Splits key. Full flow in references/bankr-agent-signer.md.

A module has full, unilateral access to the subaccount — Splits has no per-action threshold or spend limit for a module (that knob does not exist; unilateral execution is the point). The blast radius is therefore the subaccount's funded balance. Before enabling, require all of:

The only human input needed is the subaccount address.

Core workflows

Brief overview below; deeper, step-by-step procedures live in references/.

Treasury inventory and monitoring

splits accounts list
splits accounts get <address>
splits accounts balances <address> --chainIds 1,8453
splits automations list
splits transactions list --account <address> --period thisMonth

Payments and expenses

Use transactions create transfer for vendor, payroll, reimbursement, grant, and operational payments. Always attach a memo and/or properties for accounting context:

splits transactions create transfer --account <ACCOUNT> --chainId 8453 \
  --recipient <ADDRESS> --token <TOKEN> --amount "1000" \
  --memo "Vendor payment INV-123" --property invoice=INV-123 --property category=vendor

The approval path depends on the account threshold. The agent can splits transactions sign <id> only once it is an approved signer and policy allows; a signature meeting threshold auto-submits unless --noSubmit. See references/treasury-workflows.md.

Revenue, swaps, sweeps, and buybacks

Splits subaccounts + automations handle revenue streams, token conversion, buybacks, tax withholding, and consolidation. Automation rules are configured in the Splits web app; via CLI the agent discovers and monitors them with automations list. For one-off swaps/buybacks not covered by a high-level command, use transactions create custom with raw EVM calls — but only after explaining the target contract, calldata, value, and risk. See references/swap-and-sweep.md.

Fee-locker claiming

Identify the fee-locker contract and claim method first, describe/simulate the call, then create a Splits custom transaction from the treasury/subaccount and forward proceeds to the multisig. Do not invent ABI or calldata — if the ABI/claim method is unknown, ask for it or fetch it from the canonical explorer/source. See references/treasury-workflows.md.

Subaccounts and approvals

Create subaccounts per purpose (revenue, buyback, payroll, vendors, grants, trading sandbox, tax reserve) with accounts create, and manage signer sets/thresholds with accounts signers and accounts update-signers. Passkeys/biometrics stay with humans; agents use their own EOA keys. See references/agent-access.md.

Accounting and cleanup

splits transactions list --account <address> --period lastMonth --direction outbound
splits transactions memo <id> --memo "Q1 payroll"
splits transactions properties set <id> --property category=payroll --property period=2026Q1

Filter with --period, --direction, --memo, --minAmount, --maxAmount, --transactionHash, --userOpHash. Do period/category math with scripts, not by hand. See references/accounting-analysis.md.

Safety

Key & secret handling

The CLI keeps all local state in ~/.splits/config.json (mode 0600) — the API-key auth state from auth login and the agent's generated signer EOA. Treat that file as a secret on disk.

References

Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.