/SKILL.md
Interact with your Public.com brokerage account using the Public.com API. Able to view portfolio, get stock quotes, place trades, and get account updates. To create a Public.com account head to public.com/signup.
npx skillsauth add publicdotcom/claw-skill-public-dot-com public.comInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Disclaimer: For illustrative and informational purposes only. Not investment advice or recommendations.
We recommend running this skill in as isolated of an instance as possible. If possible, test the integration on a new Public account as well.
This skill allows users to interact with their Public.com brokerage account.
The publicdotcom-py SDK is required. It will be auto-installed on first run, or you can install manually:
pip install publicdotcom-py
This skill uses two environment variables: PUBLIC_COM_SECRET (required) and PUBLIC_COM_ACCOUNT_ID (optional). Each is resolved from the environment:
PUBLIC_COM_SECRET / PUBLIC_COM_ACCOUNT_IDIf PUBLIC_COM_SECRET is not set:
export PUBLIC_COM_SECRET=[VALUE]If the user wants to set a default account for all requests:
export PUBLIC_COM_ACCOUNT_ID=[VALUE]--account-id on each command.If any command exits with an error, follow these steps before giving up:
PUBLIC_COM_SECRET not set — Ask the user for their API secret and instruct them to run export PUBLIC_COM_SECRET=[VALUE], then retry.No account ID provided — Run python3 scripts/get_accounts.py to retrieve the account ID, then retry the original command with --account-id [ID].Never silently retry the same failing command more than once.
Run this automatically the first time the user interacts with this skill, or whenever they ask "is everything configured?", "check my setup", or "verify my API key":
python3 scripts/check_setup.pyWhen the user asks to "get my accounts", "list accounts", or "show my Public.com accounts":
python3 scripts/get_accounts.py--account-id.When the user asks to "get my portfolio", "show my holdings", or "what's in my account":
PUBLIC_COM_ACCOUNT_ID is set, execute python3 scripts/get_portfolio.py (no arguments needed).get_accounts.py to retrieve it.python3 scripts/get_portfolio.py --account-id [ACCOUNT_ID]When the user asks to "get my orders", "show my orders", "active orders", or "pending orders":
PUBLIC_COM_ACCOUNT_ID is set, execute python3 scripts/get_orders.py (no arguments needed).get_accounts.py to retrieve it.python3 scripts/get_orders.py --account-id [ACCOUNT_ID]When the user asks to "get my history", "show my transactions", "transaction history", "trade history", or wants to see past account activity:
Optional parameters:
--type: Filter by transaction type (TRADE, MONEY_MOVEMENT, POSITION_ADJUSTMENT)--limit: Limit the number of transactions returnedExamples:
Get all transaction history:
python3 scripts/get_history.py
Get only trades:
python3 scripts/get_history.py --type TRADE
Get only money movements (deposits, withdrawals, dividends, fees):
python3 scripts/get_history.py --type MONEY_MOVEMENT
Get last 10 transactions:
python3 scripts/get_history.py --limit 10
With explicit account ID:
python3 scripts/get_history.py --account-id YOUR_ACCOUNT_ID
Workflow:
PUBLIC_COM_ACCOUNT_ID is not set and you don't know the user's account ID, first run get_accounts.py to retrieve it.python3 scripts/get_history.py [OPTIONS]Transaction Types:
When the user asks to "get a quote", "what's the price of", "check the price", or wants stock/crypto prices:
Format: SYMBOL or SYMBOL:TYPE (TYPE defaults to EQUITY)
Examples:
Single equity quote (uses default account):
python3 scripts/get_quotes.py AAPL
Multiple equity quotes:
python3 scripts/get_quotes.py AAPL GOOGL MSFT
Mixed instrument types:
python3 scripts/get_quotes.py AAPL:EQUITY BTC:CRYPTO
Option quote:
python3 scripts/get_quotes.py AAPL260320C00280000:OPTION
With explicit account ID:
python3 scripts/get_quotes.py AAPL --account-id YOUR_ACCOUNT_ID
Workflow:
PUBLIC_COM_ACCOUNT_ID is not set and you don't know the user's account ID, first run get_accounts.py to retrieve it.python3 scripts/get_quotes.py [SYMBOLS...] [--account-id ACCOUNT_ID]When the user asks to "list instruments", "what can I trade", "show available stocks", or wants to see tradeable instruments:
Optional parameters:
--type: Instrument types to filter (EQUITY, OPTION, CRYPTO). Defaults to EQUITY.--trading: Trading status filter (BUY_AND_SELL, BUY_ONLY, SELL_ONLY, NOT_TRADABLE)--search: Search by symbol or name--limit: Limit number of resultsExamples:
List all equities (default):
python3 scripts/get_instruments.py
List equities and crypto:
python3 scripts/get_instruments.py --type EQUITY CRYPTO
List only tradeable instruments:
python3 scripts/get_instruments.py --type EQUITY --trading BUY_AND_SELL
Search for specific instruments:
python3 scripts/get_instruments.py --search AAPL
Limit results:
python3 scripts/get_instruments.py --limit 50
Workflow:
python3 scripts/get_instruments.py [OPTIONS]When the user asks to "get instrument details", "show instrument info", "what are the details for AAPL", or wants to see details for a specific instrument:
Required parameters:
--symbol: The ticker symbol (e.g., AAPL, BTC)Optional parameters:
--type: Instrument type (EQUITY, OPTION, CRYPTO). Defaults to EQUITY.Examples:
Get equity instrument details:
python3 scripts/get_instrument.py --symbol AAPL
Get crypto instrument details:
python3 scripts/get_instrument.py --symbol BTC --type CRYPTO
Workflow:
python3 scripts/get_instrument.py --symbol [SYMBOL] [--type TYPE]This skill CAN list all available option expiration dates for any symbol.
When the user asks to "get option expirations", "list expirations", "show expiration dates", "when do options expire", or wants to know what option expiration dates are available for a stock:
python3 scripts/get_option_expirations.py [SYMBOL]Common user phrasings:
Required parameters:
symbol: The underlying symbol (e.g., AAPL, GOOGL, TSLA, SPY). Convert company names to ticker symbols.Examples:
python3 scripts/get_option_expirations.py AAPL
python3 scripts/get_option_expirations.py GOOGL
python3 scripts/get_option_expirations.py TSLA
python3 scripts/get_option_expirations.py SPY
Common company name to symbol mappings:
Workflow:
python3 scripts/get_option_expirations.py [SYMBOL]get_option_chain.py.When the user asks for "option greeks", "delta", "gamma", "theta", "vega", or wants to analyze options:
Required parameters:
OSI Symbol Format:
AAPL260116C00270000
^^^^------^--------
| | | Strike price ($270.00)
| | Call (C) or Put (P)
| Expiration (Jan 16, 2026 = 260116)
Underlying symbol
Examples:
Single option:
python3 scripts/get_option_greeks.py AAPL260116C00270000
Multiple options (e.g., call and put at same strike):
python3 scripts/get_option_greeks.py AAPL260116C00270000 AAPL260116P00270000
Workflow:
python3 scripts/get_option_greeks.py [OSI_SYMBOLS...]When the user asks for "option chain", "options for AAPL", "show me calls and puts", or wants to see available options:
Required parameters:
symbol: The underlying symbol (e.g., AAPL)Optional parameters:
--expiration: Expiration date (YYYY-MM-DD). If not provided, uses the nearest expiration.--list-expirations: List available expiration dates instead of fetching the chain.Examples:
List available expirations:
python3 scripts/get_option_chain.py AAPL --list-expirations
Get option chain for nearest expiration:
python3 scripts/get_option_chain.py AAPL
Get option chain for specific expiration:
python3 scripts/get_option_chain.py AAPL --expiration 2026-03-20
Workflow:
--list-expirations to show available dates.python3 scripts/get_option_chain.py [SYMBOL] [--expiration DATE]When the user asks to "set my default account" or "use account X as default":
export PUBLIC_COM_ACCOUNT_ID=[ACCOUNT_ID]When the user asks to "estimate order cost", "preflight an order", "what would it cost to buy", "check buying power impact", or wants to see the estimated cost and account impact before placing an order:
Required parameters:
--symbol: The ticker symbol (e.g., AAPL, BTC, or option symbol like NVDA260213P00177500)--type: EQUITY, OPTION, or CRYPTO--side: BUY or SELL--order-type: LIMIT, MARKET, STOP, or STOP_LIMIT--quantity OR --amount: Number of shares/contracts OR notional dollar amountConditional parameters:
--limit-price: Required for LIMIT and STOP_LIMIT orders--stop-price: Required for STOP and STOP_LIMIT orders--session: CORE (default) or EXTENDED for equity orders--open-close: OPEN or CLOSE for options orders (OPEN to open a new position, CLOSE to close existing)--time-in-force: DAY (default) or GTD (Good Till Date — requires --expiration-time YYYY-MM-DD, max 90 days out)Examples:
Equity limit buy preflight:
python3 scripts/preflight.py --symbol AAPL --type EQUITY --side BUY --order-type LIMIT --quantity 10 --limit-price 227.50
Equity market sell preflight:
python3 scripts/preflight.py --symbol AAPL --type EQUITY --side SELL --order-type MARKET --quantity 10
Crypto buy by amount preflight:
python3 scripts/preflight.py --symbol BTC --type CRYPTO --side BUY --order-type MARKET --amount 100
Option contract buy preflight (opening a new position):
python3 scripts/preflight.py --symbol NVDA260213P00177500 --type OPTION --side BUY --order-type LIMIT --quantity 1 --limit-price 4.00 --open-close OPEN
Option contract sell preflight (closing a position):
python3 scripts/preflight.py --symbol NVDA260213P00177500 --type OPTION --side SELL --order-type LIMIT --quantity 1 --limit-price 5.00 --open-close CLOSE
Workflow:
python3 scripts/preflight.py [OPTIONS]place_order.py script with the same parameters.When the user asks to "buy", "sell", "place an order", or "trade":
Required parameters:
--symbol: The ticker symbol (e.g., AAPL, BTC)--type: EQUITY, OPTION, or CRYPTO--side: BUY or SELL--order-type: LIMIT, MARKET, STOP, or STOP_LIMIT--quantity OR --amount: Number of shares OR notional dollar amountConditional parameters:
--limit-price: Required for LIMIT and STOP_LIMIT orders--stop-price: Required for STOP and STOP_LIMIT orders--session: CORE (default) or EXTENDED for equity orders--open-close: OPEN or CLOSE for options orders--time-in-force: DAY (default) or GTD (Good Till Date — requires --expiration-time YYYY-MM-DD, max 90 days out)Examples:
Buy 10 shares of AAPL at limit price $227.50:
python3 scripts/place_order.py --symbol AAPL --type EQUITY --side BUY --order-type LIMIT --quantity 10 --limit-price 227.50
Sell $500 worth of AAPL at market price:
python3 scripts/place_order.py --symbol AAPL --type EQUITY --side SELL --order-type MARKET --amount 500
Buy crypto with extended hours:
python3 scripts/place_order.py --symbol BTC --type CRYPTO --side BUY --order-type MARKET --amount 100
Buy with a Good-Till-Date (GTD) order (cancels automatically on the given date if not filled):
python3 scripts/place_order.py --symbol AAPL --type EQUITY --side BUY --order-type LIMIT --quantity 10 --limit-price 220.00 --time-in-force GTD --expiration-time 2026-07-01
Workflow:
python3 scripts/place_order.py [OPTIONS]get_order.py --order-id <id>. To block until the order fills (or reaches another terminal status), use wait_for_fill.py --order-id <id>.When the user asks to "cancel order", "cancel my order", or wants to cancel a specific order:
Required parameters:
--order-id: The order ID to cancelExample:
python3 scripts/cancel_order.py --order-id 345d3e58-5ba3-401a-ac89-1b756332cc94
With explicit account ID:
python3 scripts/cancel_order.py --order-id 345d3e58-5ba3-401a-ac89-1b756332cc94 --account-id YOUR_ACCOUNT_ID
Workflow:
get_orders.py to show them their active orders.python3 scripts/cancel_order.py --order-id [ORDER_ID]get_order.py --order-id <id>.When the user asks for "historical prices", "price history", "candles", "OHLC", "bars", or "what did AAPL do last week/month/year":
Required parameters:
--symbol: Ticker symbol (e.g., AAPL, BTC, or an OSI option symbol)--period: One of DAY, WEEK, MONTH, QUARTER, HALF_YEAR, YEAR, FIVE_YEARS, YTD, SINCE_PURCHASEOptional parameters:
--type: EQUITY (default), CRYPTO, OPTION, or INDEX--aggregation: Bar size override (ONE_MINUTE, FIVE_MINUTES, TEN_MINUTES, FIFTEEN_MINUTES, THIRTY_MINUTES, ONE_HOUR, ONE_DAY, ONE_WEEK, ONE_MONTH, THREE_MONTHS, SIX_MONTHS, ONE_YEAR). If omitted, the server picks a sensible default for the period.--purchase-date: Required when --period SINCE_PURCHASE. Format YYYY-MM-DD.Examples:
One year of daily bars for AAPL:
python3 scripts/get_bars.py --symbol AAPL --period YEAR
One month of one-day bars:
python3 scripts/get_bars.py --symbol AAPL --period MONTH --aggregation ONE_DAY
One week of BTC bars:
python3 scripts/get_bars.py --symbol BTC --type CRYPTO --period WEEK
Bars since purchase:
python3 scripts/get_bars.py --symbol AAPL --period SINCE_PURCHASE --purchase-date 2024-01-15
Workflow:
python3 scripts/get_bars.py [OPTIONS]When the user wants to estimate the cost of a vertical option spread before placing it:
Required parameters:
--spread-type: One of CALL_CREDIT, CALL_DEBIT, PUT_CREDIT, PUT_DEBIT--sell: OSI symbol of the leg to sell--buy: OSI symbol of the leg to buy--quantity: Number of spread contracts--limit-price: Net debit (for DEBIT spreads) or net credit (for CREDIT spreads) as a positive value. The SDK negates credits internally.Optional parameters:
--time-in-force: DAY (default) or GTDSpread types:
CALL_CREDIT — Bear Call Spread: sell lower-strike CALL, buy higher-strike CALL (net credit)CALL_DEBIT — Bull Call Spread: buy lower-strike CALL, sell higher-strike CALL (net debit)PUT_CREDIT — Bull Put Spread: sell higher-strike PUT, buy lower-strike PUT (net credit)PUT_DEBIT — Bear Put Spread: buy higher-strike PUT, sell lower-strike PUT (net debit)Example:
python3 scripts/preflight_spread.py --spread-type CALL_DEBIT \
--sell AAPL251219C00200000 --buy AAPL251219C00190000 \
--quantity 1 --limit-price 3.00
Workflow:
get_option_chain.py and get_option_expirations.py if needed).python3 scripts/preflight_spread.py [OPTIONS]place_spread.py with the same parameters.When the user wants to place a vertical option spread:
Same arguments as Preflight Spread above. Uses the OSI-direct helpers added in publicdotcom-py 0.1.11 (place_call_credit_spread, etc.).
Example:
python3 scripts/place_spread.py --spread-type PUT_CREDIT \
--sell AAPL251219P00180000 --buy AAPL251219P00170000 \
--quantity 1 --limit-price 2.50
Workflow:
preflight_spread.py first.python3 scripts/place_spread.py [OPTIONS]When the user asks to "preflight a short", "estimate a short sale", or wants to see the impact before shorting:
Required parameters:
--symbol: Equity symbol to short--quantity: Number of sharesOptional parameters:
--order-type: MARKET (default), LIMIT, STOP, or STOP_LIMIT--limit-price: Required for LIMIT/STOP_LIMIT--stop-price: Required for STOP/STOP_LIMIT--time-in-force: DAY (default) or GTD--session: CORE or EXTENDEDExample:
python3 scripts/preflight_short.py --symbol TSLA --quantity 10 --order-type LIMIT --limit-price 245.00
Workflow:
python3 scripts/preflight_short.py [OPTIONS]place_short.py with the same parameters.When the user asks to "short a stock", "open a short position", or "place a short order":
Same arguments as Preflight Short above. Uses the place_short_order helper added in publicdotcom-py 0.1.11. The API represents short intent as SELL + openCloseIndicator=OPEN; this helper handles that automatically.
Example:
python3 scripts/place_short.py --symbol TSLA --quantity 10
Workflow:
preflight_short.py first.python3 scripts/place_short.py [OPTIONS]When the user asks about options strategies, how to automate a strategy, which strategy to use for a given scenario, or wants help constructing multi-leg options trades:
options-automation-library.md (located in the same directory as this skill) for detailed strategy context.preflight.py / place_order.pypreflight_spread.py / place_spread.pypreflight_multileg.py / place_multileg.pyWhen the user asks to "check order status", "is my order filled", "what happened to order X", or wants the current state of a specific order:
Required parameters:
--order-id: The order ID to look upExample:
python3 scripts/get_order.py --order-id 345d3e58-5ba3-401a-ac89-1b756332cc94
Workflow:
python3 scripts/get_order.py --order-id [ID]When the user wants to "wait until my order fills", "block until filled", or wants the agent to monitor an order through to a terminal state before doing the next step:
Required parameters:
--order-id: UUID of the order to trackOptional parameters:
--timeout: Max seconds to wait (default 120)--poll-seconds: Polling interval (default 1.0)--fill-only: Only return success (exit code 0) on FILLED. Otherwise any terminal status (CANCELLED/REJECTED/EXPIRED/REPLACED) ends the wait.Exit codes: 0 = filled, 1 = other terminal status, 2 = timed out.
Example:
python3 scripts/wait_for_fill.py --order-id 345d3e58-5ba3-401a-ac89-1b756332cc94 --timeout 300
Workflow:
place_order.py / place_spread.py / place_multileg.py returns an order ID, run wait_for_fill.py --order-id <id> to block until terminal status.When the user wants to "modify my order", "change the limit price", "update the quantity on order X", or asks to swap an open order for one with new parameters:
Required parameters:
--order-id: UUID of the existing order to replace--order-type: New order type (LIMIT, MARKET, STOP, STOP_LIMIT)Optional parameters:
--quantity: New quantity (omit to keep original)--limit-price: Required for LIMIT/STOP_LIMIT--stop-price: Required for STOP/STOP_LIMIT--time-in-force: DAY (default) or GTD (requires --expiration-time)--expiration-time: Required when GTDExample:
python3 scripts/cancel_and_replace.py --order-id 345d3e58-5ba3-401a-ac89-1b756332cc94 \
--order-type LIMIT --quantity 10 --limit-price 230.00
Workflow:
get_orders.py first.cancel_and_replace.py. The replacement gets a new order ID — report both.When the user wants to price a multi-leg options strategy other than a plain vertical spread (iron condor, butterfly, straddle, strangle, calendar, diagonal, ratio spread, jade lizard, etc.):
Required parameters:
--leg: Repeat 2-6 times. Format SYMBOL:TYPE:SIDE[:OPEN_CLOSE][:RATIO]
TYPE = EQUITY | OPTIONSIDE = BUY | SELLOPEN_CLOSE = OPEN | CLOSE (required for OPTION legs)RATIO = optional integer ratio--quantity: Number of strategy units--limit-price: Net limit (positive = debit, negative = credit)Optional parameters:
--time-in-force: DAY (default) or GTD (requires --expiration-time)--expiration-time: Required when GTDExamples:
Iron Condor on AAPL (sell put spread + sell call spread, $1.50 net credit):
python3 scripts/preflight_multileg.py --quantity 1 --limit-price -1.50 \
--leg AAPL251219P00190000:OPTION:SELL:OPEN \
--leg AAPL251219P00185000:OPTION:BUY:OPEN \
--leg AAPL251219C00210000:OPTION:SELL:OPEN \
--leg AAPL251219C00215000:OPTION:BUY:OPEN
Long Straddle on AAPL ($5.00 debit):
python3 scripts/preflight_multileg.py --quantity 1 --limit-price 5.00 \
--leg AAPL251219C00200000:OPTION:BUY:OPEN \
--leg AAPL251219P00200000:OPTION:BUY:OPEN
Workflow:
get_option_chain.py and get_option_expirations.py to pick strikes/expirations.preflight_multileg.py to see estimated cost, margin requirement, and buying-power impact.place_multileg.py with the same legs.When the user is ready to place a non-vertical multi-leg options strategy:
Same arguments as Preflight Multi-Leg above. Only LIMIT orders are accepted by the API for multi-leg orders.
Example:
python3 scripts/place_multileg.py --quantity 1 --limit-price -1.50 \
--leg AAPL251219P00190000:OPTION:SELL:OPEN \
--leg AAPL251219P00185000:OPTION:BUY:OPEN \
--leg AAPL251219C00210000:OPTION:SELL:OPEN \
--leg AAPL251219C00215000:OPTION:BUY:OPEN
Workflow:
preflight_multileg.py first with the same legs.place_multileg.py. Report the order ID.wait_for_fill.py --order-id <id> to monitor through to terminal status.When the user wants to "reverse my position", "flip to short", "flatten my long and short it", or asks to close a long equity position and immediately open a short:
Required parameters:
--symbol: Equity symbol--short-quantity: Number of shares to short after flatteningOptional parameters:
--order-type: Short order type — MARKET (default), LIMIT, STOP, STOP_LIMIT--limit-price / --stop-price: Required for non-MARKET types--time-in-force: DAY (default) or GTD (requires --expiration-time)--session: CORE or EXTENDED--flatten-timeout: Seconds to wait for the flatten leg to fill (default 60)Important: This is experimental in the SDK and not atomic — it's a two-order workflow (flatten the long, then short). Market conditions can move between the two fills.
Example:
python3 scripts/flatten_and_short.py --symbol TSLA --short-quantity 10
Workflow:
When the user asks to "watch the price", "monitor a stock", "alert me when X moves", or wants a real-time stream of quote changes:
Required parameters:
SYMBOL or SYMBOL:TYPE (TYPE = EQUITY | OPTION | CRYPTO, defaults to EQUITY)Optional parameters:
--poll-seconds: SDK polling interval (0.1-60, default 2.0)--max-updates: Stop after N price changes (useful when the agent only needs a snapshot, not an open stream)Examples:
Watch a single equity:
python3 scripts/watch_prices.py AAPL
Watch a basket with a 5-second poll:
python3 scripts/watch_prices.py AAPL GOOGL MSFT --poll-seconds 5
Capture 10 price changes on BTC, then exit:
python3 scripts/watch_prices.py BTC:CRYPTO --max-updates 10
Workflow:
--max-updates plus an outer loop or with the /schedule skill — do not leave a long-lived stream running by default.place_order.py.development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.