Agent Skill (CLI Tools)¶
Download FinMind's /finmind command file into CLI / editor tools such as Claude Code, Codex, Cursor, Windsurf, and Gemini to query 75+ FinMind datasets through natural language and fetch real data, without having to assemble API parameters yourself.
Other connection methods
- Web ChatGPT / Claude: use llms.txt — no install.
- MCP-capable tools: use the MCP Server, called automatically by the tool.
On this page
- Installation: ① Download · ② Token · ③ Use
- Examples: stock price, chip, fundamentals, futures & options, macroeconomy, charts, advanced analysis
Installation¶
Step 1: Download the Skill¶
🍎 macOS / Linux install commands
🪟 Windows (PowerShell) install commands
Windows 10/11 ships with curl.exe built in. Use the PowerShell versions below instead of the commands above (note the .exe: PowerShell's bare curl is an alias for Invoke-WebRequest and uses different syntax).
If you use WSL or Git Bash, the macOS / Linux commands above work as-is — no changes needed.
Step 2: Set Up the Token¶
Register at FinMind and verify your email to obtain a token.
🍎 macOS / Linux — set the Token
We recommend adding this to ~/.bashrc or ~/.zshrc so it loads automatically every time you open a terminal.
🪟 Windows (PowerShell) — set the Token
PowerShell does not use export. Use this instead:
$env:FINMIND_TOKEN="your_token_here" # current terminal only
setx FINMIND_TOKEN "your_token_here" # persists (reopen the terminal to take effect)
On WSL or Git Bash, export and ~/.bashrc work the same as macOS / Linux.
Step 3: Use It¶
In Claude Code, type /finmind followed by what you want to query:
Examples¶
Prefix the queries below with
/finmind. If you use MCP instead, just ask in natural language.
Stock Price Queries¶
Expected result: returns a daily stock price table for TSMC (2330) over the past month, including columns such as date, open, high, low, close, and volume.

Expected result: queries TSMC and Hon Hai stock prices over the past three months and presents a closing-price comparison of both stocks in a table.

Chip / Institutional Data¶
Expected result: returns daily net buy/sell volumes (in lots) for foreign investors, investment trusts, and dealers for TSMC over the past week.

Expected result: returns a historical table of TSMC's foreign investor shareholding (in lots) and shareholding ratio.

Fundamentals¶
Expected result: returns TSMC's monthly revenue figures for the current year.

Expected result: returns TSMC's historical price-to-earnings ratio (PER), price-to-book ratio (PBR), and dividend yield over the past five years.
Futures and Options¶
Expected result: returns daily open/high/low/close, volume, and open interest for TAIEX futures (TX) over the past week.

Expected result: returns today's long/short trading volumes (in contracts) and amounts by the three institutional investors for TAIEX options (TXO).
Macroeconomy¶
Expected result: returns daily spot buy/sell USD/TWD exchange rates over the past six months.

Expected result: returns the Fed's historical interest rate adjustment records over the past ten years.
Expected result: returns daily gold prices over the past year.
Charts¶
Expected result: generates a candlestick chart for TSMC over the past three months, including OHLC, moving averages, and volume, saved as an image file.

Expected result: generates a line chart comparing the closing prices of the two stocks, saved as an image file.

Expected result: generates a USD/TWD exchange rate line chart, saved as an image file.
Advanced Analysis¶
Expected result: calculates the cumulative return rates of both stocks over the past year and presents the comparison in a table or chart.
Expected result: summarizes TSMC's cash dividends, stock dividends, ex-dividend dates, and payment dates for the past three years.
Expected result: returns the TAIEX weighted index value every 5 seconds for today, showing the intraday trend.