Margin Credit

Provides margin financing (两融) and credit account information: queries, rule interpretation, operation guidance, and risk handling (from account opening to t...

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 29 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The skill is described as a margin/credit QA helper and its script calls a margin-credit hiAgentChat API at aigctest.gf.com.cn using a Cookie for auth. Requesting GF_AGENT_COOKIE is consistent with that purpose.
Instruction Scope
SKILL.md limits what is passed to the tool (only the user's question) and the script follows that: it only reads the question and GF_AGENT_COOKIE, posts to the documented endpoint, and outputs the API 'answer' field. The instructions do not ask the agent to read unrelated files or environment variables.
Install Mechanism
No install spec; the skill is instruction-only with a small JS script. Nothing is downloaded or written to disk beyond the included script.
Credentials
The single required env var (GF_AGENT_COOKIE) is necessary to authenticate to the documented hiAgentChat endpoint, so its presence is proportionate. Caveat: a full browser Cookie can grant broad access to the gf.com.cn account/session, so users should treat it as highly sensitive, avoid reusing long-lived account cookies, and prefer scoped credentials if available.
Persistence & Privilege
The skill does not request 'always' presence, does not modify other skills or system configs, and does not persist credentials itself.
Assessment
This skill appears coherent and simply forwards the user's question to a GF hiAgentChat SSE API using GF_AGENT_COOKIE for auth. Before installing: confirm you trust the skill author and the endpoint domain (aigctest.gf.com.cn); treat GF_AGENT_COOKIE as highly sensitive (it is a full browser cookie and could enable other actions on that domain), do not commit it to source control, and rotate or use short-lived/scoped creds if possible. If you are uncomfortable providing a full browser cookie, do not install/use the skill. The code is readable and does not attempt to read other files or exfiltrate additional data beyond sending the question to the documented endpoint.
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
latestvk970kdkt0sgwsqsyzhxwt4rk6d8313m9

License

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

Runtime requirements

EnvGF_AGENT_COOKIE
Primary envGF_AGENT_COOKIE

SKILL.md

Margin & Credit (智享两融)

Margin financing (两融) and credit account: information query, rule interpretation, operation guidance, and risk handling. Covers the full cycle from account opening to trading and risk control.

Quick start

When the user asks about margin/credit (融资、融券、两融、信用账户、担保品、维持担保比例、追保、平仓、展期、授信、折算率、融资利率、卖券还款、融资打新、集中度、杠杆、信用评级、标的证券、转融通):

  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 reply content to present 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 (same as investment-analysis). 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 输出接口返回的 answer 拼接结果

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

Ability boundary and skill coordination

  • This skill: Margin financing (两融), credit account, collateral, maintenance margin ratio, margin call, liquidation, extension, credit line, conversion rate, margin rate, sell-to-repay, margin IPO, concentration, leverage, credit rating, underlying securities, securities lending. Use when the query contains these or related terms.
  • Not this skill: Pure market/index/stock trend or “is this stock worth buying.” For those, use investment-analysis.
  • Overlap: If the user asks both margin/credit and market questions, use this skill first for 两融/信用, then investment-analysis for market/trend if needed.

Output

The script returns the reply 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 (agentId=mfis2agent), request body, and response parsing (answer only), see references/api.md.

Files

4 total
Select a file
Select a file to preview.

Comments

Loading comments…