
algo-expert
OpenAlgo execution expert. Auto-loaded knowledge base for building algorithmic trading strategies that toggle between VectorBT backtest and OpenAlgo live execution. Triggers when user mentions OpenAlgo trading strategies, dual-mode strategies, /python self-hosted strategies, options execution (short straddle, iron condor), portfolio risk caps, or live execution with stop loss / target / trailing stop / risk management.
- Installs
- 42
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/marketcalls/openalgo-execution-skills --skill algo-expert- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads algo-expert automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
OpenAlgo Execution Expert
Knowledge base for building production-grade algorithmic trading strategies on OpenAlgo. Every strategy is a single Python file that toggles between backtest mode (VectorBT) and live execution mode (OpenAlgo SDK + WebSocket) via one CLI flag (--mode backtest|live) or env var (MODE=...).
Strategies are also upload-ready for OpenAlgo's self-hosted /python strategy host.
Core principles
- One file, two modes. The same
signals(df)function feeds both VectorBT (backtest) and the live event loop. Risk thresholds and cost assumptions are honored on both sides. - OpenAlgo for everything broker-side. Data via
client.history()and WebSocket. Orders viaclient.placeorder()/placesmartorder()/optionsmultiorder(). Live vs sandbox is decided in OpenAlgo's UI analyzer toggle - the strategy code never knows. - Indicator library is user's choice -
openalgo.ta(default) ortalib. Specialty indicators (Supertrend, Donchian, Ichimoku, HMA, KAMA) always come from openalgo. Seerules/indicator-libraries.md. - Three execution types -
eoc(end-of-candle MARKET),limit(real-time pegged LIMIT),stop(broker-side SL-M trigger). User picks at strategy creation. Seerules/execution-types.md. - Real-world costs and slippage baked into every backtest (matches
vectorbt-backtesting-skills4-segment Indian model). Seerules/transaction-costs.mdandrules/slippage-handling.md. - Self-hosted
/pythoncompatible - every strategy reads env vars in the canonical priority, traps SIGTERM, logs to stdout. Seerules/self-hosted-strategies.md.
When to read which rule
| Reading the user wants... | Load these rule files |
|---|---|
| The big-picture strategy template | unified-strategy-pattern.md, mode-toggle.md, execution-types.md |
| Indicator selection | indicator-libraries.md |
| Position sizing (the most important fix) | position-sizing.md |
| Preflight checks at startup | preflight-checks.md |
| Risk on a single position | risk-management.md |
| Portfolio-level risk and daily caps | portfolio-risk.md |
| Cost / slippage modeling | transaction-costs.md, slippage-handling.md |
| Data sources (DuckDB, Historify, API) | duckdb-data.md |
| WebSocket and bar-close patterns | websocket-feeds.md, event-loop.md |
| Order placement idioms | execution-patterns.md, order-constants.md |
| Options strategies | options-execution.md |
| Volatility strategies | volatility-strategies.md |
| ML strategies | ml-strategies.md |
| Persistent state between restarts | state-persistence.md |
| Logging and Telegram alerts | logging-and-alerts.md |
| Common production mistakes | pitfalls.md |
| Strategy catalog / template selection | strategy-catalog.md |
OpenAlgo /python self-hosting | self-hosted-strategies.md |
| Symbol formats and lot sizes | symbol-format.md, lot-sizes.md, order-constants.md |
| Full SDK reference | sdk-reference.md |
Production patterns (lifted from OpenAlgo examples)
- Two-thread live model: signal poll thread + WS callback thread (from
examples/python/emacrossover_strategy_python.py). The WS callback NEVER places orders directly - it spawns a worker thread. - Bar-close logic uses
iloc[-2]notiloc[-1]- the last bar inclient.history()is forming and would cause repaint. - Risk exits use
client.placesmartorder(position_size=0)to flatten cleanly (fromexamples/python/stoploss_target_example.py). - Multi-leg options entry via
client.optionsmultiorder()- BUY legs go first for margin efficiency. Per-leg SL viaclient.placeorder(price_type="SL")(fromexamples/python/straddle_with_stops.py). - Time-based entries via
apscheduler.schedulers.background.BackgroundSchedulerwith IST cron (fromexamples/python/straddle_scheduler.py). - Always fetch spot quote before any options order -
client.quotes()first, thenclient.optionsorder()withoffset="ATM".
Anti-patterns (always avoid)
asyncio- the OpenAlgo SDK is synchronous; usethreadinginsteaddf.iloc[-1]on live data - that's the forming bar; useiloc[-2]- Calling
client.history(start_date=end_date)- returns 1 candle; always use multi-day lookback - Placing exit orders directly inside the WS callback - spawn a worker thread
- Hardcoding
exchange="NSE"when self-hosted - readOPENALGO_STRATEGY_EXCHANGEenv var instead - Backtests with
fees=0andslippage=0- the result is fantasy; use the segment-appropriate constants - Polling
client.get_ltp()faster than 0.5s - use WS callbacks for real-time
Reference docs (in OpenAlgo repo)
- SDK:
D:/openalgo-python/openalgo/docs/prompt/openalgo python sdk.md - Services:
D:/openalgo-python/openalgo/docs/prompt/services_documentation.md - WebSocket protocol:
D:/openalgo-python/openalgo/docs/prompt/websockets-format.md - Self-hosted /python:
D:/openalgo-python/openalgo/strategies/README.md - Production examples:
D:/openalgo-python/openalgo/examples/python/
FAQ
What does the algo-expert skill do?
OpenAlgo execution expert. Auto-loaded knowledge base for building algorithmic trading strategies that toggle between VectorBT backtest and OpenAlgo live execution. Triggers when user mentions OpenAlgo trading strategies, dual-mode strategies, /python self-hosted strategies, options execution (short straddle, iron condor), portfolio risk caps, or live execution with stop loss / target / trailing stop / risk management.
How do I install algo-expert?
Run npx skills add https://github.com/marketcalls/openalgo-execution-skills --skill algo-expert in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/algo-expert/ (personal) or .claude/skills/algo-expert/ (project).
Which AI agents can use algo-expert?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is algo-expert safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains algo-expert?
It is published by marketcalls in marketcalls/openalgo-execution-skills. It has 42 recorded installs.
More from marketcalls/openalgo-execution-skills
algo-strategy
marketcalls/openalgo-execution-skills
Open the skill to read its SKILL.md instructions.
algo-options
marketcalls/openalgo-execution-skills
Generate options-only execution strategies (short straddle, iron condor). Backtest mode is intentionally disabled. Live mode uses optionsmultiorder + per-leg SL.
algo-risk-test
marketcalls/openalgo-execution-skills
Verify a strategy's SL / TP / trailing stop / portfolio caps fire correctly. Uses OpenAlgo sandbox + synthetic price moves. Run this before going live.
algo-host
marketcalls/openalgo-execution-skills
Open the skill to read its SKILL.md instructions.
algo-setup
marketcalls/openalgo-execution-skills
Set up the Python environment for OpenAlgo execution skills - venv, openalgo[indicators], vectorbt, talib, scikit-learn, xgboost. Scaffolds strategies/ folder and .env.
algo-portfolio
marketcalls/openalgo-execution-skills
Run multiple strategies under one supervisor with portfolio-level risk caps (portfolio SL/TP, daily PnL limits, max concurrent positions). YAML-driven.
Popular business & finance skills
sales-enablement
coreyhaines31/marketingskills
When the user wants to create sales collateral, pitch decks, one-pagers, objection handling docs, or demo scripts. Also use when the user mentions 'sales deck,' 'pitch deck,' 'one-pager,' 'leave-behind,' 'objection handling,' 'deal-specific ROI analysis,' 'demo script,' 'talk track,' 'sales playbook,' 'proposal template,' 'buyer persona card,' 'battle card,' 'battlecard,' 'competitive one-pager,' 'win-loss analysis,' 'why are we losing deals,' 'loss reasons,' 'how do I respond to this objection,' 'prospect just said,' 'help my sales team,' 'sales materials,' or 'what should I give my sales reps,' 'cold call script,' or 'voicemail script.' Use this for any document or asset that helps a sales team close deals. For public competitor comparison pages, see competitors. For running buyer interviews or churn research, see customer-research. For marketing website copy, see copywriting. For cold outreach emails, see cold-email. For the offer being sold (bonuses, guarantees, pricing structure),
revops
coreyhaines31/marketingskills
When the user wants help with revenue operations, lead lifecycle management, or marketing-to-sales handoff processes. Also use when the user mentions 'RevOps,' 'revenue operations,' 'lead scoring,' 'outbound pipeline stages,' 'lead routing,' 'MQL,' 'SQL,' 'pipeline stages,' 'deal desk,' 'CRM automation,' 'marketing-to-sales handoff,' 'data hygiene,' 'leads aren't getting to sales,' 'pipeline management,' 'lead qualification,' or 'when should marketing hand off to sales.' Use this for anything involving the systems and processes that connect marketing to revenue. For cold outreach emails, see cold-email. For email drip campaigns, see emails. For pricing decisions, see pricing.
sales-funnel-blueprint
autonnel/autonnel-skills
Turn an offer into a concrete multi-step sales funnel spec - page-by-page structure, price ladder, copy outline and the metrics each step must hit. Use when asked to build a sales funnel, marketing funnel, landing page flow, lead magnet funnel, webinar funnel, tripwire or VSL funnel, when planning a product launch page flow, or when someone asks "what pages do I need" for selling something online.
pricing
coreyhaines31/marketingskills
When the user wants help with pricing decisions, packaging, or monetization strategy. Also use when the user mentions 'pricing,' 'pricing tiers,' 'freemium,' 'free trial,' 'packaging,' 'price increase,' 'value metric,' 'Van Westendorp,' 'willingness to pay,' 'monetization,' 'how much should I charge,' 'my pricing is wrong,' 'pricing page,' 'annual vs monthly,' 'per seat pricing,' 'should I offer a free plan,' 'pricing page teardown,' 'pricing page audit,' 'is my pricing page AI-readable,' or 'can AI read my pricing.' Use this whenever someone is figuring out what to charge, how to structure their plans, or wants to audit a pricing page (for humans and for the AI agents that shortlist tools). For in-app upgrade screens, see paywalls. For offer construction (bonuses, guarantees, value framing, naming) on services/courses/coaching/high-ticket B2B, see offers.
cross-border-ecommerce
nexscope-ai/ecommerce-skills
Cross-border e-commerce expansion advisor. Scores target markets on 8 weighted dimensions (market size, ecommerce penetration, competition, regulatory complexity, logistics infrastructure, payment ecosystem, cultural distance, IP protection), compares 5 fulfillment models with cost and transit data, provides country-by-country tax/duty compliance guides (EU VAT/IOSS, UK VAT, US sales tax, CA GST, AU GST, JP consumption tax), maps local payment preferences by market, and builds a phased expansion roadmap. No API key required.
pricing-strategy
coreyhaines31/marketingskills
When the user wants help with pricing decisions, packaging, or monetization strategy. Also use when the user mentions 'pricing,' 'pricing tiers,' 'freemium,' 'free trial,' 'packaging,' 'price increase,' 'value metric,' 'Van Westendorp,' 'willingness to pay,' 'monetization,' 'how much should I charge,' 'my pricing is wrong,' 'pricing page,' 'annual vs monthly,' 'per seat pricing,' or 'should I offer a free plan.' Use this whenever someone is figuring out what to charge or how to structure their plans. For in-app upgrade screens, see paywall-upgrade-cro.