Show HN: Algo-Trading-Skills - 501 agent skills for trading infrastructure
Algo-Trading-Skills
======================
Comments
501 algorithmic trading skills ยท 16 engineering domains ยท 5 regulatory & exchange frameworks ยท 501 working reference implementations backed by 20,291 unit tests ยท agentskills.io standard ยท Works with Claude Code, GitHub Copilot, Codex CLI, Cursor, Gemini CLI and any tool that reads SKILL.md
Engineering Guidance, Not Financial, Legal, or Compliance Advice
Engineering Guidance, Not Financial, Legal, or Compliance Advice - Authorized & lawful use only. These skills encode production engineering practices for trading infrastructure. They do not constitute financial, legal, tax, or regulatory compliance advice, do not guarantee strategy profitability, and do not eliminate the risk of capital loss in live trading. Only deploy against paper accounts or live environments where risk limits are strictly enforced. Consult qualified legal, tax, and compliance professionals in your jurisdiction before deploying live trading systems. See SECURITY.md and CODE_OF_CONDUCT.md.
Why You Need These Skills
An AI coding agent can write a WebSocket client, a backtest loop, or an order-placement function that looks completely correct - right library calls, clean structure, plausible logic - and still fail catastrophically in production for reasons that have nothing to do with code syntax: a broker invalidates a token overnight in a way its docs don't mention, a backtest silently uses a bar's own close to predict its own direction, a risk limit lives inside the same function it's supposed to constrain, or a WebSocket callback blocks the read loop during exactly the volatility spike a strategy exists to catch. Your AI agent doesn't know these failure modes - unless you give it these skills.
What This Repository Contains
This repo contains 501 structured skills spanning 16 engineering domains, each following the agentskills.io open standard. The library maps across key financial regulatory & exchange frameworks - SEC Rule 15c3-5, Reg NMS / Reg SHO, FINRA, EU MiFID II / RTS 6 / MAR, UK FCA, ASIC, SEBI, and ISDA OTC derivative standards.
Frameworks & Standards
| Framework / Standard | Scope | What It Maps | Key Mapped Skills |
|---|---|---|---|
| US SEC / FINRA | SEC Rule 15c3-5, Reg NMS Rule 611, Reg SHO, PDT Rule 4210, Form 1099-B | Pre-trade risk controls, order protection, short sale locates, pattern day trading, tax lot reconciliation | us-reg-nms-order-protection-rule-compliance , us-reg-sho-short-sale-locate-requirements , sec-rule-15c3-5-risk-controls-us , wash-sale-rule-tracking-us |
| EU MiFID II / RTS 6 / MAR | MiFID II Article 48, RTS 6 organizational requirements, MAR market abuse surveillance | System resilience, kill switches, OTR limits, wash trade & spoofing self-detection, double volume caps | mifid-ii-algo-trading-compliance-eu , wash-trade-and-spoofing-self-detection , eu-market-abuse-regulation-mar-surveillance |
| UK FCA & Senior Managers Regime | FCA SYSC 25, MIFIDPRU, Senior Managers & Certification Regime (SM&CR) | Algorithmic trading system controls, algorithmic accountability, key person governance | uk-fca-algorithmic-trading-systems-controls , uk-senior-managers-regime-algo-accountability |
| Global Regulatory (ASIC, SEBI, MAS, IIROC) | ASIC MIR, SEBI Algo Circulars, MAS Cyber Hygiene, IIROC Electronic Trading | Regional exchange order tagging, circuit breakers, risk-gate dependencies, kill switches | asic-market-integrity-rules-automated-trading , india-sebi-algo-trading-tagging-requirements , mas-singapore-algo-trading-guidelines |
| ISDA & OTC Derivatives | ISDA Master Agreement, SPAN Margin, Options Greeks, Variance Swaps | Collateral management, cross-margining, delta hedging, synthetic TRS exposure, volatility derivatives | options-margin-span-calculation-global , total-return-swap-synthetic-exposure , variance-swap-and-volatility-derivative-pricing |
Example
Example - Each skill maps directly to regulatory mandates, broker APIs, and institutional standards:
| Skill | Primary Regulatory / Exchange Standard | Broker / Platform Touchpoints | Operational Safety Target |
|---|---|---|---|
| order-placement-idempotency | SEC Rule 15c3-5 / MiFID II RTS 6 | Fyers, Zerodha, Breeze, Upstox, Alpaca, IBKR | Zero duplicate executions on reconnection |
| kill-switch-and-drawdown-circuit-breakers | SEC Rule 15c3-5 (Pre-Trade Controls) | Universal / Broker-Agnostic | Instant capital protection on drawdown breach |
| wash-trade-and-spoofing-self-detection | EU MAR / FINRA Rule 5210 | Exchange Order Feeds | Pre-trade self-cross prevention & cancellation audit |
| us-reg-sho-short-sale-locate-requirements | US SEC Reg SHO Rule 203(b)(1) | US Equity Brokers / Prime Brokers | Mandatory pre-short locate verification & buy-in tracking |
| withdrawal-velocity-limits-and-anomaly-detection | MAS Cyber Hygiene / Custody Risk | Coinbase, Fireblocks, BitGo, HSM | Automated hot wallet freeze on velocity breach |
Getting Started
Option 1: Claude Code
- install one domain, not the whole library
- /plugin marketplace add HimanshuJ16/Algo-Trading-Skills
- /plugin install algo-trading-risk-management
- /plugin install algo-trading-broker-integration
Option 2: skills CLI
- pick the skills you want interactively
- npx skills add HimanshuJ16/Algo-Trading-Skills
Option 3: git clone, then run the gates yourself
- git clone https://github.com/HimanshuJ16/Algo-Trading-Skills.git
- cd Algo-Trading-Skills
- pip install -r requirements-dev.txt
- python tools/validate_skills.py
- python tools/run_all_tests.py
How It Works
Install one domain, not all of them. Claude Code loads the name and description of every skill in an installed plugin into the model's context at the start of every session. The marketplace therefore ships one plugin per engineering domain (algo-trading-risk-management , algo-trading-execution-algorithms , โฆ), each a few thousand tokens. An algo-trading-skills-all plugin exists for completeness, but it costs tens of thousands of tokens per session - reach for it only if you know you want that. One caveat on disk rather than context: every plugin entry points at the repository root, so installing a single domain checks out the whole tree (about 100 MB); only that domain's skills are loaded into the session.
Run one skill's suite on its own - the same command every skill quotes in its own Verification section:
python -m unittest discover -s skills/order-placement-idempotency/scripts
Supported Platforms
Works immediately with Claude Code, GitHub Copilot, OpenAI Codex CLI, Cursor, Gemini CLI, and any agentskills.io-compatible platform.
Quantitative Trading and Financial Software Engineering
The quantitative trading and financial software engineering domain requires deep practitioner knowledge across market microstructure, exchange protocols, and risk engineering. AI agents can help build and scale trading infrastructure - but only if they have structured practitioner playbooks to work from. Today's generic LLMs can write Python code and API wrappers, but they lack the operational context that separates code which works in a notebook from code that survives a live market.
Existing Trading Libraries
Existing trading libraries give you broker SDKs, indicator formulas, or naive strategy backtests. None of them give an AI agent the structured decision-making workflow a senior quant infrastructure engineer follows: when to use each technique, when not to, what prerequisites to check, how to execute step-by-step, and how to verify results in production. That is the gap this project fills.
Algo-Trading-Skills
Algo-Trading-Skills is not a collection of toy scripts. It is an AI-native knowledge base built from the ground up for the agentskills.io standard - YAML frontmatter for sub-second discovery, structured Markdown for step-by-step execution, and reference files for deep technical context. Every skill encodes real practitioner workflows, not generic LLM summaries.
Skill Libraries
Skill libraries are easy to generate and hard to trust. Everything in this table is re-checked by CI on every push and pull request, on Python 3.10, 3.12 and 3.13, so the claims stay true or the build goes red.
Statistics
| 501 working reference implementations | ~292,000 lines of Python under skills/*/scripts/ |
| 501 unit test suites ยท 20,291 tests | ~228,000 lines of tests |
Machine-Enforced Contract
tools/validate_skills.py checks the frontmatter contract, the seven required body sections, scripts/ layout, every skill cross-reference in both skills and repo docs, that every documented test command runs from the repository root, and that the plugin manifests cover every skill exactly once.
Specification, Not Our Reading of It
CI also runs skills-ref , the official agentskills.io reference validator, against every skill. It needs Python 3.11+, so that job runs on the newer interpreters while the library itself stays 3.10-compatible.
Descriptions that Say When to Trigger
Every description starts with "Use when โฆ" and fits in 280 characters - enforced, because it is the only thing an agent reads before choosing a skill, and it costs context on every session.
Generated Files Can't Drift
index.json and the plugin marketplace are generated and carry no timestamp; --check modes fail CI if either is stale.
Verification You Can Paste
Every skill quotes a runnable command in its ## Verification section, alongside the concrete assertions to check by hand.
Sourced, or Explicitly Unsourced
458 of 501 references/standards.md cite at least one primary source - the rule text, the exchange notice, the vendor spec. Where no external standard exists, the file says so and labels its numbers as configurable defaults rather than inventing an authority for them.
Stated Scope Boundaries
When NOT to Use on every skill, naming the excluded cases and handing each to the skill that owns it.
Examples that Use the Real Code
The three walkthroughs in examples/ import the actual skill helpers rather than re-implementing them, and CI runs all three.
CI Workflow
The CI workflow is .github/workflows/validate-skills.yml.
Library Coverage
The library covers 16 core engineering domains spanning domestic and global markets - crypto exchanges, forex brokers, multi-currency and multi-timezone data handling, regulatory compliance, multi-asset derivatives, execution algorithms, custody/security, cross-strategy portfolio management, market microstructure, alternative-data research, and tax/accounting.
Domain Breakdown
| Domain | Skills | Key Capabilities |
|---|---|---|
| broker-integration | 36 | Headless auth (REST + Selenium), token lifecycle via live probing, order idempotency, per-broker rate limiting, borrow cost modeling, cost budgeting |
| real-time-architecture | 31 | Producer-consumer tick pipelines, burst-safe buffering, explicit backpressure policy, WebSocket subscription reconciliation after a reconnect |
| backtesting-methodology | 31 | Lookahead bias elimination, walk-forward validation, realistic slippage/fee/latency simulation, synthetic data generation, standardized tearsheets |
| financial-ml | 38 | Leakage-free feature engineering, offline-train/online-infer deployment, triple barrier labeler, sample weighting, model staleness detection |
| risk-management | 39 | Kill switches and drawdown circuit breakers, correlation-aware exposure limits, Kupiec test VaR backtesting, tail risk hedging, risk escalation matrices |
| deployment-ops | 30 | systemd process supervision, paper-to-live promotion checklist, IaC for trading hosts, canary releases, chaos engineering, secrets vault |
| global-market-integration | 44 | Crypto exchange APIs (Binance/Coinbase/Kraken/Deribit/Bybit/OKX), FX (OANDA/MT5), CME Globex, Eurex, HKEX, SGX, ASX, JPX, CBOE, LSE, Xetra |
| regulatory-compliance-global | 38 | US SEC Rule 15c3-5, PDT, FINRA, EU MiFID II/RTS 6/MAR, UK FCA, ASIC, MAS, India SEBI, Canada IIROC, Hong Kong SFC, Japan FSA |
| multi-asset-derivatives | 28 | SPAN margin calculation, futures contract roll automation, real-time Greeks aggregation, perpetual futures funding rates, variance swaps, CDS, quanto options |
| execution-algorithms | 32 | TWAP/VWAP order slicing, POV execution, implementation shortfall minimization, iceberg detection, smart order routing (SOR), dark pool routing, auctions |
| data-management-global | 37 | Global exchange holiday calendars, DST transition handling, multi-timezone session scheduling, multi-currency P&L, ISIN/CUSIP/SEDOL cross-referencing |
| crypto-custody-security | 29 | Wallet key custody, hot-cold split, withdrawal whitelisting, multi-sig approval, HSM integration, Shamir secret sharing, MPC custody |
| portfolio-multi-strategy | 28 | Cross-strategy correlation monitoring, performance-based capital reallocation, strategy retirement criteria, risk parity allocation, meta-strategy signal arbitration |
| market-microstructure-latency | 24 | Colocation latency benchmarking, market data feed integration, order book analysis, trade reconstruction, latency profiling |
Comments
No comments yet. Start the discussion.