claude-multi-agent-investing: Command for Claude Code

.claude/commands/stress-test.md

stress-test is a command for Claude Code from haiiibin/claude-multi-agent-investing. It costs 47 tokens per session (1,898 once invoked), scanned A, original, MIT.

A portfolio stress-test command that examines how investments might perform under six predefined market shocks, such as recession, inflation, or an oil-price surge.

In plain words
What is it for?
Use it to review portfolio exposure to recessions, stagflation, an AI spending slowdown, a stronger US dollar, geopolitical events, or reduced China ties.
Why use it?
It shows which holdings could lose the most in difficult scenarios, without pretending to predict an exact future result.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions CLAUDE.md.

This is haiiibin/claude-multi-agent-investing's own configuration. It tells Claude Code how to work on claude-multi-agent-investing itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-multi-agent-investing configures →

Reuse

Borrowing it

Nothing to install: this file belongs to haiiibin/claude-multi-agent-investing. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/haiiibin/claude-multi-agent-investing/main/.claude/commands/stress-test.md
Clone the repo
git clone --depth 1 https://github.com/haiiibin/claude-multi-agent-investing

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 stress-test

README.md
[![agentmods](https://agentmods.dev/badge/commands/haiiibin/claude-multi-agent-investing/stress-test/github.svg)](https://agentmods.dev/commands/haiiibin/claude-multi-agent-investing/stress-test)
Your own site
<a href="https://agentmods.dev/commands/haiiibin/claude-multi-agent-investing/stress-test"><img src="https://agentmods.dev/badge/commands/haiiibin/claude-multi-agent-investing/stress-test/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 stress-test

Your own site · 80×15
<a href="https://agentmods.dev/commands/haiiibin/claude-multi-agent-investing/stress-test"><img src="https://agentmods.dev/badge/commands/haiiibin/claude-multi-agent-investing/stress-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,898 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.00047 $0.01898
Opus 5 $0.00023 $0.00949
Sonnet 5 $0.00009 $0.00380
Haiku 4.5 $0.00005 $0.00190

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

Security

Grade A, and why

stress-test 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.

.claude/commands/stress-test.md · 121 lines

How it starts

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

/stress-test -- Portfolio Scenario Stress Test

Answers: "if regime shifts violently, where do I bleed?" Default: all 6 scenarios. Custom via $ARGUMENTS.

Scenarios (canonical shocks, historical anchors)

# Scenario Anchor Key shocks
1 Recession hard landing 2008 GFC (-56%), 2020 Mar (-34%/mo) SPY -30, QQQ -35, IWM -40, 10Y -150bp, Oil -40, Gold +10, USD +5, credit +300bp
2 Stagflation 2022 (QQQ -33, oil +40) SPY -20, QQQ -30, IWM -15, 10Y +200bp, Oil +40, Gold +25, USD +8, high-PE (>30) -40
3 AI capex pause 2000 dotcom (QQQ -83), 2022 Q4 AI infra (semi) -45, hyperscalers -25, non-AI software -15, AI utilities -50, non-tech -5
4 USD spike (tariff shock) 2014-15 (+25), 2022 DXY breakout DXY +10, USD/CAD 1.36→1.50, US multinationals -8, EEM -20, Gold -12, CAD domestic -3
5 Geopolitical shock 2022 Russia, 1973 embargo Oil +50, Natgas +60, Gold +20, VIX +150, SPY -12, Defense +15, airlines -25, energy +25
6 China decoupling 2018-19 trade war, 2025 H20 ban Semi w/ China expo -20, AAPL -15, Chinese ADRs -35, onshoring/defense +10, rare earths +25

Scenario sensitivity: high-beta -1.5× worse in #1, duration (long-growth) worst in #2, anything tagged ai hit first in #3.

Phase 1 -- Load portfolio

Read holdings.json, aggregate by ticker. For each: current price, sector, beta, mcap, tags. Foreign-rev % via get_stock_info.country or WebSearch when geographic split matters (#4, #6).

Tag sanity check: compare every tag encountered in holdings.json to the canonical vocabulary in CLAUDE.md. If any tags are off-list (e.g. AI instead of ai, or artificial-intelligence), emit a WARN line at the top of the output -- don't block, but the user should know a shock might silently skip them.

Phase 2 -- Apply shocks

Shock source priority (use worst applicable, don't multiply):

  • Direct ticker mapping (VOO ~ SPY)
  • Sector mapping (scenario "tech -35" → Technology holdings)
  • Tag mapping (scenario "AI -45" → ai tagged holdings)
  • Beta mapping (stock shock ≈ Beta × market shock)

Read the full file on GitHub · 121 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 · 121 lines · 47 tokens per session scan A eb0982cb90db

Subscribe to this mod's changes

stress-test is a command published in the GitHub repository haiiibin/claude-multi-agent-investing (2 stars, last pushed 21d ago), licensed MIT. It adds 47 tokens to every session and 1,898 once invoked, about $0.0002 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.