Llm Trading Agent Security
Layered security patterns that keep an LLM trading agent with wallet authority from losing funds.
- CCM score
- 75 of 100
- skills.sh installs
- 10.8K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers prompt injection defense, hard spend limits, pre-send simulation, circuit breakers, MEV protection, and wallet key handling
- Includes Python patterns for sanitizing on-chain data, enforcing daily and per-transaction USD caps, and halting after losses
- Enforces mandatory
min_amount_outchecks, transaction deadlines, and per-strategy slippage bounds before any transaction is signed - Designed for autonomous agents that sign and send transactions, using a dedicated hot wallet rather than a primary treasury
Install
$ npx -y skills add affaan-m/ecc --skill llm-trading-agent-security -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
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
import re
INJECTION_PATTERNS = [
r'ignore (previous|all) instructions',
r'new (task|directive|instruction)',
r'system prompt',
r'send .{0,50} to 0x[0-9a-fA-F]{40}',
r'transfer .{0,50} to',
r'approve .{0,50} for',
]
def sanitize_onchain_data(text: str) -> str:
for pattern in INJECTION_PATTERNS:
if re.search(pattern, text, re.IGNORECASE):
raise ValueError(f"Potential prompt injection: {text[:100]}")
return text
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Web3 & Crypto, Security, Finance & Trading
- First seen
- Jul 14, 2026
Questions
What does the llm-trading-agent-security skill do?
It gives security patterns for autonomous trading agents that hold wallet or transaction authority. It covers prompt injection, spend limits, pre-send simulation, circuit breakers, MEV protection, and key handling.
How do I install llm-trading-agent-security?
Run npx -y skills add affaan-m/ecc --skill llm-trading-agent-security -y in your project. The skill then gives your agent guidance for reviewing limits, simulation, and key handling in trading agents.
Who should use the llm-trading-agent-security skill?
It is for developers building AI agents that sign and send transactions, auditing trading bots or on-chain execution assistants, and designing wallet key management for an agent. It also fits anyone giving an LLM access to swaps, order placement, or treasury operations.
Where does llm-trading-agent-security rank in its category?
It sits in the Web3 & Crypto category and ranks in the top 50 on that category page. Other skills in the category include solana-dev, binance-agentic-wallet, okx-dex-market, gmgn-market, and gmgn-token.
What wallet setup does the skill recommend?
It recommends a dedicated hot wallet holding only the funds needed for a session, loaded from an environment variable such as TRADING_WALLET_PRIVATE_KEY. It warns against pointing the agent at a primary treasury wallet.
More from affaan-m/ecc
All 257- Nodejs Keccak25610.8K
- Github Ops10.8K
- Customer Billing Ops10.8K
- Lead Intelligence10.8K
- Code Tour10.7K
- Finance Billing Ops10.7K
- Api Connector Builder10.7K
- Openclaw Persona Forge10.7K
- Google Workspace Ops10.7K
- Knowledge Ops10.7K
- Workspace Surface Audit10.7K
- Terminal Ops10.7K
- Gan Style Harness10.7K
- Agent Sort10.7K
- Product Capability10.7K
- Csharp Testing10.7K
- Opensource Pipeline10.7K
- Hipaa Compliance10.7K
- Connections Optimizer10.6K
- Project Flow Ops10.6K
- Research Ops10.6K
- Automation Audit Ops10.6K
- Social Graph Ranker10.6K
- Email Ops10.5K
Similar to Llm Trading Agent Security
More Web3 & CryptohyperliquidSkillstarchild-ai-agent/official-skills8.7K installsTrading, market data, and wallet analytics for Hyperliquid perps, spot, and RWA through script-delivery tools.
agent-payment-x402Skillaffaan-m/ecc10.9K installsAgent payment execution via x402 with per-task budgets, spending policies, and non-custodial wallets.
agent-governanceSkillgithub/awesome-copilot9.7K installsGovernance patterns for AI agents: policy checks, intent screening, and audit trails around tool calls.
agent-agentic-paymentsSkillruvnet/ruflo1.2K installsEd25519-signed spending mandates and multi-agent consensus for autonomous AI payment authorization workflows.
defi-amm-securitySkillaffaan-m/ecc10.5K installsSecurity checklist and hardened patterns for Solidity AMM contracts, liquidity pools, and swap flows.
three.ws AutopilotMCP servernirholas286 starsSet autopilot scopes and a daily SOL spend cap for proposing, executing, and undoing agent actions.