Sandbox
@alpacahq/alpaca-skills

Alpaca Trading and Broker SKILL.md files

This repo packages Alpaca-specific agent skills as drop-in `SKILL.md` files. The skills guide agents through trading and broker tasks with shared instructions, guardrails, and reporting standards so results are more consistent across runs.

146 stars16 forksPythonUpdated 9d ago
Who it's for

Builders who want their agent to follow Alpaca-specific steps for trading, brokerage, and market-data tasks.

What it delivers

You can ask an agent to handle Alpaca workflows with less re-explaining and more consistent output.

What it does

Trading API skills

Skills for backtesting, paper trading, paper trading via CLI, and paper trading through MCP.

Broker API skills

Skills for integration, account onboarding, funding and transfers, journals, orders, market data, SSE events, reconciliation, rate limits, and money precision.

Skill packaging

Each skill is a `SKILL.md` file that can be copied into supported agent skill folders or installed with the Skills CLI.

Validation script

`scripts/validate_skills.py` checks skill files and helps keep the collection consistent.

Starter template

`templates/skill/` provides a base structure for new skills.

How to get it

  1. 1Use the Skills CLI to install from this GitHub repository
    # Interactive install
    npx skills add alpacahq/alpaca-skills
    
    # Preview available skills
    npx skills add alpacahq/alpaca-skills --list
    
    # Install one specific skill
    npx skills add alpacahq/alpaca-skills --skill alpaca-trading-backtest
  2. 2Example (Cursor project skill)
    mkdir -p .cursor/skills
    cp -r path/to/alpaca-skills/skills/trading-api/backtest .cursor/skills/alpaca-trading-backtest

README

Alpaca Skills

Open agent skills for Alpaca's Trading API and Broker API. Each skill is a SKILL.md file with step-by-step instructions your AI coding assistant follows when you ask it to complete a task, such as running a historical backtest, onboarding Broker API accounts, moving money, placing orders, or consuming real-time events.

Skills provide shared instructions, guardrails, and reporting standards so agents produce more consistent results across runs.

Prerequisites

  • Alpaca CLI — install via Homebrew or Go:

    brew install alpacahq/tap/cli
    # or
    go install github.com/alpacahq/cli/cmd/alpaca@latest
    
  • Alpaca API credentials — paper, sandbox, or live keys as appropriate for the skill. Run alpaca profile login for CLI-backed workflows, or set ALPACA_API_KEY and ALPACA_SECRET_KEY when using API examples.

Install

Recommended: Skills CLI

Use the Skills CLI to install from this GitHub repository:

# Interactive install
npx skills add alpacahq/alpaca-skills

# Preview available skills
npx skills add alpacahq/alpaca-skills --list

# Install one specific skill
npx skills add alpacahq/alpaca-skills --skill alpaca-trading-backtest

Swap in any skill name from the table below.

Manual install

For agents that do not support the Skills CLI, point your agent at a skill directory, or copy/symlink it into your agent's skills folder.

AgentTypical path
CursorCopy or symlink a skill directory into .cursor/skills/ (project) or your user skills directory
Claude CodeCopy into ~/.claude/skills/
OtherReference the SKILL.md path directly in your agent prompt

Example (Cursor project skill):

mkdir -p .cursor/skills
cp -r path/to/alpaca-skills/skills/trading-api/backtest .cursor/skills/alpaca-trading-backtest

Available skills

NamePathTitleProduct
alpaca-trading-backtestskills/trading-api/backtest/Trading API BacktestingTrading API
alpaca-trading-paper-tradingskills/trading-api/paper-trading/Paper TradingTrading API
alpaca-trading-paper-trading-cliskills/trading-api/paper-trading-cli/Paper Trading (CLI)Trading API
alpaca-trading-paper-trading-mcpskills/trading-api/paper-trading-mcp/Paper Trading (MCP Server)Trading API
alpaca-broker-integrationskills/broker-api/integration/Broker API IntegrationBroker API
alpaca-broker-account-onboardingskills/broker-api/account-onboarding/Account Onboarding & KYCBroker API
alpaca-broker-funding-transfersskills/broker-api/funding-transfers/Funding & TransfersBroker API
alpaca-broker-journalsskills/broker-api/journals/JournalsBroker API
alpaca-broker-trading-ordersskills/broker-api/trading-orders/Trading on Behalf of AccountsBroker API
alpaca-broker-market-dataskills/broker-api/market-data/Market DataBroker API
alpaca-broker-sse-eventsskills/broker-api/sse-events/Broker SSE EventsBroker API
alpaca-broker-reconciliation-idempotencyskills/broker-api/reconciliation-idempotency/Reconciliation & IdempotencyBroker API
alpaca-broker-rate-limits-resilienceskills/broker-api/rate-limits-resilience/Rate Limits & ResilienceBroker API
alpaca-broker-money-precisionskills/broker-api/money-precision/Money & Numeric PrecisionBroker API

