首页 > AI前沿 > Show HN: Algo-Trading-Skills - 501 agent skills for trading infrastructure

Show HN: Algo-Trading-Skills - 501 agent skills for trading infrastructure

Hacker News 2026-09-11 10:37 1 阅读 查看原文
Algo-Trading-Skills An open-source algorithmic trading skills library for AI agents 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 · Apache 2.0 Get Started · What's Inside · How It's Verified · Frameworks & Standards · Platforms · Contributing ⚠️ Community Project — This is an independent, community-created project. Not affiliated with Anthropic PBC or any broker, exchange, or vendor referenced in this repository. 📈 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. ⚠️ Community Project — This is an independent, community-created project. Not affiliated with Anthropic PBC or any broker, exchange, or vendor referenced in this repository. 📈 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. Give any AI agent the trading-infrastructure instincts of a senior quant engineer 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. 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. Clone it, point your agent at it, and your next trading system deployment gets expert-level quant infrastructure guidance in seconds. Every skill also states where it stops. A ## When NOT to Use section on all 501 skills names the cases the skill does not cover and hands each one to the skill that does — because an agent applying a correct playbook to the wrong problem is its own failure mode, and it is the one a keyword match is most likely to cause. Five regulatory & exchange frameworks, one skill library Each skill maps to the industry standards, exchange protocols, and regulatory mandates that fit its subject: Example — Each skill maps directly to regulatory mandates, broker APIs, and institutional standards: Quick start # 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 # structure, frontmatter, cross-references & packaging python tools/run_all_tests.py # every skill's unit test suite, isolated per subprocess 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 Works immediately with Claude Code, GitHub Copilot, OpenAI Codex CLI, Cursor, Gemini CLI, and any agentskills.io-compatible platform. Why this exists 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 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 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. What "verified" means here 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. The CI workflow is .github/workflows/validate-skills.yml. What's inside — 16 categories 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. Full searchable index: index.json. Every skill listed by domain with its trigger description: docs/ROADMAP_500.md. How AI agents use these skills The full library is roughly 3.5 million tokens of Markdown — far past any context window. Progressive disclosure is what makes it usable: an agent searches short descriptions to find the right skill, then loads only that one. index.json is a single JSON object with a skills array and a subdomains count map, so an agent can filter by domain or grep descriptions and narrow the whole library to a handful of candidates before loading anything. User prompt: "My Fyers bot's live orders keep getting placed twice after a timeout" Agent's internal process: 1. Queries index.json descriptions for all 501 skills → identifies order-placement-idempotency and token-lifecycle-live-probing as top matches. 2. Loads top match: skills/order-placement-idempotency/SKILL.md → checks When NOT to Use first — this is order placement, not a cancel-request race, so the skill applies. → follows the structured Workflow section: classify timeout as ambiguous (not failed), reconcile against broker order book before any retry. 3. Loads references/workflows.md for full sequence diagrams and scripts/order_ledger.py for working helper logic. 4. Validates results using the Verification section → runs `python -m unittest discover -s skills/order-placement-idempotency/scripts` → confirms a simulated network timeout no longer produces duplicate executions. Without these skills, the agent guesses at retry logic and doubles order risk. With them, it follows the exact playbook a senior trading engineer would use. Skill anatomy Every skill follows a consistent directory structure: skills/order-placement-idempotency/ ├── SKILL.md ← Skill definition (YAML frontmatter + Markdown body) ├── references/ │ ├── standards.md ← Broker/framework coverage + regulatory touchpoints │ └── workflows.md ← Deep technical procedure reference ├── scripts/ │ ├── order_ledger.py ← Working reference implementation │ └── test_order_ledger.py ← Its unittest suite └── assets/ └── checklist.md ← Printable sign-off checklist Each helper is a standalone module — no imports from other skills, no shared package — so you can lift one file out of the repo and into your own codebase without dragging the library along. YAML frontmatter (real example) --- name: order-placement-idempotency description: >- Use whenever a bot places, modifies, or cancels live orders and must guarantee it never double-executes an order due to retries, timeouts, or reconnects license: Apache-2.0 metadata: domain: algorithmic-trading subdomain: broker-integration tags: broker-integration, idempotency, client-order-id, order-ledger, retry-safety brokers_frameworks: Fyers API v3; Zerodha Kite Connect; Upstox API v2; IBKR API version: "2.0.0" author: algo-trading-skills-contributors --- The agentskills.io specification allows six top-level fields, so everything this repository adds lives under metadata: as string values. Two rules on description do the heavy lifting for discovery: it starts with "Use when …" (the situation an agent is in, not a description of the subject), and it fits in 280 characters, because every installed skill's description is loaded into context on every session. Both are enforced by tools/validate_skills.py, alongside the official agentskills validate. Markdown body sections ## When to Use Trigger conditions — when should an AI agent activate this skill? ## When NOT to Use Scope boundaries — each excluded case handed to the skill that owns it. ## Prerequisites Required tools, access, and environment setup. ## Workflow Step-by-step execution guide with specific decision points. ## Common Pitfalls Named, specific failure modes this skill prevents. ## Verification How to confirm the skill was executed successfully, with a runnable command. ## Related Skills Cross-links to other skills in this repo. All seven sections are required. tools/validate_skills.py enforces them in CI, along with the scripts/ layout and the runnability of every documented test command — see docs/skill-anatomy.md for the contract in prose and .github/workflows/validate-skills.yml for the pipeline. Compatible platforms & Zero-Config Auto-Discovery This repository includes native auto-discovery instructions for all major AI coding platforms: The table above lists the tools this repository ships a rule file for. Beyond those, the skills are plain SKILL.md directories in the agentskills.io format, so any agent or framework that reads that format can load them — point it at skills/ and it has everything it needs. 🏃 Runnable Examples & Cookbook To see how skills chain together in complete pipelines, explore the runnable walkthroughs in examples/: examples/01_resilient_order_execution_and_circuit_breaker.py — Order idempotency + drawdown circuit breakers + live token probing. examples/02_lookahead_free_backtest_with_slippage.py — Point-in-time signal engine + market impact slippage simulation + performance tear-sheet. examples/03_cross_strategy_risk_parity_allocation.py — Rolling strategy correlations + risk parity rebalancing + automated strategy retirement. Cross-cutting maps live in mappings/broker-api-coverage.md and mappings/regulatory-coverage.md; the system architecture the skills were extracted from is in docs/architecture.md. 🤖 LLM-Crawler Discoverability (llms.txt) This repository supports machine-discoverable documentation standards for LLMs and AI crawlers: llms.txt — Concise index of core documentation, skill categories, and developer entrypoints. llms-full.txt — Full architecture breakdown and domain mapping for large context windows. Releases & Build Verification Contributing This project grows through community contributions. Here is how to get involved: Add a new skill — Follow the template and frontmatter structure enforced by tools/validate_skills.py and submit a PR. Improve existing skills — Update workflows, refine code engines, add unit tests, or extend regulatory mappings. Report issues — Found an edge case or missing failure mode? Open an issue. Before opening a PR, run the gates locally. CI runs these plus the agentskills.io reference validator and the cookbook examples — see CONTRIBUTING.md for the full pipeline: python tools/validate_skills.py python tools/run_all_tests.py python tools/build_index.py --check # regenerate and commit if this fails python tools/build_marketplace.py --check python -m unittest discover -s tests The quality bar is in CONTRIBUTING.md, and it is a high one: would following this skill have prevented a real production bug, and is its Verification section actually checkable? A regulatory or broker-behaviour claim must be verifiable against an authoritative source — a missing claim is better than a wrong or fabricated one. Every PR is reviewed for technical accuracy and agentskills.io standard compliance. Citation If you use this project in research or publications: @software{algo_trading_skills, author = {Jangir, Himanshu}, title = {Algo-Trading-Skills}, year = {2026}, url = {https://github.com/HimanshuJ16/Algo-Trading-Skills}, license = {Apache-2.0}, note = {501 structured algorithmic trading skills for AI agents, mapped to SEC Rule 15c3-5, Reg NMS, MiFID II, FCA, SEBI, and ISDA standards} } License This project is licensed under the Apache License 2.0. You are free to use, modify, and distribute these skills in both personal and commercial projects. If this project helps your quantitative trading work, consider giving it a ⭐ ⭐ Star · 🍴 Fork · 💬 Discuss · 📝 Contribute Community project by @HimanshuJ16. Not affiliated with Anthropic PBC or any broker referenced in this repository.