← 返回 Skills 市场
jickchen34

功夫财经

作者 jickchen34 · GitHub ↗ · v0.4.1 · MIT-0
cross-platform ✓ 安全检测通过
218
总下载
1
收藏
0
当前安装
14
版本数
在 OpenClaw 中安装
/install kungfu-finance
功能描述
Mainland China A-share stock and sector analysis tool (中国A股个股与板块分析). Current repo build focuses on stable deterministic products for stock snapshots, basic f...
使用说明 (SKILL.md)

功夫财经 | KungfuFinance

Publisher

Runtime Model

  • Local runtime: Node.js .mjs scripts (bundled executable scripts with zero npm dependencies — no npm install needed)
  • Outbound APIs:
    • https://tianshan-api.kungfu-trader.com — deterministic products (snapshot, finance, bucket, strategy, researcher, bayesian monitor)
    • https://push2.eastmoney.com / https://push2his.eastmoney.com — stock/sector deep research market data (free public API, no key required)
    • https://ifzq.gtimg.cn / https://qt.gtimg.cn — fallback market data via Tencent Finance (free public API, no key required)
    • https://wry-manatee-359.convex.site / https://clawhub.ai — check-update version query (ClawHub registry, public, no key required)
  • Authentication: KUNGFU_OPENKEY environment variable, sent as Authorization: Bearer \x3Ctoken> (Tianshan API only; EastMoney/Tencent/ClawHub APIs require no authentication)
  • Platform header: KUNGFU_PLATFORM (optional, defaults to openclaw)
  • File I/O: reads bundled assets; indicator-chart flow writes SVG/PNG to ~/.openclaw/workspace/finance-master/charts/
  • Subprocesses: indicator-chart flow invokes inkscape for SVG→PNG conversion; no other subprocesses

All environment variables are read from the host process; none are accepted from user prompts.

Optional Research Search Surface

When separately configured, stock/sector deep research may call an additional search endpoint. This surface is independent from the Tianshan API and uses its own credential boundary:

Env Var Purpose
KUNGFU_ENABLE_RESEARCH_SEARCH Set to 1 to enable
KUNGFU_RESEARCH_SEARCH_PROVIDER Provider name (currently web_search)
KUNGFU_RESEARCH_SEARCH_ENDPOINT Search service URL
KUNGFU_RESEARCH_SEARCH_API_KEY Search service credential
KUNGFU_RESEARCH_SEARCH_TIMEOUT_MS Search request timeout (default: 15000)

When search is enabled, requests are POSTed as JSON to KUNGFU_RESEARCH_SEARCH_ENDPOINT with KUNGFU_RESEARCH_SEARCH_API_KEY as Bearer token. KUNGFU_OPENKEY is never reused for search requests. If search is enabled but misconfigured, the result returns misconfigured status instead of silently failing.

Non-Secret Tuning Variables

Env Var Purpose
KUNGFU_ENABLE_EXPERIMENTAL_PRODUCTS Set to 1 to enable unreleased products
KUNGFU_RESEARCH_DEFAULT_TARGET_DATE Override default research date (YYYYMMDD format, for testing)

Rollout Status

  • Deterministic products (snapshot, finance, bucket, strategy, researcher, bayesian monitor) use revalidated Tianshan backend routes
  • Preview stock-research / sector-research use public EastMoney/Tencent APIs for market data — no backend dependency for these flows
  • Experimental products require KUNGFU_ENABLE_EXPERIMENTAL_PRODUCTS=1
  • Preview stock-research / sector-research produce markdown_svg_preview with explicit degradation reporting

Data Handling & Network Surface

  • KUNGFU_OPENKEY is sent only to tianshan-api.kungfu-trader.com — never to EastMoney, Tencent, or any other host
  • EastMoney and Tencent Finance APIs are public and require no authentication
  • The code contacts no other hosts beyond those listed in the Runtime Model table above
  • Do not use this skill with secrets, personal data, or other sensitive user content

