llm-trading-agent-security

Secure LLM trading agents with spend limits, transaction simulation, and circuit breakers.

Updated Sep 13, 2025
One-click install
npx skills add https://github.com/llmh333/employee_management_spring --skill llm-trading-agent-security-llmh333
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: llm-trading-agent-security
Source: https://github.com/llmh333/employee_management_spring/tree/main/.gemini/skills/llm-trading-agent-security
Command: npx skills add https://github.com/llmh333/employee_management_spring --skill llm-trading-agent-security-llmh333

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill reduces the risk of asset loss when an LLM-based autonomous trading agent has wallet or transaction authority and can be driven into unsafe actions.

Core Features & Use Cases

  • Prompt Injection Defense: Detects and blocks instruction-hijacking patterns that could redirect the agent toward malicious on-chain operations.
  • Spend Policy Guardrails: Enforces hard single-transaction and daily spend limits independent of model output.
  • Pre-Send Transaction Simulation: Simulates calls and validates expected outputs (including slippage and min-out) before broadcasting transactions.
  • Execution Safety Controls: Adds circuit breakers for drawdown thresholds and invalid states to halt runaway trading.
  • Wallet Key Isolation: Requires private keys from environment/secret management to avoid code and log leakage.
  • MEV and Deadline Protection: Applies slippage bounds and short deadlines to reduce unfavorable execution risk.

Quick Start

Ask an AI to audit your trading agent design by generating an end-to-end checklist that applies prompt injection filtering, hard spend limits, transaction simulation with min_amount_out validation, a circuit breaker, and isolated wallet key handling.

Frequently Asked Questions about llm-trading-agent-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I secure an LLM trading agent against prompt injection and unauthorized transactions?▼

Securing an LLM trading agent against prompt injection requires filtering instruction-hijacking patterns and enforcing independent spend limits to prevent unauthorized on-chain transactions. This approach blocks malicious redirects before broadcasting any wallet-connected operations.

What is pre-send transaction simulation for autonomous trading agents?▼

Pre-send transaction simulation for autonomous trading agents validates expected outputs, including slippage and min_amount_out checks, before broadcasting transactions. This mechanism ensures unsafe swaps or treasury transfers are halted prior to on-chain execution.

How do I set up wallet key isolation for an autonomous trading bot?▼

Wallet key isolation for autonomous trading bots requires loading private keys from environment or secret management systems rather than code. This prevents private key leakage in logs and source code during automated trading operations.

Can I enforce hard spend limits on an LLM trading agent independent of model output?▼

You can enforce hard single-transaction and daily spend limits on LLM trading agents independent of model output. These spend policy guardrails override the LLM's transaction authority to prevent runaway financial losses.

What are the best practices for MEV and slippage protection in LLM-driven trading?▼

MEV and slippage protection in LLM-driven trading applies strict slippage bounds and short execution deadlines to transaction broadcasts. Combining circuit breakers for drawdown thresholds halts unfavorable trades during invalid market states.

When should I use a circuit breaker for an autonomous crypto trading agent?▼

A circuit breaker for autonomous crypto trading agents should trigger when drawdown thresholds or invalid states are detected during execution. This halts runaway trading and prevents further financial loss from LLM failures or market anomalies.