agentleFS
AIEngineerXAIEngineerX/chaos-trader/skills/blockchain/chaos-risk-engine/SKILL.md

chaos-risk-engine

Skill0 starsChanged 2 months agoMITView on GitHub

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.

  • Installs packages

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 10 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No setup is actionable until the cost is known.

    line 25
  2. Distinctive:

    Use when the user asks for:

    line 29
  3. Distinctive:

    stop-loss or invalidation placement.

    line 32
  4. Very specific:

    Use also whenever a trade plan reaches plan or act.

    line 42
  5. Distinctive:

    If missing, state assumptions rather than fabricating certainty:

    line 46
  6. Very specific:

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

    line 59
  7. Distinctive:

    Do not do this arithmetic by hand.

    line 89
  8. Distinctive:

    Always include slippage and liquidity notes for small caps.

    line 97
  9. Distinctive:

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

    line 110
  10. Distinctive:

    If exit is uncertain, downsize or avoid.

    line 123
  11. Distinctive:

    Every risk statement must be labeled by implementation status:

    line 140
  12. Very specific:

    Never describe live-declared policy prose as a guardrail.

    line 149
  13. Distinctive:

    Moving invalidation: If invalidation moves after entry to protect ego, the plan failed.

    line 175

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

InputRequired for
Account or sleeve sizeposition sizing
Max risk per trademax loss
Entry price/zonesizing and R:R
Invalidation/stopsizing and kill switch
TargetsR:R
Liquidity/volumeexit feasibility
Timeframestop tolerance and size
Correlated exposureportfolio 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

ClassUseDefault max exposure
Studythesis incomplete0R
Watchevidence forming0R until trigger
Planvalid setup, no trigger yetdefine 0.25R-1R plan
Acttrigger hit and risk knownuse defined R only
Hedgereduce or offset exposuresize from existing risk
Avoidedge poor or risk unbounded0R

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:

StatusMeaning
analyticalcalculated or recommended only
paper-enforcedapplied by the paper runner and covered by tests
live-declaredpresent in policy/config but not technically enforced
live-enforcedpersisted 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.