Scope

  • Mainland China A-shares only
  • Direct market-data lookup stays within one stock or one sector
  • No arbitrary whole-market screening
  • Not for US stocks
  • Not for Hong Kong stocks
  • Not for cryptocurrencies
  • Not for futures or forex
  • No free-form SQL
  • No user-facing base URL
  • No user-facing runtime credential parameters

Public Intents

Route the user into the currently enabled intent families below. Do not expose internal product names unless needed for implementation.

1. Stock Snapshot

Use when the user wants one A-share stock's current state, recent走势, K-line window, holders,筹码分布,支撑压力位, or other narrow deterministic data.

Default behavior:

  • Prefer the narrowest data product that answers the question
  • If the stock code is unknown, prefer instrument_name
  • If code mode is used, exchange_id must be SSE or SZE

2. Finance Analysis

Use when the user wants one A-share stock's基础财务指标或基础财务上下文。

Default behavior:

  • Prefer finance_basic_indicators for narrow factual questions
  • Prefer finance_context for lightweight finance context

3. Sector Analysis

Use when the user asks about one A-share industry or sector.

Default behavior:

  • deterministic sector detail products may still use sector_name
  • fuzzy sector resolution is not exposed as a standalone public product, but sector-research resolves theme words by matching against the full EastMoney concept sector list
  • preview sector-research accepts sector_name or sector_id directly; when the local resolver cannot disambiguate, it returns needs_input for the user to provide a BK code

3C. Sector Deep Research

Use when the user wants one A-share sector's deep research, hype-cycle view, thematic thesis, dragon-head observation, committee-style bull/bear review, or a longer structured report.

Default behavior:

  • current runtime only supports one mainland China A-share sector per invocation
  • the preview path accepts sector_name or sector_id; target_date is optional and defaults to the current market date in Asia/Shanghai
  • the current version is markdown_svg_preview and returns explicit degradations for remaining search / adapter gaps
  • the result surface now also exposes the migrated orchestration contract from the original sector-analysis skill
  • the result surface now includes report_svg and quality_gate
  • structured inputs now use public EastMoney APIs: concept sector list resolution, sector constituents, sector index K-line, and per-leader stock quotes and money flow
  • the sector resolver matches user input against the full EastMoney concept sector list; if ambiguous, returns needs_input for the user to provide a BK code
  • when the separate web_search runtime is enabled and configured, macro / policy / catalyst / industry-trend / competition / money-flow evidence may be attached as external search evidence (7 search buckets)
  • otherwise the report must surface missing search evidence as degraded coverage instead of silently inventing facts

3B. Stock Deep Research

Use when the user wants one A-share stock's deep research, investment thesis, catalyst map, committee-style bull/bear review, or a longer structured report.

Default behavior:

  • current runtime only supports one mainland China A-share stock per invocation
  • the preview path accepts optional target_date and defaults it to the current market date in Asia/Shanghai
  • the current version is markdown_svg_preview and returns explicit degradations for remaining search / adapter gaps
  • the result surface now also exposes the migrated orchestration contract from the original stock-analysis-v2 skill
  • the result surface now includes report_svg and quality_gate
  • structured market data now comes from public EastMoney APIs: real-time quote, daily K-line, real weekly K-line (klt=102, not aggregated from daily), and 20-day money flow; Tencent Finance APIs serve as fallback
  • financial statements, company profile, and other non-market data are sourced from web search (8 search buckets: macro, catalyst, risk, competition, financials, company profile, governance, sector trend)
  • when the separate web_search runtime is enabled and configured, these evidence buckets are populated; otherwise the report surfaces explicit degradations

4. Bucket Flow

Use when the user wants to:

  • view current-user buckets
  • choose one existing bucket
  • add one or more instruments into that bucket

Default behavior:

  • only operate on the current authenticated user's own buckets
  • do not create or delete buckets in the current release build
  • when adding a batch, resolve instruments first and filter invalid ones before writing
  • when required information is missing or ambiguous, return a structured needs_input response so the host can continue the dialogue
  • if all inputs are invalid, return needs_input for corrected instruments instead of calling the write API

