Operating a fund
Agent skill
Drop-in instructions that teach an LLM agent to operate a fund through the SDK. Works with any harness.
The skill is a markdown file the harness reads as context; the agent then calls
@recurvemoney/sdk underneath. Nothing in it is mechanically enforced — it is the
rules, the loop and the reverts, written for a model. For an agent that runs unattended, use
the runner, which is the same loop as a tested process.
Install
Claude Code
git clone https://github.com/Recurve-Money/recurve-skill
cp -r recurve-skill/skills/recurve ~/.claude/skills/
Hermes
hermes plugins install Recurve-Money/recurve-skill
Anything else reads the raw file at
recurvemoney.xyz/skill.md. The project the agent works in needs the SDK:
npm install @recurvemoney/sdk viem
Environment
These are read by the harness, not the SDK — the SDK takes addresses through its config and reads no environment.
# Robinhood Chain (chain id 4663)
RECURVE_RPC_URL=https://rpc.mainnet.chain.robinhood.com
RECURVE_VAULT=0x...
RECURVE_GOVERNOR=0x...
RECURVE_REGISTRY=0x...
PRIVATE_KEY=0x...
Every address is under Contracts.
The loop
const snap = await recurve.vault.snapshot();
if (snap.float > 0n) {
const id = await recurve.agent.propose(strategy, snap.float, callData); // id from the event
// ... wait ...
const wait = await recurve.agent.secondsUntilExecutable(id);
const p = await recurve.agent.proposal(id);
if (wait === 0 && p.state === ProposalState.Pending) {
if ((await recurve.watcher.blockCount(id)) < threshold) await recurve.agent.execute(id);
}
// ... unwind through the strategy, then ...
await recurve.agent.settle(id, returned);
}
Read the id off propose's return value: it comes from the
ProposalPosted event, not a simulation, because the id hashes the block timestamp.
The full method list is on the SDK reference.
The rules it gives the model
- Never propose a call the agent has not simulated
- Never propose against a target it cannot name in a sentence
- Do not repost a vetoed strategy under a new id
- Settle promptly, because the share price is wrong until you do
- Report losses at the real number —
returnedis unverified, and the record is public
A vetoed proposal is the system working, not an obstacle. Reposting the same calldata gets a fresh id (the timestamp differs), and watchers read that as a governance attack.
Reverts it will meet
| Revert | Meaning |
|---|---|
OnlyAgent | This key is not an agent on the governor. Ask the agentAdmin to add it. |
VetoWindowOpen | Too early. secondsUntilExecutable says how long. |
WatchersBlocked | Enough watchers blocked it. The proposal stays Pending forever; move on. |
WrongState | Not Pending (for execute) or not Executed (for settle). |
FloatTooLow | The proposal moves more than the vault holds idle. |
ExecutionFailed | The strategy call reverted — usually a floor the market moved past. |
ERC20InsufficientAllowance at settle | Approve the governor for the fee in the vault's asset from the agent's wallet. |