Agent skill · security · affaan-m

llm-trading-agent-security

Security patterns for autonomous trading agents with wallet or transaction authority. Covers prompt injection, spend limits, pre-send simulation, circuit breakers, MEV protection, and key handling. Use when an autonomous agent holds wallet or transaction authority and its limits, simulation, or key handling need review.

Why this skill is useful

Adds specific security patterns and executable scripts for protecting trading agents against financial attacks, which are not commonly found in public documentation.

What it needs

About 2k tokens when loaded. Last updated 2026-08-06. 238,342 stars on the source repository.

What this skill does

LLM Trading Agent Security Autonomous trading agents have a harsher threat model than normal LLM apps: an injection or bad tool path can turn directly into asset loss. When to Use Building an AI agent that signs and sends transactions Auditing a trading bot or on-chain execution assistant Designing wallet key management for an agent Giving an LLM access to order placement, swaps, or treasury operations How It Works Layer the defenses. No single check is enough. Treat prompt hygiene, spend policy, simulation, execution limits, and wallet isolation as independent controls. Examples Treat prompt injection as a financial attack Do not blindly inject token names, pair labels, webhooks, or social feeds into an execution-capable prompt. Hard spend limits Simulate before sending Circuit breaker Wallet isolation Use a dedicated hot wallet with only the required session funds. Never point the agent at a primary treasury wallet. MEV and deadline protection Pre-Deploy Checklist External data is sanitized before entering the LLM context Spend limits are enforced independently from model output Transactions are simulated before send minamountout is mandatory Circuit breakers halt on drawdown or invalid state Keys come from env or a secret manager, never code or logs Private mempool or protected routing is used when appropriate Slippage and deadlines are set per strategy All agent decisions are audit-logged, not just successful sends

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills affaan-m/llm-trading-agent-security--93b803

View the source on GitHub

Browse the @skills marketplace