5. Strategy Flow

Use when the user wants to:

  • view public strategies
  • view public strategies by market mode
  • view current-user private strategies
  • query one public or private strategy on one stock
  • query one public or private select strategy's whole-market picks for one day or one date range
  • count buy signals for one stock across eligible public paid strategies
  • batch scan one public paid strategy across multiple stocks

Default behavior:

  • strategy module requires runtime auth even when listing public strategies
  • public and private strategies both support single-strategy query
  • public and private select strategies both support controlled whole-market result query
  • private strategies do not support first-stage batch scan
  • batch scan only supports public strategies with non-empty lago_plan
  • market-select supports InstrumentSelect, TemplateInstrumentSelect, BuySell, and TemplateBuySell
  • when market-select is used on BuySell or TemplateBuySell, whole-market results only return buy points
  • market-select accepts either target_date, or strategy_start_date + strategy_end_date
  • if market-select mixes the two date modes, or only provides half of a range, return a structured needs_input response
  • when strategy selector or stock input is missing or ambiguous, return a structured needs_input response so the host can continue the dialogue
  • when the selected public paid strategy lacks permission for batch scan, return a structured blocked response instead of pretending the scan succeeded

6. Researcher Flow

Use when the user wants to:

  • view top researchers by score
  • view one stock's covered researchers together with report titles
  • view one researcher's reports

Default behavior:

  • researcher module requires runtime auth
  • researcher backend also enforces Journeyman membership or above
  • stock-reports is a composed flow built from researcher score plus researcher report list
  • author-reports prefers researcher-author-id
  • if the user only gives researcher-name, resolve it conservatively; if not unique, return needs_input
  • do not pretend the backend supports direct global researcher-name search if it does not

7. Bayesian Monitor Flow

Use when the user wants to:

  • view current-user bayesian monitor tasks
  • choose one existing bayesian monitor task
  • inspect that task's initial report and recent monitor records

Default behavior:

  • bayesian monitor module requires runtime auth
  • only operate on the current authenticated user's own tasks
  • current release build is read-only: do not create, delete, or run bayesian monitor tasks
  • list returns task summaries only and must not expose full original_report
  • reports supports bayesian-task-id and conservative bayesian-topic resolution
  • when task selector is missing or ambiguous, return a structured needs_input response so the host can continue the dialogue
  • when the current user has no tasks, return a structured blocked response instead of pretending the task exists

8. Indicator Chart

Use when the user wants to see one A-share stock's technical indicator chart. The script automatically renders SVG, converts to PNG via inkscape, and returns file paths (no SVG text in stdout). Supported chart types:

  • kline — K线图 (candlestick chart with optional chip distribution overlay, price level lines, and custom annotations)
  • lushan_shadow — 庐山照影图 (CM mountain + FC shadow dual-bar chart)
  • lushan_4season — 庐山四季图 (GG/HY/DP lines + RS bars + bottom resonance/strong markers)
  • shuanglun — 双轮驱动图 (K-wheel + R-wheel stacked bars with trend coloring)
  • liumai — 六脉神剑图 (6-signal heatmap matrix with buy/sell signal row)
  • smart_money — 聪明钱图 (smart money vs follow money dual-line chart)
  • finance_score — 个股综合得分 (radar chart with 行业统治力/财务健康度/发展前景 three-dimensional scoring)

K-line chart additional options:

  • --with-chip-peak true — overlay chip distribution (筹码峰) on the right side
  • --with-price-levels true — draw support/resistance/concentration price level lines (阻力位/支撑位)
  • --annotations '[{"date":"20260328","price":15.5,"type":"buy","label":"买入点","color":"#ef4444"}]' — mark custom points on the chart

9. Finance Score

Use when the user wants one A-share stock's comprehensive scoring across three dimensions:

  • 行业统治力 (Industry Dominance) — scored 0-5 with S/A/B/C/D/E grade
  • 财务健康度 (Financial Health) — scored 0-5 with S/A/B/C/D/E grade
  • 发展前景 (Growth Potential) — scored 0-5 with S/A/B/C/D/E grade
  • 综合得分 (Total Score) — 0-15

