stocks – skill Khác cho agent AI
Báo giá cổ phiếu, lịch sử, tìm kiếm, so sánh, tiền mã hóa qua Yahoo.
Cài skill stocks bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/stocks-5d951.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /stocks – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/stocks-5d951.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $stocks – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/stocks-5d951.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /stocks – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/stocks-5d951.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /stocks – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Stocks Skill
Read-only market data via Yahoo Finance. Five commands: quote, search,
history, compare, crypto. Python stdlib only — no API key, no pip
installs. Yahoo's endpoint is unofficial and may rate-limit or change.
When to Use
- User asks for a current stock price (AAPL, TSLA, MSFT, ...)
- User wants to look up a ticker by company name
- User wants OHLCV history or performance over a date range
- User wants to compare several tickers side by side
- User asks for a crypto price (BTC, ETH, SOL, ...)
Prerequisites
Python 3.8+ stdlib only. Optional: set ALPHA_VANTAGE_KEY to enrich
market_cap, pe_ratio, and 52-week levels when Yahoo's crumb-protected
fields come back null. Free key: https://www.alphavantage.co/support/#api-key
How to Run
Invoke through the terminal tool. Once installed:
SCRIPT=~/.hermes/skills/finance/stocks/scripts/stocks_client.py
python $SCRIPT quote AAPLAll output is JSON on stdout — pipe through jq if you want to slice it.
Quick Reference
python $SCRIPT quote AAPL
python $SCRIPT quote AAPL MSFT GOOGL TSLA
python $SCRIPT search "Tesla"
python $SCRIPT history NVDA --range 6mo
python $SCRIPT compare AAPL MSFT GOOGL
python $SCRIPT crypto BTC ETH SOLCommands
quote SYMBOL [SYMBOL2 ...]
Current price, change, change%, volume, 52-week high/low.
search QUERY
Find tickers by company name. Returns top 5: symbol, name, exchange, type.
history SYMBOL [--range RANGE]
Daily OHLCV plus stats (min, max, avg, total return %). Ranges: 1mo,
3mo, 6mo, 1y, 5y. Default: 1mo.
compare SYMBOL1 SYMBOL2 [...]
Side-by-side: price, change%, 52-week performance.
crypto SYMBOL [SYMBOL2 ...]
Crypto prices. Pass BTC (the script appends -USD automatically).
Pitfalls
- Yahoo Finance's API is unofficial. Endpoints can change or rate-limit
without notice — if requests start failing, that's why.
market_capandpe_ratiomay return null onquotewhen Yahoo's
crumb session isn't established. Set ALPHA_VANTAGE_KEY to backfill.
- Add a small delay between bulk requests to avoid rate-limiting.
- This is read-only — no order placement, no account integration.
Verification
python ~/.hermes/skills/finance/stocks/scripts/stocks_client.py quote AAPLReturns a JSON object with symbol: "AAPL" and a numeric price field.
Skill liên quan
- earllm-build – Xây dựng, bảo trì và mở rộng dự án Android EarLLM One — ứng dụng Kotlin/Compose kết nối…
- stripe-projects – Cung cấp dịch vụ SaaS + đồng bộ thông tin xác thực qua Stripe Projects.
- transformers – Hugging Face Transformers để tải model từ Hub, chạy suy luận pipeline, sinh văn bản và…
- elon-musk – Mô phỏng hư cấu, được gắn nhãn rõ ràng, theo phong cách giao tiếp gắn với Elon Musk, kèm…
- treatment-plans – Định dạng và kiểm tra cấu trúc tài liệu kế hoạch điều trị cục bộ sau khi các quyết định…
- embedding-strategies – Hướng dẫn chọn và tối ưu mô hình embedding cho ứng dụng tìm kiếm vector.
- umap-learn – Áp dụng UMAP-learn cho giảm chiều phi tuyến, nhúng 2D/3D, tiền xử lý phân cụm, UMAP có…
- emergency-card – Tạo thẻ tóm tắt thông tin y tế để truy cập nhanh trong trường hợp khẩn cấp. Dùng khi…