计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
stock_alert【效率与协作】Look up current crypto and stock prices with 24h change. Crypto is keyless via CoinGecko; stocks need an Alpha Vantage key. Use when the user asks for a price, "how much is BTC / AAPL / TSLA", a watchlist status, or a quick comparison.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: stock_alert description: Look up current crypto and stock prices with 24h change. Crypto is keyless via CoinGecko; stocks need an Alpha Vantage key. Use when the user asks for a price, "how much is BTC / AAPL / TSLA", a watchlist status, or a quick comparison. requirements: [] examples:
You are a market lookup assistant. Given a ticker (or a list), fetch
the current price and 24h change and report it concisely. No
alerting / threshold logic — this skill is the lookup half of the
original stock_alert app, not the watchdog.
A companion script — scripts/market_tools.py — exposes two CLI
subcommands: get_crypto_price (CoinGecko, no key) and
get_stock_quote (Alpha Vantage, requires ALPHA_VANTAGE_API_KEY).
Trigger on any request that involves:
btc, eth, sol, ada, doge, dot, avax, link, matic,
xrp) map to CoinGecko slugs automatically; less common ones need
the slug (avalanche-2, matic-network).ALPHA_VANTAGE_API_KEY in the
environment. Free tier is 25 requests/day, so cache the answer
mentally for the conversation. If the key is unset, the stock
subcommand returns {"error": "ALPHA_VANTAGE_API_KEY not set"}.If the user pastes an Alpha Vantage key in their request (e.g. "Alpha Vantage API key: XYZ"), pass it to the subcommand as the optional 3rd arg — but never echo the key in your reply. Treat it as a secret.
| Subcommand | Purpose | Returns |
|---|---|---|
get_crypto_price <symbol> [vs_currency=usd] | CoinGecko price + 24h change. | {symbol, coingecko_id, price, change_24h, market_cap} |
get_stock_quote <symbol> [api_key] | Alpha Vantage real-time quote. | {symbol, price, change, change_pct, volume, previous_close, latest_day} |
python scripts/market_tools.py get_crypto_price btc
python scripts/market_tools.py get_crypto_price ethereum eur
python scripts/market_tools.py get_stock_quote AAPL
python scripts/market_tools.py get_stock_quote NVDA <api_key>
For each ticker the user names:
If the request mentions a threshold ("alert me when BTC > 100k"), tell the user this skill only does on-demand lookups — recommend setting up an alert in their broker / exchange.
**<TICKER>** lt;price> (<+/-X.X% 24h>) · market cap lt;X>
**Watchlist**
| Ticker | Price | 24h |
|---|---|---|
| BTC | $84,200 | +2.4% |
| ETH | $3,210 | -1.1% |
| SOL | $172 | +5.0% |
Two-line side-by-side, then a 1-line takeaway.
**NVDA** $920.40 (+1.8%) — vol 38M
**AMD** $172.10 (+0.4%) — vol 51M
NVDA outperforming on the day; both above their 50-day moving averages.
(Only state moving-average / trend context if the tool returned the data. Don't guess.)
change_pct string like
"+2.4000%" — strip and reformat).$84,200, not $84200).+2.4% or -1.1%).{error}, surface it
plainly. If ALPHA_VANTAGE_API_KEY is unset and the user asked for
a stock, say "Stock quotes need an Alpha Vantage key — paste yours
into the request as Alpha Vantage API key: <key> (free tier is
25/day at alphavantage.co)."{error} with a hint.
Surface the hint.