stock-price-updater
Skill5 starsChanged 9 months agoMITView on GitHub
Update Excel files with latest stock market data including open, high, low, close prices, volume, and price changes. Supports multiple data sources (Yahoo Finance, AkShare) and automatically matches stocks by code or name. Use when users need to: (1) Update stock prices in Excel spreadsheets, (2) Fetch latest market data for multiple stocks, (3) Add trading data columns to existing stock lists, (4) Work with Chinese A-shares, Hong Kong stocks, or US stocks in Excel format.
- Installs packages
In this repository103 other files it gives its agents.
- ab-test-setupSkill
- analytics-trackingSkill
- apple-notesSkill
- apple-remindersSkill
- audit-supportSkill
- blogwatcherSkill
- camsnapSkill
- canned-responsesSkill
- canvas-designSkill
- canvasSkill
- close-managementSkill
- coding-agentSkill
- company-valuesSkill
- competitive-ads-extractorSkill
- competitive-analysisSkill
- competitor-alternativesSkill
- complianceSkill
- content-strategySkill
- contract-reviewSkill
- copy-editingSkill
- copywritingSkill
- deep-researchSkill
- email-sequenceSkill
- feature-specSkill
- file-organizerSkill
- finance-reconcileSkill
- financial-statementsSkill
- find-communitySkill
- first-customersSkill
- form-croSkill
- free-tool-strategySkill
- gifgrepSkill
- goose-adventure-gameSkill
- himalayaSkill
- image-optimizerSkill
- imsgSkill
- instagram-marketingSkill
- journal-entry-prepSkill
- launch-strategySkill
- legal-risk-assessmentSkill
- local-placesSkill
- marketing-ideasSkill
- marketing-psychologySkill
- mcporterSkill
- meeting-briefingSkill
- metrics-trackingSkill
- minimalist-reviewSkill
- model-usageSkill
- mvpSkill
- nano-banana-proSkill
- nano-pdfSkill
- nda-triageSkill
- notionSkill
- onboarding-croSkill
- openai-image-genSkill
- openai-whisper-apiSkill
- openai-whisperSkill
- openhueSkill
- oracleSkill
- ordercliSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Update Excel files with latest stock market data from multiple sources.
- Distinctive: line 80
When a user requests to update stock prices in an Excel file:
- Distinctive: line 83
Check dependencies: Ensure pandas, openpyxl, and at least one data source library (yfinance or akshare) are installed
- Distinctive: line 86
Verify results: Check the updated Excel file for new data columns
- Very specific: line 100
Ensure Excel has a column named: 股票代码, 代码, code, symbol, or ticker
- Very specific: line 105
Check the code format matches the market (e.g., US stocks need ticker symbols like AAPL, not numbers)
- Distinctive: line 114
Consider running during off-peak hours for large files
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Stock Price Updater
Overview
Update Excel files with latest stock market data from multiple sources. The script automatically detects stock markets, fetches real-time prices, and writes comprehensive trading data including open/high/low/close prices, volume, and price changes.
Quick Start
Basic usage:
python3 scripts/update_stock_prices.py <excel_file>Save to a different file:
python3 scripts/update_stock_prices.py input.xlsx -o output.xlsxInstallation
Install required dependencies:
pip install pandas openpyxl yfinance akshareMinimum requirements:
pandasandopenpyxl(required for Excel handling)- At least one of:
yfinanceorakshare(for fetching stock data)
Excel File Requirements
The Excel file must contain a stock code column with one of these names (case-insensitive):
股票代码,代码(Chinese)code,symbol,ticker(English)
Optional stock name column:
股票名称,名称(Chinese)name,stock_name(English)
The script will add or update these columns:
开盘价(Open),最高价(High),最低价(Low),收盘价(Close)成交量(Volume)涨跌额(Change),涨跌幅(%)(Change %)更新日期(Update Date)
For detailed format specifications and examples, see references/excel-format.md.
Supported Stock Markets
The script automatically detects the market based on code format:
Chinese A-Shares:
- Shanghai:
600000,601000,688000(or withshprefix) - Shenzhen:
000001,300001(or withszprefix) - Uses AkShare (preferred) or Yahoo Finance
Hong Kong Stocks:
- Format:
0700.HK,9988.HKor just0700,9988 - Uses Yahoo Finance
US Stocks:
- Format:
AAPL,TSLA,GOOGL - Uses Yahoo Finance
Other Markets:
- Supported through Yahoo Finance with appropriate suffixes
For detailed information about data sources, see references/data-sources.md.
Workflow
When a user requests to update stock prices in an Excel file:
- Verify file exists and is accessible
- Check dependencies: Ensure pandas, openpyxl, and at least one data source library (yfinance or akshare) are installed
- Run the script: Execute
python3 scripts/update_stock_prices.py <file_path> - Review output: The script reports success/failure for each stock
- Verify results: Check the updated Excel file for new data columns
Script Features
- Automatic market detection: Identifies Chinese, Hong Kong, US, and other markets by code format
- Multiple data sources: Tries AkShare for Chinese stocks, falls back to Yahoo Finance
- Flexible column matching: Finds stock code columns by multiple possible names
- Data caching: Avoids redundant API calls for duplicate stocks
- Comprehensive output: Adds 8 data columns with complete trading information
- Error handling: Reports which stocks succeeded or failed to update
Troubleshooting
"Cannot find stock code column" error:
- Ensure Excel has a column named:
股票代码,代码,code,symbol, orticker - Column names are case-insensitive
Missing data for specific stocks:
- Stock may be suspended, delisted, or code format is incorrect
- Check the code format matches the market (e.g., US stocks need ticker symbols like
AAPL, not numbers)
Import errors:
- Install missing libraries:
pip install yfinance akshare pandas openpyxl - At minimum, need pandas, openpyxl, and one data source library
Slow performance:
- Fetching many stocks takes time (each API call takes 1-3 seconds)
- Script includes caching to avoid duplicate requests
- Consider running during off-peak hours for large files
Network errors:
- AkShare requires stable connection to Chinese data sources
- Yahoo Finance may rate-limit excessive requests
- Try again after a few minutes if rate-limited
For detailed troubleshooting, see references/data-sources.md.
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.

