Index of every page on this site: llms.txt
All skills
aiengineerx avatar

/chaos-risk-engine

@3394bf1
Run it yourself

Use when the agent must calculate or critique crypto trade risk: position size, max loss, stop distance, R:R, scaling, liquidity, drawdown, correlation, or kill switches. Converts conviction into constrained exposure before any action label.

  • 1 file
  • 6 KB
  • MIT
  • Updated 2 weeks ago
  • GitHub
Use this Skill: https://skilld.dev/gh/aiengineerx/chaos-trader/chaos-risk-engine

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈65 tokens for metadata: the name and description. ≈1.4k when used: this file.

Description uses 3.3% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈261 characters, or 3.3%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Chaos Risk Engine

Risk is the first language. This skill turns a trade idea into bounded exposure by defining max loss, invalidation, sizing, liquidity constraints, and kill switches before upside is considered.

Prerequisites

  • The package is installed: pip install chaos-trader (or it came with the Hermes profile).
  • A home exists: chaos onboard was run once (chaos onboard --yes for the defaults).
  • CHAOS_HOME points at that home, or you are inside the Hermes profile, which sets it. Check with chaos --version and chaos help.

Overview

No setup is actionable until the cost is known.

When to Use

Use when the user asks for:

  • position sizing;
  • stop-loss or invalidation placement;
  • R:R evaluation;
  • scale-in / scale-out logic;
  • max loss or portfolio risk;
  • liquidity/exit risk;
  • drawdown control;
  • trade-plan critique;
  • paper-trade rules;
  • kill switch design.

Use also whenever a trade plan reaches plan or act.

Required Inputs

If missing, state assumptions rather than fabricating certainty:

Input Required for
Account or sleeve size position sizing
Max risk per trade max loss
Entry price/zone sizing and R:R
Invalidation/stop sizing and kill switch
Targets R:R
Liquidity/volume exit feasibility
Timeframe stop tolerance and size
Correlated exposure portfolio risk

If account size is unknown, express size as R units or percentage risk, not dollars.

Sizing Formula

Base formula:

position_size = max_loss / abs(entry - invalidation)

For spot tokens:

token_qty = max_loss_usd / stop_distance_usd
notional = token_qty * entry_price

For percent distance:

notional = max_loss_usd / stop_distance_pct

For no account size:

1R = chosen max loss unit
notional = 1R / stop_distance_pct

Do not do this arithmetic by hand. Run it:

chaos size --max-loss 25 --stop-pct 20 --liquidity 80000 --entry 0.0012

--max-loss is the risk unit in USD and --stop-pct the distance from entry to invalidation in percent. --liquidity caps the size at 50 basis points of the pool, the paper loop's default (--liquidity-bps changes it); --entry adds the token quantity; --json prints the envelope. The command is arithmetic only: it reads no market and includes no fees or slippage, so its control status is analytical.

Always include slippage and liquidity notes for small caps.

Risk Classes

Class Use Default max exposure
Study thesis incomplete 0R
Watch evidence forming 0R until trigger
Plan valid setup, no trigger yet define 0.25R-1R plan
Act trigger hit and risk known use defined R only
Hedge reduce or offset exposure size from existing risk
Avoid edge poor or risk unbounded 0R

Never recommend full sizing for illiquid launches, fresh wallets, or late-consensus social moves.

Liquidity and Exit Checks

Before action, answer:

  • What is realistic entry slippage?
  • What is realistic exit slippage under stress?
  • Is liquidity concentrated or removable?
  • Are early holders/dev wallets able to dump into the trade?
  • Is the target notional small enough versus volume/liquidity?
  • Can the thesis be exited before social consensus unwinds?

If exit is uncertain, downsize or avoid.

Kill Switches

A kill switch is not a vibe. It is an exact condition.

Examples:

  • price closes below invalidation level on the chosen timeframe;
  • dev/early wallet sends material supply to exchange/pool;
  • liquidity drops below required exit threshold;
  • funding/OI flips against thesis while spot fails to confirm;
  • catalyst window passes with no flow;
  • source claim is contradicted by onchain data.

Control Status

Every risk statement must be labeled by implementation status:

Status Meaning
analytical calculated or recommended only
paper-enforced applied by the paper runner and covered by tests
live-declared present in policy/config but not technically enforced
live-enforced persisted and enforced in code by a live executor with tests; chaos-trader has no executor, so nothing in it is live-enforced

Never describe live-declared policy prose as a guardrail. For live execution, verify code paths for daily loss, trade count, open positions, cooldown, slippage, fees, balance changes, and kill switches before calling them controls.

Output Contract

## Risk
| Item | Value / Rule |
|---|---|
| Risk unit | |
| Entry assumption | |
| Invalidation | |
| Stop distance | |
| Max loss | |
| Position size | |
| Target R:R | |
| Liquidity cap | |
| Scale rule | |
| Kill switch | |

## Risk Verdict
0R / watch / reduced size / normal size / hedge / avoid.

Common Pitfalls

  1. Conviction sizing. Size follows stop distance, liquidity, confidence, and portfolio context, not excitement.
  2. Moving invalidation. If invalidation moves after entry to protect ego, the plan failed.
  3. Ignoring slippage. Thin tokens make theoretical R:R fake.
  4. Correlation blindness. SOL beta, memecoin beta, and narrative clusters can make several trades one trade.
  5. No timeframe. A scalp stop and swing invalidation are different creatures.
  6. Undefined max loss. Without max loss, there is no plan.

Verification Checklist

  • Max loss is explicit or represented as R.
  • Entry and invalidation are stated.
  • Position sizing formula is shown when sizing is requested.
  • Liquidity and slippage are considered.
  • Correlated exposure is noted when relevant.
  • Kill switch is exact.
  • Risk verdict constrains the action label.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 3394bf1. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 2 weeks ago
version
1.0.0
author
chaos-trader contributors
Other metadata
metadata
{
  "hermes": {
    "tags": [
      "chaos",
      "crypto",
      "risk",
      "sizing",
      "trading"
    ],
    "related_skills": [
      "chaos-crypto-trader",
      "chaos-alpha-decoder"
    ]
  }
}

README badge

README badge for aiengineerx/chaos-trader/chaos-risk-engine