shadow-perception-trader

shadow-perception-trader is a skill for Claude Code, Codex from alex-jb/shadow-perception-mcp. It costs 99 tokens per session (1,173 once invoked), scanned A, original, MIT.

A pre-submit checker for trading orders represented as JSON trade tickets. It reviews position size, losses, concentration, order quantity, and certain retirement-account rules before submission.

In plain words
What is it for?
Use it to check Kelly-based position limits, stop-losses, sector and single-company exposure, unusually large quantities, and high-risk patterns in retirement accounts.
Why use it?
It helps identify oversized, unprotected, overly concentrated, mistyped, or potentially unsuitable trades before they are sent.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to check Kelly-based position limits, stop-losses, sector and single-company exposure, unusually large quantities, and high-risk patterns in retirement accounts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alex-jb/shadow-perception-mcp/shadow-perception-trader
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 alex-jb/shadow-perception-mcp --skill shadow-perception-trader
Clone the repo
git clone --depth 1 https://github.com/alex-jb/shadow-perception-mcp

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 shadow-perception-trader

README.md
[![agentmods](https://agentmods.dev/badge/skills/alex-jb/shadow-perception-mcp/shadow-perception-trader/github.svg)](https://agentmods.dev/skills/alex-jb/shadow-perception-mcp/shadow-perception-trader)
Your own site
<a href="https://agentmods.dev/skills/alex-jb/shadow-perception-mcp/shadow-perception-trader"><img src="https://agentmods.dev/badge/skills/alex-jb/shadow-perception-mcp/shadow-perception-trader/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 shadow-perception-trader

Your own site · 80×15
<a href="https://agentmods.dev/skills/alex-jb/shadow-perception-mcp/shadow-perception-trader"><img src="https://agentmods.dev/badge/skills/alex-jb/shadow-perception-mcp/shadow-perception-trader.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,173 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.
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.00099 $0.01173
Opus 5 $0.00049 $0.00587
Sonnet 5 $0.00020 $0.00235
Haiku 4.5 $0.00010 $0.00117

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

Security

Grade A, and why

shadow-perception-trader 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 8d 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.

skills/shadow-perception-trader/SKILL.md · 103 lines

How it starts

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

Shadow Perception — Trader vertical

Five-voice deterministic pre-submit council for trading tickets. Deterministic — no LLM call in the verdict path.

When to use

The user's request is any variant of:

  • "Should I submit this order?"
  • "Am I over-concentrated in TSLA?"
  • "Is this position size Kelly-safe?"
  • "Fat-finger check on this qty?"
  • "Reg BI OK for retirement account?"

Or the user pastes a JSON trade ticket and asks for pre-submit review.

What it does

  1. shadow_perception_scan(file_path) — parses a JSON ticket. Computes notional, Kelly fraction (from p_win + R:R), sector/single-name projected exposure, qty ratio vs typical.
  2. shadow_perception_council(observation) — 5-voice council:
    • Kelly — position ≤ max_kelly_cap? Negative Kelly = BLOCK.
    • Risk — stop_loss set? MKT BUY = REWORK.
    • Concentration — sector cap 40%, single-name cap 25%. Projected exposure post-trade must be within.
    • Fat-Finger — qty vs typical. 3× = REWORK, 10× = BLOCK (Knight Capital 2012).
    • Reg BI — retirement account + high-risk pattern = REWORK requiring supervisor sign-off per SEC Reg BI §240.15l-1(a)(2)(ii).
  3. shadow_perception_attest(observation, verdict) — Ed25519 signs. Attach to broker submission or audit log.

The named invariants

  1. Never emits a direction. The council receives side (BUY / SELL) as input. It decides only fund / skip / reduce, never direction. Aligned with shadow-mentor trader-pack v0.2 shadow_size_position contract.
  2. Fat-Finger BLOCK is unconditional at 10×. Knight Capital $440M loss 2012 is the historical anchor.
  3. Reg BI voice only fires on reg_bi_client_profile: "retirement". Explicitly opt-in to avoid false positives on trading accounts.
  4. Kelly voice BLOCKs on negative Kelly. No pretending an edge exists when p_win × R:R doesn't clear break-even.

Ticket JSON contract (minimal)

{
  "symbol": "TSLA",
  "side": "BUY",
  "qty": 500,
  "price": 245.50,
  "order_type": "MKT",
  "stop_price": null,
  "take_profit": null,
  "bankroll_usd": 25000,
  "typical_qty_for_ticker": 50,
  "sector": "Consumer Discretionary",
  "portfolio_sector_exposure_usd": { "Consumer Discretionary": 3400 },
  "single_name_exposure_usd": { "TSLA": 2200 },
  "kelly_p_win": 0.55,
  "kelly_avg_win_pct": 0.05,
  "kelly_avg_loss_pct": 0.025,
  "max_kelly_cap": 0.25,
  "reg_bi_client_profile": "retirement"
}

Read the full file on GitHub · 103 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. 8d ago First seen · 103 lines · 99 tokens per session scan A eb95cc1c4779

Subscribe to this mod's changes

shadow-perception-trader is a skill published in the GitHub repository alex-jb/shadow-perception-mcp (0 stars, last pushed 2mo ago), licensed MIT. It adds 99 tokens to every session and 1,173 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

ibkr

Interactive Brokers — global stocks/forex/futures via a LOCAL TWS/IB Gateway, not cloud. Covers stocks, ETFs, forex, futures; account, positions, orders, quotes, history, order placement. Use when the user wants to check or trade an Interactive Brokers account (e.g. "IBKR positions", "buy 10 AAPL on IBKR paper", "my…

Starchild-ai-agent/official-skills · 102 tokens

alpaca

Alpaca brokerage — US stocks & ETFs. Account, positions, orders, quotes, history, and order placement (paper + live). Use when the user wants to check or trade a US-stock account on Alpaca (e.g. "Alpaca buying power", "buy 1 AAPL on Alpaca paper", "my Alpaca positions"). Cloud API, runs directly in the container.

Starchild-ai-agent/official-skills · 84 tokens

personal-finance-skill

Personal finance management skill providing 75 tools across 7 extensions for bank account aggregation (Plaid), brokerage trading (Alpaca), portfolio monitoring (IBKR), tax optimization, market intelligence (Finnhub, SEC EDGAR, FRED, BLS, Alpha Vantage), social sentiment (StockTwits, X/Twitter, Quiver), and financial…

6missedcalls/personal-finance-skill · 104 tokens

tushare

A Python interface for Tushare, a financial data service that provides market and company information for stocks, funds, futures, and digital assets. It returns queried data as pandas tables.

HKUDS/Vibe-Trading · 79 tokens

credit-analysis

A guide to analysing bonds and other fixed-income investments, including issuer credit quality, interest payments, default risk, credit spreads, and convertible bonds. It also covers Chinese fixed-income markets and local-government financing bonds.

HKUDS/Vibe-Trading · 36 tokens

geopolitical-risk

Geopolitical risk analysis: quantify crisis signals, identify precursors, and build event-driven strategies for war, sanctions, and supply disruption scenarios.

HKUDS/Vibe-Trading · 34 tokens