Investment Analysis

Provides A-share market and stock analysis (index, individual stock trend, buy/sell view) via GF hiAgentChat API. Use when the user asks about 今日大盘、大盘走势、个股走势...

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 28 · 2 current installs · 2 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The skill is an adapter for the GF hiAgentChat API and only requires GF_AGENT_COOKIE to authenticate; that credential is coherent with the described purpose of calling a gated API for market analysis.
Instruction Scope
SKILL.md explicitly limits input to the user's question and forbids passing user/session metadata. The script implements that: it only reads the question argument and GF_AGENT_COOKIE and sends those to the API. It does not read other files or environment variables.
Install Mechanism
No install spec or external downloads; the skill is instruction-only with a single Node script included. This is low-risk and proportionate for its function.
Credentials
Only GF_AGENT_COOKIE is required (declared as primaryEnv). That single sensitive value is justified by the need to authenticate to the GF hiAgentChat endpoint; no unrelated secrets or multiple credentials are requested.
Persistence & Privilege
The skill does not request always:true, does not modify other skills, and has no install-time hooks. Autonomous invocation is allowed (platform default) and appropriate for this integration.
Assessment
This skill calls a GF test/prod API and requires you to provide a browser session cookie (GF_AGENT_COOKIE). A few practical notes before installing: (1) Cookies are sensitive — do not share or commit them into repos; prefer an official API key if available. (2) Verify you trust the domain (aigctest.gf.com.cn / gf.com.cn) and the skill author before supplying a session cookie. (3) The script will send only the question text and the cookie to the remote API; it does not send user IDs or local files. (4) Because the credential is a full session cookie, consider using a scoped/limited token or a throwaway account if you are unsure. (5) If you need higher assurance, review the script (scripts/chat.mjs) yourself or run it in an isolated environment. Overall the skill appears internally consistent and proportional to its stated purpose.
scripts/chat.mjs:23
Environment variable access combined with network send.
Confirmed safe by external scanners
Static analysis detected API credential-access patterns, but both VirusTotal and OpenClaw confirmed this skill is safe. These patterns are common in legitimate API integration skills.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk97emqykk7er8vn7c9z5sqvc2d830bbk

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

EnvGF_AGENT_COOKIE
Primary envGF_AGENT_COOKIE

SKILL.md

Investment Analysis (投资分析)

A-share market and stock analysis via GF hiAgentChat API. Use for questions about index, individual stock trend, and simple buy/sell views.

Quick start

When the user asks about market (大盘), a stock’s trend (走势), or whether a stock is worth buying (值得买吗):

  1. Read this skill and ensure GF_AGENT_COOKIE is configured.
  2. Invoke the script with only the user’s question as the argument (no user info, session, or channel context).
  3. Use the script stdout as the analysis result to reply or summarize.

Invocation

Only pass the user’s question text. Do not pass user ID, sender, session, or any unrelated context.

node {baseDir}/scripts/chat.mjs "用户问题"

Examples:

node {baseDir}/scripts/chat.mjs "今日大盘"
node {baseDir}/scripts/chat.mjs "宁德时代走势"
node {baseDir}/scripts/chat.mjs "宁德时代怎么样"
node {baseDir}/scripts/chat.mjs "某股值得买吗"

If the question contains spaces, pass it as a single quoted argument.

Configuration

  • GF_AGENT_COOKIE (required): Cookie string for hiAgentChat API auth (e.g. LtpaToken2=...; oauth_token=...). Set in environment; do not hardcode. Do not commit to repo.
  • Node 18+ (for fetch).

Testing

From the skill base dir (or with absolute path to the script):

# 1. 无 Cookie 时应报错
node scripts/chat.mjs "今日大盘"
# → Missing GF_AGENT_COOKIE (exit 1)

# 2. 配置 Cookie 后请求(把 <your-cookie> 换成真实 Cookie)
GF_AGENT_COOKIE="<your-cookie>" node scripts/chat.mjs "今日大盘"
# → 正常时在 stdout 输出接口返回的 rich_text 拼接结果

Cookie 可从浏览器登录 aigctest.gf.com.cn 后,在开发者工具 → Network → 选 hiAgentChat 请求 → Headers → Cookie 复制。

Ability boundary and skill coordination

  • This skill: A-share index/individual stock market, trend, and simple buy/sell views (within what the API returns).
  • Not in scope: Macro reports, futures/forex, or general “search the web for news.” For those, use generic search (e.g. tavily) or other skills.
  • Overlap: If the user asks both “market view” and “news,” use this skill first for market/trend, then optionally use search for news.

Output

The script returns the analysis as plain text on stdout. The API is SSE; the script buffers the stream and outputs once. If the platform later supports streaming tools, the script can be adapted to stream.

When the tool fails (do not retry in a loop)

If the script fails (e.g. Missing GF_AGENT_COOKIE, API error, or network error), its output will include a line containing "Do not retry".

  • Do NOT invoke the tool again for the same user request. Repeating the same failed command will not fix the issue and wastes turns.
  • Do report the failure to the user once: e.g. "投资分析暂时不可用(可能未配置 Cookie 或接口异常),请稍后再试或检查配置。" and optionally suggest checking GF_AGENT_COOKIE or trying again later.
  • If you see "Do not retry" in the tool output, treat the request as handled and do not call this skill again in this turn.

Additional resources

  • For API URL, request body, and response parsing (extendData.section.rich_text), see references/api.md.

Files

4 total
Select a file
Select a file to preview.

Comments

Loading comments…