trading-risk-gate

trading-risk-gate is a skill for Claude Code from winstonkoh87/Athena-Public. It costs 53 tokens per session (878 once invoked), scanned A, original, MIT.

A pre-trade checklist for evaluating whether a financial trade could cause unacceptable loss. It checks the chance of ruin, whether the result depends on trade order, and whether the win rate supports the risk-to-reward setup.

In plain words
What is it for?
Use it before deciding whether to take a trade. It is intended for checking ruin risk, sequence risk, win-rate requirements, and whether a risk-to-reward ratio is viable.
Why use it?
It helps identify trades that could lead to bankruptcy or that look profitable on average but are unsafe in sequence. The checks can veto a trade or warn that its statistics are weak.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: model in frontmatter.

Good fit Use it before deciding whether to take a trade. It is intended for checking ruin risk, sequence risk, win-rate requirements, and whether a risk-to-reward ratio is viable.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/winstonkoh87/athena-public/trading-risk-gate
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add winstonkoh87/Athena-Public --skill trading-risk-gate
Clone the repo
git clone --depth 1 https://github.com/winstonkoh87/Athena-Public

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for trading-risk-gate

README.md
[![agentmods](https://agentmods.dev/badge/skills/winstonkoh87/athena-public/trading-risk-gate/github.svg)](https://agentmods.dev/skills/winstonkoh87/athena-public/trading-risk-gate)
Your own site
<a href="https://agentmods.dev/skills/winstonkoh87/athena-public/trading-risk-gate"><img src="https://agentmods.dev/badge/skills/winstonkoh87/athena-public/trading-risk-gate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for trading-risk-gate

Your own site · 80×15
<a href="https://agentmods.dev/skills/winstonkoh87/athena-public/trading-risk-gate"><img src="https://agentmods.dev/badge/skills/winstonkoh87/athena-public/trading-risk-gate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 878 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.00878
Opus 5 $0.00026 $0.00439
Sonnet 5 $0.00011 $0.00176
Haiku 4.5 $0.00005 $0.00088

Measured 12d ago against content hash 3fef02ecfce0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

trading-risk-gate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

examples/skills/decision/trading-risk-gate/SKILL.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Trading Risk Gate (Pre-Trade Safety)

Absorbs: ergodicity-check, law-of-ruin, win-rate-dominance

Unified pre-trade gate. Answers: "Should I take this trade?" by running three checks in sequence.

Triggers

"is this safe", "should I risk", "ruin", "Law #1", "veto", "ergodic", "sequence risk", "wr vs rr", "win rate stability", "why am I losing with 1:3", "absorbing state", "all-in", "bankruptcy"

The Three-Gate Pipeline

GATE 1: Law of Ruin          GATE 2: Ergodicity           GATE 3: WR Dominance
┌─────────────────────┐     ┌─────────────────────┐     ┌─────────────────────┐
│ P(Ruin) > 5%?       │ ──▶ │ Non-ergodic?         │ ──▶ │ WR < Breakeven?     │
│ 5 Domains:          │     │ Absorbing barrier?   │     │ Variance Drag > EV? │
│ Bio/Legal/Fin/      │     │ P(survive N) < 80%?  │     │ RR structure viable? │
│ Social/Psych        │     │                      │     │                      │
│ VETO if YES ❌      │     │ VETO if YES ❌       │     │ WARN if YES ⚠️      │
└─────────────────────┘     └─────────────────────┘     └─────────────────────┘

Gate 1: Ruin Class Check (Law #1)

Layer Domain Event Horizon
1 Biological Death, permanent disability
2 Legal Incarceration, criminal record
3 Financial Bankruptcy, margin call
4 Social De-platforming, exile
5 Psychological Burnout Stage 4, loss of agency

VETO if P(Ruin) > 5%. No exceptions.

Gate 2: Ergodicity Audit

  • Ensemble average ≠ Time average for non-ergodic processes
  • $P(\text{Survive } n \text{ trials}) = (1-r)^n$
  • Even 5% risk/trial = 0.6% survival after 100 trials
  • VETO if P(survival over all planned trials) < 80%

Gate 3: Win Rate Dominance

  • High WR / Low RR systems structurally dominate High RR / Low WR systems
  • Variance Drag ($V^2/2$) geometrically destroys low-WR portfolios
  • Validates that the system's WR sustains the chosen RR structure

Output

RISK GATE REPORT
────────────────
Gate 1 (Ruin):      [✅ PASS / ❌ VETO — domain: ...]
Gate 2 (Ergodicity): [✅ PASS / ❌ VETO — P(survival): X%]
Gate 3 (WR/RR):     [✅ PASS / ⚠️ WARN — variance drag exceeds ...]

VERDICT: [CLEARED / VETOED]

Read the full file on GitHub · 75 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 75 lines · 53 tokens per session scan A 3fef02ecfce0

Subscribe to this mod's changes

trading-risk-gate is a skill published in the GitHub repository winstonkoh87/Athena-Public (587 stars, last pushed today), licensed MIT. It adds 53 tokens to every session and 878 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.