Skip to content

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

Step 1: Download the Skill

🍎 macOS / Linux install commands
mkdir -p ~/.claude/commands
curl -o ~/.claude/commands/finmind.md https://raw.githubusercontent.com/FinMind/FinMind/master/.claude/commands/finmind.md
curl -o AGENTS.md https://raw.githubusercontent.com/FinMind/FinMind/master/.claude/commands/finmind.md
mkdir -p .cursor/rules
curl -o .cursor/rules/finmind.mdc https://raw.githubusercontent.com/FinMind/FinMind/master/.claude/commands/finmind.md
curl -o .windsurfrules https://raw.githubusercontent.com/FinMind/FinMind/master/.claude/commands/finmind.md
curl -o GEMINI.md https://raw.githubusercontent.com/FinMind/FinMind/master/.claude/commands/finmind.md
🪟 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).

mkdir $HOME\.claude\commands -Force
curl.exe -o $HOME\.claude\commands\finmind.md https://raw.githubusercontent.com/FinMind/FinMind/master/.claude/commands/finmind.md
curl.exe -o AGENTS.md https://raw.githubusercontent.com/FinMind/FinMind/master/.claude/commands/finmind.md
mkdir .cursor\rules -Force
curl.exe -o .cursor\rules\finmind.mdc https://raw.githubusercontent.com/FinMind/FinMind/master/.claude/commands/finmind.md
curl.exe -o .windsurfrules https://raw.githubusercontent.com/FinMind/FinMind/master/.claude/commands/finmind.md
curl.exe -o GEMINI.md https://raw.githubusercontent.com/FinMind/FinMind/master/.claude/commands/finmind.md

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
export FINMIND_TOKEN="your_token_here"

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:

/finmind TSMC stock prices for the past month

Examples

Prefix the queries below with /finmind. If you use MCP instead, just ask in natural language.

Stock Price Queries

/finmind TSMC stock prices for the past month

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.

TSMC stock prices for the past month

/finmind Compare 2330 and 2317 stock prices over the past three months

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.

Compare 2330 and 2317 stock prices over the past three months

Chip / Institutional Data

/finmind 2330 institutional investors trading over the past week

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

2330 institutional investors trading over the past week

/finmind TSMC foreign investor shareholding ratio history

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

TSMC foreign investor shareholding ratio history

Fundamentals

/finmind TSMC monthly revenue this year

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

TSMC monthly revenue this year

/finmind 2330 PER trend over the past five years

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

/finmind TAIEX near-month futures contract weekly trading info

Expected result: returns daily open/high/low/close, volume, and open interest for TAIEX futures (TX) over the past week.

TAIEX near-month futures contract weekly trading info

/finmind TAIEX options institutional investors trading today

Expected result: returns today's long/short trading volumes (in contracts) and amounts by the three institutional investors for TAIEX options (TXO).

Macroeconomy

/finmind USD/TWD exchange rate trend over the past six months

Expected result: returns daily spot buy/sell USD/TWD exchange rates over the past six months.

USD/TWD exchange rate trend over the past six months

/finmind Federal Reserve interest rate changes over the past ten years

Expected result: returns the Fed's historical interest rate adjustment records over the past ten years.

/finmind Gold price trend over the past year

Expected result: returns daily gold prices over the past year.

Charts

/finmind TSMC candlestick chart for the past three months

Expected result: generates a candlestick chart for TSMC over the past three months, including OHLC, moving averages, and volume, saved as an image file.

TSMC 2330 Candlestick Chart

/finmind Compare 2330 and 2317 stock prices over the past six months, plot a chart

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

2330 vs 2317 Stock Comparison

/finmind USD exchange rate trend chart for the past year

Expected result: generates a USD/TWD exchange rate line chart, saved as an image file.

Advanced Analysis

/finmind Compare TSMC and MediaTek stock returns over the past year

Expected result: calculates the cumulative return rates of both stocks over the past year and presents the comparison in a table or chart.

/finmind 2330 dividend policy summary for the past three years

Expected result: summarizes TSMC's cash dividends, stock dividends, ex-dividend dates, and payment dates for the past three years.

/finmind TAIEX index every-5-second trend today

Expected result: returns the TAIEX weighted index value every 5 seconds for today, showing the intraday trend.