structural-trading-gate

structural-trading-gate is a skill for Claude Code, Codex from winstonkoh87/Athena-Public. It costs 48 tokens per session (2,739 once invoked), scanned A, original, MIT.

A risk-checking process for trading, betting, and other decisions involving capital. It examines the chance of ruin, the effect of uneven outcomes, and whether a strategy can remain viable.

In plain words
What is it for?
Use it before trades or bets, when deciding position size, during drawdowns, when reviewing fees, and when analysing whether to continue a strategy.
Why use it?
It helps expose situations where chasing the best expected return could create an unacceptable risk of losing the bankroll or account.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: model in frontmatter.

Good fit Use it before trades or bets, when deciding position size, during drawdowns, when reviewing fees, and when analysing whether to continue a strategy.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/winstonkoh87/athena-public/structural-trading-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 structural-trading-gate
Clone the repo
git clone --depth 1 https://github.com/winstonkoh87/Athena-Public

Made for: Claude Code, Codex.

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 structural-trading-gate

README.md
[![agentmods](https://agentmods.dev/badge/skills/winstonkoh87/athena-public/structural-trading-gate/github.svg)](https://agentmods.dev/skills/winstonkoh87/athena-public/structural-trading-gate)
Your own site
<a href="https://agentmods.dev/skills/winstonkoh87/athena-public/structural-trading-gate"><img src="https://agentmods.dev/badge/skills/winstonkoh87/athena-public/structural-trading-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 structural-trading-gate

Your own site · 80×15
<a href="https://agentmods.dev/skills/winstonkoh87/athena-public/structural-trading-gate"><img src="https://agentmods.dev/badge/skills/winstonkoh87/athena-public/structural-trading-gate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,739 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.00048 $0.02739
Opus 5.5 $0.00019 $0.01096
Sonnet 5.5 $0.00010 $0.00548
Haiku 4.5 $0.00005 $0.00274

Measured 18d ago against content hash b318a4b5f790, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

structural-trading-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 18d 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/structural-trading-gate/SKILL.md · 186 lines

How it starts

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

Structural Trading Gate — The Zero-Emotion Variance Shield

Compiled: 2026-05-11 (retroactive synthesis of all trading sessions) Problem Class: Any capital allocation question — FX, crypto, CFDs, poker, casino. Pre-trade safety, position sizing, post-trade analytics. Axiom: "In non-ergodic systems, the strategy that maximizes EV is the one most likely to kill you. Survival > Optimization."

When to Use

Invoke whenever the user mentions:

  • Any trade setup, entry, or sizing question
  • Bankroll management (poker or trading)
  • Drawdown analysis or recovery
  • Commission/friction cost optimization
  • Post-trade review or journal analysis
  • "Should I hold over the weekend?"

Solution Architecture

Pre-Trade: 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 ⚠️      │
└─────────────────────┘     └─────────────────────┘     └─────────────────────┘

Position Sizing: One-Third Kelly GTO Anchor (DEC-046)

Full Kelly:       f* = (bp - q) / b
One-Third Kelly:  f  = f* / 3
Quarter-Kelly:    f  = f* / 4

Where:
  b = net odds (reward / risk)
  p = probability of winning
  q = 1 - p

MacLean, Thorp & Ziemba (2011) Continuous Drawdown Theorem:
  P(Drawdown >= D) = (1 - D)^(2/c - 1)
  For D = 0.50 (50% drawdown / account halving):
    Full Kelly (c = 1.00) : P(down 50%) = 50.0%  (Suicidal)
    Half-Kelly (c = 0.50) : P(down 50%) = 12.5%  (Violates Law #1: 12.5% > 5%)
    Law #1 Cap (c = 0.38) : P(down 50%) = 5.0%   (Permissible leverage ceiling)
    One-Third  (c = 0.33) : P(down 50%) = 3.1%   (GTO Sweet Spot: keeps 55.6% compounding)
    Quarter    (c = 0.25) : P(down 50%) = 0.8%   (Defensive mode)

Example (10% EV, 1:3 R:R):
  b = 3, p = 0.55, q = 0.45
  f* = (3 * 0.55 - 0.45) / 3 = 0.40 (40% — suicidal)
  f  = 0.40 / 3 = 0.133 (13.3% — One-Third Kelly campaign cap)
  Practical: Cap at 1-2% risk per trade for operational safety.

Read the full file on GitHub · 186 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. 18d ago Changed · +10 lines b318a4b5f790
  2. 3mo ago First seen · 176 lines · 48 tokens per session scan A a3d8db068d54

Subscribe to this mod's changes

structural-trading-gate is a skill published in the GitHub repository winstonkoh87/Athena-Public (656 stars, last pushed 3d ago), licensed MIT. It adds 48 tokens to every session and 2,739 once invoked, about $0.0002 per session on Opus 5.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.

Related

structural-trading-gate compared with skills from other repositories

structural-trading-gate next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
structural-trading-gatewinstonkoh87/Athena-PublicSkill6563d agoMITA48Claude Code, Codex
project-graveyardShubhamsaboo/awesome-llm-appsSkill146kyesterdayApache-2.0A127Claude Code, Codex
xlsxMODSetter/SurfSenseSkill17k4d agoApache-2.0A16Claude Code, Codex
bank-statement-parsingjohnsonhk88/AI-Bank-Statement-Document-Automation-By-LLM-And-Personal-Finanical-Analysis-PredictionSkill6383d agoApache-2.0A23Claude Code, Codex
financial-analysisjohnsonhk88/AI-Bank-Statement-Document-Automation-By-LLM-And-Personal-Finanical-Analysis-PredictionSkill6383d agoApache-2.0A20Claude Code, Codex
pii-handlingjohnsonhk88/AI-Bank-Statement-Document-Automation-By-LLM-And-Personal-Finanical-Analysis-PredictionSkill6383d agoApache-2.0A17Claude Code, Codex
rag-query-handlingjohnsonhk88/AI-Bank-Statement-Document-Automation-By-LLM-And-Personal-Finanical-Analysis-PredictionSkill6383d agoApache-2.0A19Claude Code, Codex