alpaca
Skill4 starsChanged 6 months agoMITView on GitHub
Algorithmic trading, market data, and account management via Alpaca. Pattern: CLI-first (alpaca), then alpaca MCP fallback for structured in-session results. Get free paper keys: alpaca.markets → Paper Trading → API Keys Use MCP tools when you need structured, in-session results without spawning a subprocess — e.g., inside an agent workflow or when chaining results across tool calls. Note: The MCP server (alpaca-mcp-server via uvx) is read-only by default. For order placement and position management, use the CLI.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Samin12/skillstheir own version, first seen Aug 14, 2026
- Starchild-ai-agent/official-skillstheir own version, first seen May 21, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Starchild-ai-agent/official-skills★ 32same name
- Samin12/skills★ 8same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository79 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- 21st-magicSkill
- ask-mattSkill
- autoresearchSkill
- auto-stage-commitSkill
- browser-harnessSkill
- codebase-designSkill
- codeburnSkill
- codex-reviewSkill
- compact-memorySkill
- connect-recommendSkill
- connect-required-verification-informationSkill
- decision-mappingSkill
- delegate-taskSkill
- design-an-interfaceSkill
- design-mdSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- edit-articleSkill
- extract-designSkill
- ffmpegSkill
- find-skillsSkill
- firecrawlSkill
- generateSkill
- git-guardrails-claude-codeSkill
- grillingSkill
- grill-me-codexSkill
- grill-meSkill
- grill-with-docs-codexSkill
- grill-with-docsSkill
- gwSkill
- handoffSkill
- implementSkill
- improve-codebase-architectureSkill
- kie-aiSkill
- lightragSkill
- llmfitSkill
- loop-meSkill
- migrate-to-shoehornSkill
- notebooklmSkill
- obsidian-vaultSkill
- openspaceSkill
- playwrightSkill
- prototypeSkill
- qaSkill
- request-refactor-planSkill
- resolving-merge-conflictsSkill
- reviewSkill
- roastSkill
- scaffold-exercisesSkill
- session-handoffSkill
- setup-matt-pocock-skillsSkill
- setup-pre-commitSkill
- site-teardownSkill
- skill-discoverySkill
- skilluiSkill
- spline-3dSkill
- stripe-appsSkill
- stripe-best-practicesSkill
- stripe-directorySkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 85
Use MCP tools when you need structured, in-session results without spawning a subprocess — e.g., inside an agent workflow or when chaining …
- Distinctive: line 115
Default mode is PAPER trading — no real money at risk
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Alpaca Trading Skill
Algorithmic trading, market data, and account management via Alpaca.
Pattern: CLI-first (alpaca), then alpaca MCP fallback for structured in-session results.
When to Use This Skill
- Trade stocks, crypto, or options via command line or automation
- Query live/historical market data (bars, quotes, trades, snapshots)
- Manage positions, orders, watchlists, wallets
- Build Trigger.dev automations that interact with markets
- Paper trading and strategy testing (default mode — no real money)
Authentication
# Option A — OAuth (paper trading only)
alpaca profile login
# Option B — API keys (paper + live)
export ALPACA_API_KEY=PKxxx...
export ALPACA_SECRET_KEY=xxx...
export ALPACA_LIVE_TRADE=true # omit for paper (default)
# Check
alpaca doctor
alpaca accountGet free paper keys: alpaca.markets → Paper Trading → API Keys
CLI-First Commands
# ── Account ──────────────────────────────────────────────────
alpaca account # account info + buying power
alpaca account activities # recent activity
alpaca portfolio history --period 1M # portfolio P&L chart data
# ── Orders ───────────────────────────────────────────────────
alpaca order list # open orders
alpaca order list --status all # all orders
alpaca order buy AAPL --qty 1 # market buy 1 share (PAPER by default)
alpaca order sell AAPL --qty 1 # market sell
alpaca order buy AAPL --qty 1 --type limit --limit-price 180
alpaca order cancel --all # cancel all open orders
alpaca order cancel <order-id>
# ── Positions ────────────────────────────────────────────────
alpaca position list # all open positions
alpaca position get AAPL # single position
alpaca position close AAPL # close a position
alpaca position close --all # close everything
# ── Market Data ──────────────────────────────────────────────
alpaca data bars AAPL --timeframe 1Day --start 2024-01-01
alpaca data bars AAPL BTC/USD --timeframe 1Hour --limit 48
alpaca data quote AAPL # latest quote
alpaca data trade AAPL # latest trade
alpaca data snapshot AAPL MSFT NVDA # multi-symbol snapshot
alpaca data news --symbols AAPL # recent news
# ── Screeners ────────────────────────────────────────────────
alpaca data screener movers --type gainers --limit 10
alpaca data screener active --by volume --limit 10
# ── Watchlists ───────────────────────────────────────────────
alpaca watchlist list
alpaca watchlist create MyList
alpaca watchlist add MyList AAPL MSFT
# ── Market Clock / Calendar ──────────────────────────────────
alpaca clock # current market status (open/closed)
alpaca calendar --start 2025-01-01 --end 2025-01-31
# ── Output control ───────────────────────────────────────────
alpaca data bars AAPL --output json # JSON for scripting
alpaca data bars AAPL --output csv # CSV export
alpaca data bars AAPL | jq '.bars[0]' # pipe to jqMCP Fallback (alpaca MCP)
Use MCP tools when you need structured, in-session results without spawning a subprocess — e.g., inside an agent workflow or when chaining results across tool calls.
# Available MCP tools (read-only by default in settings.local.json.example):
mcp__alpaca__get_account_info
mcp__alpaca__get_all_positions / get_open_position
mcp__alpaca__get_orders / get_order_by_id
mcp__alpaca__get_stock_bars / get_stock_snapshot
mcp__alpaca__get_stock_latest_quote / get_stock_latest_trade
mcp__alpaca__get_crypto_bars / get_crypto_snapshot
mcp__alpaca__get_option_chain / get_option_contracts
mcp__alpaca__get_market_movers / get_most_active_stocks
mcp__alpaca__get_clock / get_calendar
mcp__alpaca__get_watchlistsNote: The MCP server (alpaca-mcp-server via uvx) is read-only by default. For order placement and position management, use the CLI.
Environment Variables
| Variable | Purpose |
ALPACA_API_KEY | API key (PKxxx...) |
ALPACA_SECRET_KEY | Secret key |
ALPACA_LIVE_TRADE | true for live; omit for paper (default) |
ALPACA_PROFILE | Named profile to use |
ALPACA_OUTPUT | json or csv output format |
Safety
- Default mode is PAPER trading — no real money at risk
- Set
ALPACA_LIVE_TRADE=trueexplicitly when switching to live alpaca doctorvalidates connectivity and auth before running automations- CLI executes immediately with no confirmation prompts — review orders before running in live mode
Trigger.dev Integration Example
import { task } from "@trigger.dev/sdk/v3";
export const dailyMarketScan = task({
id: "daily-market-scan",
run: async () => {
// Use alpaca CLI via shell for zero-dependency market data
const { execSync } = require("child_process");
const movers = JSON.parse(
execSync("alpaca data screener movers --type gainers --limit 5 --output json").toString()
);
return movers;
},
});Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

