← 返回 Skills 市场
mr-11even

Cn Security Code Resolver Openclaw Skill

作者 mr-11even · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
148
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install cn-security-code-resolver-openclaw-skill
功能描述
Resolve A-share stocks, ETFs, funds, and other mainland China securities from Chinese names into tradable codes using Eastmoney search. This skill should be...
使用说明 (SKILL.md)

CN Security Code Resolver

Overview

Resolve Chinese security names into exchange-tradable codes with a deterministic first pass and a verifiable fallback. Use the bundled script to query Eastmoney's public suggest API, then return the best match with enough metadata for confirmation.

When to use

Use this skill when the task involves any of the following:

  • Find the code for a Chinese stock, ETF, LOF, REIT, or fund from its Chinese name
  • Convert a portfolio/watchlist from names into tradable codes
  • Confirm whether an instrument is A-share, ETF/fund, or another mainland market type
  • Add exchange-aware identifiers such as 600938.SH, 510880.SH, or Eastmoney QuoteID

Do not use this skill for:

  • Real-time pricing or chart analysis
  • Hong Kong, US, futures, or crypto symbols unless the user explicitly wants cross-market results
  • Fundamental analysis beyond basic instrument identification

Workflow

1) Prefer the script first

Run the bundled resolver script:

python3 skills/cn-security-code-resolver/scripts/resolve_cn_security.py "中国海油"

Batch mode:

python3 skills/cn-security-code-resolver/scripts/resolve_cn_security.py "红利ETF华泰柏瑞" "苏美达" "中国海油" "海油发展" "中海油服"

2) Read the best match carefully

Prefer rows where:

  • Name exactly matches the queried Chinese name
  • SecurityTypeName matches user intent (沪A, 深A, 基金, etc.)
  • MarketType / QuoteID indicate mainland trading venue

For mainland cash equities and ETFs, map exchange suffixes as:

  • codes starting with 6, 5, or 9 → usually SH
  • codes starting with 0, 1, 2, or 3 → usually SZ

If the returned result is ambiguous, show the top 3 candidates and ask for confirmation instead of guessing.

3) Return a concise confirmation

Use this output shape when replying:

标的:中海油服
A股代码:601808
交易所:上交所
类型:沪A
标准代码:601808.SH
QuoteID:1.601808

4) When updating files

When writing portfolio JSON or other structured files, prefer storing both:

  • code: raw numeric code, e.g. 601808
  • exchangeSuffix: SH or SZ when it can be derived confidently

Optional enriched fields:

  • quoteId
  • securityTypeName
  • marketType
  • source: "eastmoney_suggest"

Verification guidance

If the first result looks suspicious:

  • Re-run with the exact full Chinese name from the broker/app
  • Inspect the top candidate list from the script
  • Cross-check with a browser search only when necessary

Good verification signals:

  • Exact Chinese name match
  • Expected category (for example ETF vs stock)
  • Price range and portfolio context are consistent with the instrument type

Bundled resources

Script

  • scripts/resolve_cn_security.py
    • Queries Eastmoney suggest API
    • Supports one or many names
    • Returns ranked JSON results with exchange hints

Reference

  • references/eastmoney-api.md
    • Documents the API endpoint, returned fields, and matching heuristics

Examples

python3 skills/cn-security-code-resolver/scripts/resolve_cn_security.py "苏美达"

Expected top result:

  • 600710 / 苏美达 / 沪A
python3 skills/cn-security-code-resolver/scripts/resolve_cn_security.py "红利ETF华泰柏瑞"

Expected top result:

  • 510880 / 红利ETF华泰柏瑞 / 基金
python3 skills/cn-security-code-resolver/scripts/resolve_cn_security.py "中海油服"

Expected top result:

  • 601808 / 中海油服 / 沪A
  • If other markets also appear elsewhere, prefer A-share unless the user asks otherwise
安全使用建议
This skill appears to do exactly what it says: call Eastmoney's public suggest API and rank candidates. Before installing, consider: (1) network privacy — each query is sent to Eastmoney (avoid sending sensitive or private identifiers you don't want transmitted), (2) public token — the script uses a public token embedded in the code (expected for this API) but it could break if Eastmoney changes tokens or rate-limits, (3) verification — ambiguous names can map to multiple instruments, so confirm top candidates before using results for trading or automated orders, and (4) production use — consider caching, rate-limiting, and error handling if you integrate this into automation. If you need offline or vendor-trusted sources, use a broker or official exchange mapping instead.
功能分析
Type: OpenClaw Skill Name: cn-security-code-resolver-openclaw-skill Version: 1.0.0 The skill is a legitimate utility for resolving Chinese security names (stocks, ETFs, funds) into tradable codes using the Eastmoney suggest API. The core logic in `scripts/resolve_cn_security.py` uses standard Python libraries to query a well-known financial data endpoint and contains no evidence of data exfiltration, obfuscation, or unauthorized execution. The instructions in `SKILL.md` are clearly defined and strictly aligned with the stated purpose of the tool.
能力评估
Purpose & Capability
Name, description, README, SKILL.md, reference doc, and the included Python script all align: the skill queries Eastmoney's suggest API to map Chinese names to tradable codes. There are no unrelated requirements (no cloud creds, no unrelated binaries).
Instruction Scope
SKILL.md instructs the agent to run the bundled script and to use returned candidates with verification steps. The instructions do not ask the agent to read system files, environment variables, or send data to any endpoint other than Eastmoney's documented API. Writing portfolio files is optional and scoped to adding resolved codes.
Install Mechanism
No install spec — instruction-only plus a small Python script. Nothing is downloaded or extracted at install time and no third-party packages are pulled. This is low-risk.
Credentials
The skill requires no environment variables or credentials. The script embeds a commonly used public Eastmoney token (documented in references), which is consistent with the described behaviour; no secret exfiltration or extra credential requests are present.
Persistence & Privilege
always:false and default invocation settings. The skill does not request permanent presence or modify other skills or system-wide configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cn-security-code-resolver-openclaw-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cn-security-code-resolver-openclaw-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of CN Security Code Resolver. - Resolves Chinese stock, ETF, or fund names into tradable mainland codes using Eastmoney search. - Supports batch and single-name resolution with precise matching logic for code, exchange, and instrument type. - Provides usage workflow and output formatting guidelines for deterministic and verifiable results. - Includes CLI script and API reference for integration or advanced use. - Offers validation and fallback steps to ensure result accuracy.
元数据
Slug cn-security-code-resolver-openclaw-skill
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Cn Security Code Resolver Openclaw Skill 是什么?

Resolve A-share stocks, ETFs, funds, and other mainland China securities from Chinese names into tradable codes using Eastmoney search. This skill should be... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 148 次。

如何安装 Cn Security Code Resolver Openclaw Skill?

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

Cn Security Code Resolver Openclaw Skill 是免费的吗?

是的,Cn Security Code Resolver Openclaw Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Cn Security Code Resolver Openclaw Skill 支持哪些平台?

Cn Security Code Resolver Openclaw Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cn Security Code Resolver Openclaw Skill?

由 mr-11even(@mr-11even)开发并维护,当前版本 v1.0.0。

💬 留言讨论