Available as both a data product (finance_score) and a rendered SVG chart (indicator-chart --chart-type finance_score).

10. Subscription Flow (自选)

Use when the user wants to:

  • view current-user subscribed instruments (自选列表)
  • add instruments to subscription (加自选)
  • remove instruments from subscription (删自选)
  • view anomaly report for one subscribed instrument (异动报告)
  • view aggregate anomaly summary (异动汇总)

Default behavior:

  • only operate on the current authenticated user's own subscriptions
  • when adding, resolve instrument names first and skip invalid or duplicate entries
  • list groups subscriptions by instrument and shows instrument name, code, auto-update status
  • anomaly returns unusual movements sorted by date descending, plus signals count and analysis
  • summary returns aggregate UM_ct (异动数量) and UM_SG_ct (异动信号) counts
  • when required information is missing, return a structured needs_input response

Not Yet Enabled In Experience Build

The following capabilities are still under route-contract cleanup and should not be used in the current public rollout:

  • full finance-analysis bundles
  • money flow
  • fuzzy sector resolution / similar sectors
  • market news lookup
  • standalone fuzzy sector resolution as a separate public deterministic intent outside sector-research

Intent Routing

Pick one default route from the list below.

  • User asks "这只股票现在怎么样 / 最近走势 / 看看价格": Route to Stock Snapshot
  • User asks "分析财报 / 财务怎么样 / 估值怎么看": Route to Finance Analysis
  • User asks "分析白酒 / 算力 / 某个板块 / 某个概念": Route to Sector Analysis
  • User asks "给我做贵州茅台的深度研究 / 做一个投资论题 / 看催化剂和风险 / 写一份个股深度报告": Route to Stock Deep Research
  • User asks "看看我的票池 / 把这些股票加到票池里": Route to Bucket Flow
  • User asks "有哪些策略 / 看看我的私人策略 / 某个策略今天有没有买卖点 / 庐山升龙今天选了哪些股票 / 某个策略最近一周选股结果 / 用某个策略扫一组股票": Route to Strategy Flow
  • User asks "画一下贵州茅台的K线图 / 庐山照影 / 庐山四季 / 双轮驱动 / 六脉神剑 / 聪明钱 / 带筹码峰的K线 / 标注买卖点": Route to Indicator Chart
  • User asks "贵州茅台的综合得分 / 行业统治力 / 财务健康度 / 发展前景": Route to Finance Score
  • User asks "评分最高的研究员有哪些 / 某个股票有哪些研究员和研报 / 某个研究员写过哪些研报": Route to Researcher Flow
  • User asks "看看我的贝叶斯监控 / 某个贝叶斯监控任务的报告 / 某个主题最近的贝叶斯监控记录": Route to Bayesian Monitor Flow
  • User asks "功夫财经连接正常吗 / OpenKey 配置对吗 / health check / 检查配置": Route to Health Check
  • User asks "配置 OpenKey / 设置 OpenKey / 我的 key 是 kf_xxx": Route to Config OpenKey
  • User asks "看看我的自选 / 自选列表 / 我订阅了哪些股票": Route to Subscription Flow (action: list)
  • User asks "把贵州茅台加入自选 / 加自选 / 订阅这些标的": Route to Subscription Flow (action: add)
  • User asks "从自选中移除平安银行 / 取消订阅 / 删除自选": Route to Subscription Flow (action: delete)
  • User asks "贵州茅台有什么异动 / 查看异动 / 最近的异动报告": Route to Subscription Flow (action: anomaly)
  • User asks "自选整体异动情况 / 今天有多少异动 / 异动汇总": Route to Subscription Flow (action: summary)
  • User asks "功夫财经有更新吗 / 检查更新 / check update / 升级 skill": Route to Check Update

If the user asks for arbitrary whole-market screening or market-news bundles, do not use this skill in the current release build.

Input Rules

Stock Identification

For single-stock requests, use exactly one:

  • --instrument-name
  • --instrument-id and --exchange-id

Never mix both modes. If the stock code is unknown, prefer --instrument-name. When using code mode, --exchange-id must be SSE or SZE.

Stock Date Mode

For stock products and flows, use:

  • --target-date
  • optional --visual-days-len

Strategy Date Mode

For strategy actions, use:

  • signal and count: --target-date with optional --visual-days-len
  • batch-scan: --target-date
  • market-select: either --target-date, or --strategy-start-date plus --strategy-end-date

Never mix single-day mode and range mode in the same market-select request.

Sector Mode

  • For sector detail products, use exactly one:
    • --sector-name
    • --sector-id

Prefer --sector-name. Only reuse --sector-id after the backend has already returned it. The current release build does not expose fuzzy sector resolution as a standalone public data product, but sector-research can resolve theme words via the EastMoney concept sector list.

Hidden Parameters

Do not generate or expose these from the model side:

  • start_date
  • end_date
  • is_realtime
  • limit
  • days
  • periods

Internal Building Blocks

The internal deterministic product contract lives here:

Use that file only when you need exact internal product names, allowed parameter shapes, or output keys. Do not dump that whole catalog into the user-facing reasoning path by default.

Bucket flow contract lives here:

Strategy flow contract lives here:

Researcher flow contract lives here:

Bayesian monitor flow contract lives here:

Research Methodologies

Documented research methods live here:

Use them as methodology references and migration inputs for deep research. The repo build currently has preview CLI/runtime entrypoints via stock-research and sector-research. The sector preview accepts sector_name first and uses best-effort EastMoney concept list resolution before falling back to needs_input. Read runtime_parity.md before treating any research wrapper or asset as implementation-ready truth.

Prompt assets are flow-specific. Do not mix finance-analysis formatting requirements into movement-analysis outputs, or vice versa.

Standard Commands

Stock Snapshot

node scripts/flows/run_data_request.mjs --product price_snapshot --instrument-name 贵州茅台 --target-date 20260301

Sector Detail

node scripts/flows/run_data_request.mjs --product sector_performance --sector-name 白酒 --target-date 20260301

Bucket List

node scripts/router/run_router.mjs bucket --bucket-action list

Bucket Add

node scripts/router/run_router.mjs bucket --bucket-action add --bucket-name 观察池 --bucket-instrument 贵州茅台 --bucket-instrument 平安银行

Strategy List

node scripts/router/run_router.mjs strategy --strategy-action list

Strategy Signal

node scripts/router/run_router.mjs strategy --strategy-action signal --strategy-name 三分归元 --instrument-name 贵州茅台 --target-date 20260331 --visual-days-len 22

Strategy Batch Scan

node scripts/router/run_router.mjs strategy --strategy-action batch-scan --strategy-id 900 --strategy-instrument 600519.SSE --strategy-instrument 000001.SZE --target-date 20260331

Strategy Market Select

node scripts/router/run_router.mjs strategy --strategy-action market-select --strategy-name 庐山升龙 --target-date 20260331

Stock Deep Research

node scripts/router/run_router.mjs stock-research --instrument-name 贵州茅台 --target-date 20260331 --visual-days-len 120

Sector Deep Research

node scripts/router/run_router.mjs sector-research --sector-name 机器人 --target-date 20260331 --visual-days-len 780

Indicator Chart — K-line

node scripts/router/run_router.mjs indicator-chart --chart-type kline --instrument-name 贵州茅台 --target-date 20260331 --visual-days-len 120

Indicator Chart — K-line with Chip Peak and Price Levels

node scripts/router/run_router.mjs indicator-chart --chart-type kline --instrument-name 贵州茅台 --target-date 20260331 --visual-days-len 120 --with-chip-peak true --with-price-levels true

Indicator Chart — K-line with Annotations

node scripts/router/run_router.mjs indicator-chart --chart-type kline --instrument-name 贵州茅台 --target-date 20260331 --visual-days-len 60 --annotations '[{"date":"20260310","type":"buy","label":"买入"},{"date":"20260325","type":"sell","label":"卖出"}]'

Indicator Chart — 庐山照影图

node scripts/router/run_router.mjs indicator-chart --chart-type lushan_shadow --instrument-name 贵州茅台 --target-date 20260331 --visual-days-len 120

Indicator Chart — 庐山四季图

node scripts/router/run_router.mjs indicator-chart --chart-type lushan_4season --instrument-name 贵州茅台 --target-date 20260331 --visual-days-len 120

Indicator Chart — 双轮驱动图

node scripts/router/run_router.mjs indicator-chart --chart-type shuanglun --instrument-name 贵州茅台 --target-date 20260331 --visual-days-len 120

Indicator Chart — 六脉神剑图

node scripts/router/run_router.mjs indicator-chart --chart-type liumai --instrument-name 贵州茅台 --target-date 20260331 --visual-days-len 120

Indicator Chart — 聪明钱图

node scripts/router/run_router.mjs indicator-chart --chart-type smart_money --instrument-name 贵州茅台 --target-date 20260331 --visual-days-len 120

Finance Score (data only)

node scripts/flows/run_data_request.mjs --product finance_score --instrument-name 贵州茅台 --target-date 20260331

Finance Score (SVG radar chart)

node scripts/router/run_router.mjs indicator-chart --chart-type finance_score --instrument-name 贵州茅台 --target-date 20260331

Researcher Rank

node scripts/router/run_router.mjs researcher --researcher-action rank --researcher-rank-by 1m --researcher-limit 10

Researcher Stock Reports

node scripts/router/run_router.mjs researcher --researcher-action stock-reports --instrument-name 贵州茅台

Researcher Author Reports

node scripts/router/run_router.mjs researcher --researcher-action author-reports --researcher-author-id author-1

Health Check

node scripts/router/run_router.mjs health

Returns { healthy: true/false, checks: { openkey, api_test } }. Verifies KUNGFU_OPENKEY is set and authenticates against the backend.

Config OpenKey

node scripts/router/run_router.mjs config-openkey --openkey kf_ok_live_xxxxx

Validates the key against the backend, then writes it to ~/.openclaw/.env. Returns user_id and plan_code on success.

Subscription List (自选列表)

node scripts/router/run_router.mjs subscription --subscription-action list

Subscription Add (加自选)

node scripts/router/run_router.mjs subscription --subscription-action add --subscription-instrument 贵州茅台 --subscription-instrument 平安银行

Subscription Delete (删自选)

node scripts/router/run_router.mjs subscription --subscription-action delete --subscription-instrument 贵州茅台

Subscription Anomaly Report (异动报告)

node scripts/router/run_router.mjs subscription --subscription-action anomaly --instrument-name 贵州茅台 --target-date 20260401

Subscription Summary (异动汇总)

node scripts/router/run_router.mjs subscription --subscription-action summary

Check Update

node scripts/router/run_router.mjs check-update

Checks ClawHub registry for a newer version. Returns { update_available, local_version, remote_version, update_command }. When an update is available, the agent should run the returned update_command (clawhub update kungfu-finance) in a shell to apply it.

安全使用建议
This skill appears coherent with its description: it runs local Node scripts, calls the listed market-data hosts, and requires a single API key (KUNGFU_OPENKEY) to talk to the publisher's backend. Before installing or using it, consider: - Trust the operator: KUNGFU_OPENKEY is sent to tianshan-api.kungfu-trader.com (the publisher) — only install if you trust that service and its handling of your token. - Token persistence: the config-openkey command will write your key to ~/.openclaw/.env (plaintext). If you prefer not to persist the key, set KUNGFU_OPENKEY only in the process environment and avoid running the config write flow. - Least privilege: treat KUNGFU_OPENKEY as a scoped API token; if possible, issue a key with limited scope and rotate it if you stop using the skill. - Network hosts: the skill documents all outbound hosts (Tianshan, EastMoney, Tencent, ClawHub/Convex update checks). Review these if you have network policy concerns. - Local files: charts are written to ~/.openclaw/workspace/finance-master/charts/; ensure you’re comfortable with that location and disk writes. - Subprocess risk: inkscape is invoked with execFileSync and fixed arguments (no shell interpolation), which reduces injection risk; still audit if you plan to enable PNG conversion. If you want higher assurance, review scripts/core/http_client.mjs and the run_config_openkey_flow/run_health_flow implementations referenced in SKILL.md to confirm exactly how the key is validated and written.
功能分析
Type: OpenClaw Skill Name: kungfu-finance Version: 0.4.1 The kungfu_finance skill is a comprehensive financial analysis tool for mainland China A-shares, providing stock snapshots, technical charts, and deep research reports. It interacts with several legitimate financial data APIs (EastMoney, Tencent) and its own backend (tianshan-api.kungfu-trader.com). While it performs sensitive actions such as writing API keys to a local config file (~/.openclaw/.env) and invoking a subprocess (Inkscape) for image conversion, these behaviors are clearly documented and aligned with the tool's stated functionality. The use of execFileSync in scripts/flows/charts/svg_to_png.mjs with fixed arguments mitigates shell injection risks, and the network surface is well-defined. A minor obfuscation technique is used to import the child_process module, likely to bypass static analysis filters, but no malicious intent was found.
能力评估
Purpose & Capability
Name/description align with the included .mjs scripts and prompt assets. Required binary (node) and a single API credential (KUNGFU_OPENKEY) are appropriate for a local Node.js wrapper that calls the publisher's Tianshan API and public market-data endpoints (EastMoney/Tencent). Declared network endpoints match the described finance use cases.
Instruction Scope
The SKILL.md instructions are narrowly scoped to finance products and rendering flows. Notable runtime actions: reads host env vars, posts the KUNGFU_OPENKEY as a Bearer token to the publisher's tianshan-api host, writes SVG/PNG charts to ~/.openclaw/workspace/finance-master/charts/, and offers a config-openkey command that writes the key to ~/.openclaw/.env. These behaviors are documented in SKILL.md and consistent with the stated features, but the config write means the token may be persisted on disk.
Install Mechanism
No external download/install spec is used; the package contains bundled Node .mjs scripts and claims zero npm dependencies (bundled runtime). This is lower risk than remote downloads. Optional use of inkscape is local and invoked with execFileSync (no shell).
Credentials
Only one required secret env var (KUNGFU_OPENKEY) is declared and used for authenticating to the publisher's Tianshan API — this is proportionate to the stated purpose. There are additional optional env vars for an independent search provider (separate credential boundary), which are documented and gated by KUNGFU_ENABLE_RESEARCH_SEARCH. Caveat: the skill may persist KUNGFU_OPENKEY to ~/.openclaw/.env via config-openkey, so users should know the token will be stored on disk if they run that flow.
Persistence & Privilege
always:false and normal autonomous invocation settings. The skill writes only to its own workspace and a per-user .env file; it does not request system‑wide privileges or modify other skills' configs. Subprocess invocation (inkscape) is limited to fixed args for SVG→PNG conversion.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install kungfu-finance
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /kungfu-finance 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.4.1
Add subscription (自选) flow: list/add/delete subscribed instruments, anomaly reports, and aggregate summary
v0.4.0
Version 0.4.0 – Adds update check feature for ClawHub registry - Introduced scripts to query and display current version info via ClawHub and Convex check-update registry endpoints. - Expanded network surface to include clawhub.ai and convex.site for update/version checking. - Updated documentation to reflect new version check capability and related endpoints. - No changes to existing stock or sector analysis functionality.
v0.3.3
kungfu-finance 0.3.3 - Added a new script: scripts/flows/charts/svg_to_png.mjs for SVG to PNG chart conversion. - Updated the run_health_flow.mjs script to leverage the new SVG to PNG utility for chart-related health flows. - Modified package.json to include and expose the new chart conversion capability in bundled scripts.
v0.3.2
kungfu-finance v0.3.2 - Improved the SVG to PNG chart conversion script for greater stability. - Enhanced the indicator chart flow to better support output handling. - Updated dependencies and metadata in package.json for compatibility. - No changes to published APIs or user intent routing.
v0.3.1
kungfu-finance v0.3.1 - Added SVG to PNG chart conversion script (`scripts/flows/charts/svg_to_png.mjs`). - Updated indicator chart flow to support SVG to PNG conversion. - Refreshed documentation and metadata for new chart capabilities. - No external dependencies or APIs changed.
v0.3.0
Version 0.3.0 of kungfu-finance - Added a new flow for configuring the OpenKey (`run_config_openkey_flow.mjs`) - Updated subprocess/bin usage: clarified that Inkscape is now an optional dependency (for SVG→PNG conversion) - Enhanced metadata: skill now documents specific file writes and subprocess invocation patterns - Improved documentation and runtime clarity in SKILL.md and README - Internal flow and routing scripts updated for new config flow and tightened file/environment handling
v0.2.2
kungfu-finance v0.2.2 - Added indicator chart rendering flow, supporting SVG/PNG output to local workspace directory. - Indicator-chart flow now invokes the system's Inkscape tool for SVG to PNG conversion. - Updated runtime model: chart flow writes files; subprocesses section details new dependency on Inkscape. - Minor documentation and implementation updates for improved clarity and feature tracking.
v0.2.1
kungfu-finance 0.2.1 - Improved error catching in indicator chart flow to surface EastMoney adapter failures explicitly, preventing silent crashes. - Updated indicator chart flow to print specific error reasons and partial results from EastMoney when adaptation fails. - No changes to public interfaces or intent structure.
v0.2.0
Add indicator chart flow (K-line, Lushan Shadow, Lushan 4-Season, Shuanglun, Liumai, Smart Money) with chip peak, price level, and annotation overlays; add finance score data product and radar chart
v0.1.7
Fix OpenClaw suspicious flag: declare bundledScripts in metadata, add publisher/operator info, declare complete network surface (5 hosts), add network audit instructions in README.
v0.1.6
Stock/sector research migrated from Tianshan backend to public EastMoney/Tencent APIs. Fixed static analysis warning (env+fetch separation). Real weekly K-lines, 8 search buckets, money flow from public API.
v0.1.5
Fix OpenClaw security scan: declare KUNGFU_OPENKEY in metadata requires.env and primaryEnv; add install.node.packageManager:none; document all env vars including optional research search surface; restructure SKILL.md runtime model; align agents/openai.yaml with current rollout; re-include README.md in published bundle; add stock-research and sector-research preview runtimes
v0.1.4
kungfu-finance 0.1.4 - Expanded strategy flow: select or buy-sell strategies now support controlled whole-market result queries, with buy points available for whole-market queries on BuySell/TemplateBuySell strategies. - Updated documentation to clarify strategy flow capabilities and intent routing. - Minor updates to improve contract clarity and public product descriptions. - Internal schema and flow script adjustments to align with the updated contract.
v0.1.3
kungfu-finance 0.1.3 - Clarified product scope and intent routing in the SKILL.md, specifying stable public features and usage boundaries. - Outlined detailed guidance for key flows: stock snapshot, finance and sector analysis, bucket management, strategy usage, researcher, and bayesian monitor. - Added rollout notes specifying which capabilities are released vs. experimental. - Documented strict runtime authentication, data boundaries, and latency-sensitive usage. - Updated usage, error handling, and async research guidance for consistent host integration.
元数据
Slug kungfu-finance
版本 0.4.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 14
常见问题

功夫财经 是什么?

Mainland China A-share stock and sector analysis tool (中国A股个股与板块分析). Current repo build focuses on stable deterministic products for stock snapshots, basic f... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 218 次。

如何安装 功夫财经?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install kungfu-finance」即可一键安装,无需额外配置。

功夫财经 是免费的吗?

是的,功夫财经 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

功夫财经 支持哪些平台?

功夫财经 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 功夫财经?

由 jickchen34(@jickchen34)开发并维护,当前版本 v0.4.1。

💬 留言讨论