Trading Strategies as Agent Skills
Why I stopped writing trading bots and started writing documents an agent executes.
A traditional trading bot is code: a loop reads prices, checks conditions, fires orders. I've written plenty, and they all share the same flaw — the intent of the strategy ends up buried in the machinery that runs it. Tuning means editing control flow. Every variation forks the same plumbing. This year I turned it inside out. Each strategy is now a Markdown document — an agent skill — and a general agent executes it against a fixed set of tools and guardrails.
What a strategy looks like
Take Firecracker. It scans every USD pair on Gemini for candle patterns, uses RSI to set both the entry and the exit, caps exposure at $20 per coin across up to three legs, and logs every candidate whether or not it fired. The document is the strategy and the spec at the same time, so there's no separate code that can drift away from what I think the rules are.
# Firecracker
Whole-market RSI/candle scalp. Ignores the volume gate entirely.
- Size: $5 per leg, max 3 legs, $20 cap per altcoin
- Entry: RSI-scaled limit below the reversal candle
- Exit: RSI sets the take-profit target
- Log EVERY candidate as a paper trade, staged or not
- Confirm before placing real ordersIt reads like a runbook because it is one. I can review it in a minute, and the agent executes it without me translating it into a state machine first. The tools it's allowed to call — place order, cancel order, read candles — are the same across every strategy, so the document only ever has to describe judgment, never mechanics.
Why this beats a bot
- One artifact. The strategy and its documentation are the same file, so they can't disagree. Code eventually grows a comment that lies. This can't.
- Composition. A strategy can say run the candle scan first, then act only on a confirmed reversal, by referencing another skill. I build strategies out of strategies instead of copy-pasting loops.
- Evidence. Every candidate gets logged with its features and its outcome, including the ones I skipped. Tuning stops being an argument and becomes a dataset.
That last one is what makes the system improvable at all. I keep a ledger of scored candidates, one row per setup — the pattern, the RSI regime, the size, and what happened next.
{ "symbol": "SOLUSD", "pattern": "piercing_line", "rsi": 41,
"sized": true, "entry": 138.20, "exit_target": 142.40,
"result": "tp1", "pnl_pct": 3.0 }When I retuned Sniper I ran a walk-forward pass over nearly 19,000 of those rows. It turned up an RSI band the original backtest had inverted, and a volume gate that had been rejecting good entries the whole time. You don't find that by rereading code. You find it by scoring everything the system ever considered, including the trades it declined to take.
The guardrails
Handing an agent your exchange keys clarifies your priorities. The rules that show up in every skill are the boring ones. Confirm before committing real capital. Derive an idempotent client id for every order so a rerun can't duplicate it. Keep a circuit breaker that halts live trading after a losing streak. The strategy is where the edge might be. The guardrails are why I'm willing to find out.
Half the edge I thought I'd found was just me finally being forced to say what I meant.
This isn't really about trading
Strip the finance out and it generalizes. Any recurring process with clear rules and real consequences can be a document an agent executes, versioned in git, improved by reading its own logs. Trading just happens to be a blunt teacher, because the feedback arrives in minutes and it's denominated in dollars. Specifically, mine.
← Back to all posts