pre-trade-check

pre-trade-check is a skill for Claude Code from haiyunsky/hpsilab-quant-finance-mcp. It costs 65 tokens per session (508 once invoked), scanned A, original, MIT.

A pre-purchase risk check for a US stock or ETF. It examines a proposed holding or addition and reports the connector's checks, risk range, comparison with SPY, and available portfolio exposure information.

In plain words
What is it for?
Use it before buying or adding to a US stock or ETF, when checking whether a position is too large, or when asking how a trade could change portfolio risk.
Why use it?
It helps expose concentration, volatility, and other risk considerations before a purchase instead of treating a buy decision as a simple yes-or-no question.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the hpsilab plugin — 3 skills shipped together

Good fit Use it before buying or adding to a US stock or ETF, when checking whether a position is too large, or when asking how a trade could change portfolio risk.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/haiyunsky/hpsilab-quant-finance-mcp/pre-trade-check
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 haiyunsky/hpsilab-quant-finance-mcp --skill pre-trade-check
Clone the repo
git clone --depth 1 https://github.com/haiyunsky/hpsilab-quant-finance-mcp

Made for: Claude Code.

Or install hpsilab, the plugin that ships this one along with the rest of its 3 skills.

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 pre-trade-check

README.md
[![agentmods](https://agentmods.dev/badge/skills/haiyunsky/hpsilab-quant-finance-mcp/pre-trade-check/github.svg)](https://agentmods.dev/skills/haiyunsky/hpsilab-quant-finance-mcp/pre-trade-check)
Your own site
<a href="https://agentmods.dev/skills/haiyunsky/hpsilab-quant-finance-mcp/pre-trade-check"><img src="https://agentmods.dev/badge/skills/haiyunsky/hpsilab-quant-finance-mcp/pre-trade-check/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 pre-trade-check

Your own site · 80×15
<a href="https://agentmods.dev/skills/haiyunsky/hpsilab-quant-finance-mcp/pre-trade-check"><img src="https://agentmods.dev/badge/skills/haiyunsky/hpsilab-quant-finance-mcp/pre-trade-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 508 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.00065 $0.00508
Opus 5.5 $0.00026 $0.00203
Sonnet 5.5 $0.00013 $0.00102
Haiku 4.5 $0.00006 $0.00051

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

Security

Grade A, and why

pre-trade-check 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 2d 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.

plugin/skills/pre-trade-check/SKILL.md · 21 lines

What it actually says

Pre-trade risk check

Use the HPSILab connector's tools. If they are not available, tell the user to connect HPSILab (https://hpsilab.com/connect) and stop; never invent figures.

  1. Pin down the trade. Get the ticker (convert a company name yourself, e.g. "Nvidia" is NVDA; ask if it is ambiguous) and the intended size as a share of the portfolio. If the user gives no size, say you will check the default and continue.
  2. Run the check. Call get_pretrade_risk_scan with the ticker. It is a paid-plan tool and spends the user's Credits, so if the user only asked a general question, confirm before calling it. If it is refused for the plan or for Credits, pass on the reason and the link the tool returned, and stop.
  3. Report what came back, in this order:
    • the overall result and each check marked pass, warn or fail, quoting the rule the tool gives for every warn or fail;
    • the stock's risk range and how it compares with SPY, stating the horizon in trading days that the response gives;
    • sector exposure and correlation with the user's holdings (or watchlist), if present;
    • the data date.
  4. Add options context only if it helps the decision, for example a warn on volatility: call get_option_pressure for the nearest expiry's expected move and walls, or get_iv_radar for how expensive options are. Keep each number with its own horizon; never carry a figure from one tool to another's horizon.
  5. Close with the risk picture, not a recommendation. Say which checks would need to change for the trade to pass (for example a smaller size). Do not tell the user to buy or sell, and do not present any range as a forecast or a guarantee.

The check is saved to the user's history on hpsilab.com, where they can reopen it under the watchlist. Never ask for, print or store an API key.

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. 2d ago First seen · 21 lines · 65 tokens per session scan A 737a5aef62da

Subscribe to this mod's changes

pre-trade-check is a skill published in the GitHub repository haiyunsky/hpsilab-quant-finance-mcp (1 stars, last pushed 2d ago), licensed MIT. It adds 65 tokens to every session and 508 once invoked, about $0.0003 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-10-25.

Related

Other skills, from other repositories

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

social-media-intelligence

Social media intelligence: financial signal extraction from Twitter/X, Telegram, Discord, and Reddit for sentiment-driven trading strategies.

HKUDS/Vibe-Trading · 28 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

vibe-trading

Professional finance research toolkit — backtesting (11 engines + benchmark comparison panel), factor analysis, Alpha Zoo (478 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract →…

HKUDS/Vibe-Trading · 176 tokens

etf-analysis

A framework for comparing exchange-traded funds (ETFs), which are funds bought and sold on a stock exchange and usually track an index, industry, asset, or strategy. It covers fees, how closely an ETF follows its target, trading activity, and portfolio use.

HKUDS/Vibe-Trading · 39 tokens