A Claude Code skill that connects AI agents to the Tushare financial data API, enabling automated retrieval of Chinese stock market data. Designed for developers and analysts building finance automation workflows.
git clone https://github.com/StanleyChanH/Tushare-Finance-Skill-for-Claude-Code.gitThe Tushare Finance Skill for Claude Code integrates the Tushare financial data platform directly into AI agent workflows, allowing Claude Code and similar tools to query Chinese stock market data programmatically. It includes a Python API client with batch query support and command-line tools for flexible data access. The skill ships with a quick reference guide and structured documentation to help developers get started with finance automation tasks. It is suited for developers, quants, and analysts who want to automate data retrieval, analysis, or reporting pipelines using AI coding assistants.
The skill requires a Tushare API token to authenticate against the Tushare data platform. It provides a Python API client and command-line scripts that can be invoked from Claude Code. A QUICK_REFERENCE.md file is included for fast lookup of available commands and query patterns.
Fetching historical Chinese stock price data inside a Claude Code session
Running batch queries against the Tushare API from an AI agent workflow
Automating financial data retrieval for analysis or reporting scripts
Using command-line tools to pull Tushare data without writing custom API code
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/StanleyChanH/Tushare-Finance-Skill-for-Claude-CodeCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
I need to automate financial data analysis using Tushare in Python. Generate a script that fetches stock data for [COMPANY] in the [INDUSTRY] sector from [START_DATE] to [END_DATE], calculates key financial metrics like P/E ratio, and exports the results to a CSV file. Include error handling and logging.
```python
import tushare as ts
import pandas as pd
# Initialize Tushare with your token
pro = ts.pro_api('[YOUR_TUSHARE_TOKEN]')
# Fetch stock data for Apple Inc. in the Technology sector
try:
df = pro.daily(ts_code='000001.SZ', start_date='2023-01-01', end_date='2023-12-31')
df['P/E Ratio'] = df['close'] / df['pe'] # Calculate P/E Ratio
df.to_csv('apple_stock_data.csv', index=False)
print("Data fetched and saved successfully.")
except Exception as e:
print(f"An error occurred: {e}")
```Your one-stop shop for church and ministry supplies.
AI assistant built for thoughtful, nuanced conversation
Automate your browser workflows effortlessly
IronCalc is a spreadsheet engine and ecosystem
Get more done every day with Microsoft Teams – powered by AI
Customer feedback management made simple
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan