llm-trading-agent-security

Enforce prompt sanitization, spend limits, and simulation checks for trading agents.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Maelwalser/claude-config --skill llm-trading-agent-security
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: llm-trading-agent-security
Source: https://github.com/Maelwalser/claude-config/tree/main/skills/llm-trading-agent-security
Command: npx skills add https://github.com/Maelwalser/claude-config --skill llm-trading-agent-security

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Autonomous trading agents can convert a single prompt injection, mis-signed transaction, or exposed key into irreversible financial loss. This Skill codifies layered security patterns and operational controls to reduce the risk of unauthorized transactions, slippage, and key compromise.

Core Features & Use Cases

  • Prompt hygiene & input sanitization: Detect and reject injection patterns in external data before it reaches execution-capable prompts.
  • Spend policy enforcement: Hard single-transaction and daily spend limits with recorded accounting to stop runaway transfers.
  • Pre-send simulation & execution guards: Require simulation results and min_amount_out checks to prevent slippage and failing trades.
  • Circuit breakers & audit logging: Halt on drawdowns, consecutive losses, or invalid state and ensure every decision is auditable.
  • Wallet isolation & secret management: Use ephemeral hot wallets and secret managers; never embed primary treasury keys in agent code.
  • Use Case: Audit and harden a DeFi arbitrage bot so it cannot send funds above set limits, must simulate trades successfully, and can be stopped automatically on abnormal losses.

Quick Start

Ask the agent to run a transaction-security audit and apply prompt sanitization, hard spend limits, simulation checks, circuit breakers, and secret-managed wallet isolation before any on-chain send.

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 autonomous trading agent against prompt injection?▼

To secure an autonomous trading agent against prompt injection, apply prompt sanitization to detect and reject injection patterns in external data before it reaches execution-capable prompts. This prevents malicious inputs from triggering unauthorized transactions.

How do I prevent runaway transactions in a DeFi arbitrage bot?▼

To prevent runaway transactions in a DeFi arbitrage bot, enforce hard single-transaction and daily spend limits with recorded accounting. Implementing circuit breakers also halts the bot automatically on abnormal drawdowns or consecutive losses.

What is the best way to protect trading agent wallet keys from exposure?▼

The best way to protect trading agent wallet keys from exposure is using wallet isolation and secret managers. Never embed primary treasury keys in agent code; instead, use ephemeral hot wallets for signing operations.

How do I stop slippage and failing trades in autonomous on-chain execution?▼

To stop slippage and failing trades in autonomous on-chain execution, require pre-send simulation results and min_amount_out checks. These execution guards verify the expected outcome before the agent signs and broadcasts the transaction.

Can I use circuit breakers to halt an autonomous trading agent on drawdowns?▼

Yes, you can use circuit breakers to halt an autonomous trading agent automatically. They trigger on predefined drawdowns, consecutive losses, or invalid state conditions, ensuring every decision is auditable and preventing further financial loss.

What are the limitations of relying on spend limits for autonomous trading security?▼

Relying solely on spend limits for autonomous trading security leaves gaps in prompt hygiene and key management. Spend limits stop runaway transfers but do not prevent unauthorized access, so you must combine them with simulation checks and secret-managed wallet isolation.