Product namespacing uses the folder path (skills/trading-api/, skills/broker-api/) and the skill name field: alpaca-<product-scope>-<skill-name> (e.g. alpaca-trading-backtest, alpaca-broker-integration). Use trading or broker as the product scope — not api.

Related resources

Contributing

See CONTRIBUTING.md. Agent conventions for skill authors are in AGENTS.md.

License

Licensed under the Apache License 2.0. See LICENSE.

Disclosure

Insights generated by Alpaca Skill Libraries and connected AI agents are for educational and informational purposes only and should not be taken as investment advice. Alpaca does not recommend any specific securities or investment strategies. Please conduct your own due diligence before making any decisions. All firms mentioned operate independently and are not liable for one another.

Options trading is not suitable for all investors due to its inherent high risk, which can potentially result in significant losses. Please read Characteristics and Risks of Standardized Options (Options Disclosure Document) before investing in options.

Alpaca does not prepare, edit, endorse, or approve Third Party Content. Alpaca does not guarantee the accuracy, timeliness, completeness or usefulness of Third Party Content, and is not responsible or liable for any content, advertising, products, or other materials on or available from third party sites.

All investments involve risk, and the past performance of a security, or financial product does not guarantee future results or returns. There is no guarantee that any investment strategy will achieve its objectives. Please note that diversification does not ensure a profit, or protect against loss. There is always the potential of losing money when you invest in securities, or other financial products. Investors should consider their investment objectives and risks carefully before investing.

The algorithm's calculations are based on historical and real-time market data but may not account for all market factors, including sudden price moves, liquidity constraints, or execution delays. Model assumptions, such as volatility estimates and dividend treatments, can impact performance and accuracy. Trades generated by the algorithm are subject to brokerage execution processes, market liquidity, order priority, and timing delays. These factors may cause deviations from expected trade execution prices or times. Users are responsible for monitoring algorithmic activity and understanding the risks involved. Alpaca is not liable for any losses incurred through the use of this system.

Past hypothetical backtest results do not guarantee future returns, and actual results may vary from the analysis.

The Paper Trading API is offered by AlpacaDB, Inc. and does not require real money or permit a user to transact in real securities in the market. Providing use of the Paper Trading API is not an offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, given or in any manner endorsed by AlpacaDB, Inc. or any AlpacaDB, Inc. affiliate and the information made available through the Paper Trading API is not an offer or solicitation of any kind in any jurisdiction where AlpacaDB, Inc. or any AlpacaDB, Inc. affiliate (collectively, "Alpaca") is not authorized to do business.

Securities brokerage services are provided by Alpaca Securities LLC ("Alpaca Securities"), member FINRA/SIPC, a wholly-owned subsidiary of AlpacaDB, Inc. Technology and services are offered by AlpacaDB, Inc.

Cryptocurrency services are provided by Alpaca Crypto LLC ("Alpaca Crypto"), a FinCEN registered money services business (NMLS # 2160858), and a wholly-owned subsidiary of AlpacaDB, Inc. Alpaca Crypto is not a member of SIPC or FINRA. Cryptocurrencies are not stocks and your cryptocurrency investments are not protected by either FDIC or SIPC. Cryptocurrency assets are highly volatile and speculative, involving substantial risk of loss, and are not insured by the FDIC or any government agency. Customers should be aware of the various risks prior to engaging these services, including potential loss of principal, cybersecurity considerations, regulatory developments, and the evolving nature of digital asset technology. For additional information on the risks of cryptocurrency, please click here.

This is not an offer, solicitation of an offer, or advice to buy or sell securities or cryptocurrencies or open a brokerage account or cryptocurrency account in any jurisdiction where Alpaca Securities or Alpaca Crypto, respectively, are not registered or licensed, as applicable.

Files in the repo

Repository payload11 top-level entries
  • .github
  • scripts
  • skills
  • templates
  • .gitignore
  • AGENTS.md
  • CODEOWNERS
  • CONTRIBUTING.md
  • LICENSE
  • README.md
  • SECURITY.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More skills

obra/
superpowers

An agentic skills framework & software development methodology that works.

285k
1 add

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

117k
1 add
Vincentwei1021/
anything2explainer

Topic in, narrated explainer video out. A Claude Code / Codex skill that turns any topic into a black-canvas motion-graphics explainer video with TTS voiceover, subtitles and a chapter progress bar. Chinese or English; every frame drawn in code with Remotion.

666

Open-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)

71k