← 返回 Skills 市场
guox18

Intern PubChem Name Conversion

作者 guox18 · GitHub ↗ · v0.1.0
cross-platform ⚠ suspicious
357
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install intern-pubchem-name-conversion
功能描述
Convert molecules between IUPAC, SMILES, and molecular formula using PubChem as the source of truth. Use this whenever the user asks to convert, normalize, o...
使用说明 (SKILL.md)

Intern PubChem Name Conversion

Convert one molecular representation into all three fields:

  • smiles
  • iupac
  • formula

When to use

Use this skill when the user asks to:

  • convert IUPAC \x3C-> SMILES
  • fetch molecular formula from IUPAC/SMILES
  • validate molecule identity against PubChem

Do not use this skill for:

  • reaction mechanism explanation
  • quantum chemistry simulation
  • docking or property prediction beyond PubChem identifiers

Input contract

Expect one input value and one type:

  • input_type: iupac or smiles
  • input_value: raw string

If the user gives only one string without type:

  • treat strings with many bond symbols (=, #, [, ], @) as smiles
  • otherwise treat as iupac/name query

Required behavior

Always query PubChem first. Do not answer from memory when tools are available.

  1. URL-encode the full input string:
ENCODED=$(python3 -c 'import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1], safe=""))' "$INPUT_VALUE")
  1. Build the primary endpoint:
  • If input_type == iupac:
    • https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/{ENCODED}/property/SMILES,IUPACName,MolecularFormula/JSON
  • If input_type == smiles:
    • https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/smiles/{ENCODED}/property/SMILES,IUPACName,MolecularFormula/JSON
  1. If smiles primary endpoint is non-200, retry once with:
  • https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/fastidentity/smiles/{ENCODED}/property/SMILES,IUPACName,MolecularFormula/JSON
  1. If still non-200, do CID fallback:
  • Resolve CID:
    • iupac: .../compound/name/{ENCODED}/cids/JSON
    • smiles: .../compound/smiles/{ENCODED}/cids/JSON
  • Then fetch properties by CID:
    • .../compound/cid/{CID}/property/SMILES,IUPACName,MolecularFormula/JSON
  1. Parse PropertyTable.Properties[0] and map:
  • smiles \x3C- SMILES (fallback ConnectivitySMILES)
  • iupac \x3C- IUPACName
  • formula \x3C- MolecularFormula

Output format

Return JSON only (no markdown fences, no extra prose):

{
  "smiles": "...",
  "iupac": "...",
  "formula": "..."
}

If all attempts fail, still return the same schema with empty strings:

{
  "smiles": "",
  "iupac": "",
  "formula": ""
}

Quality rules

  • Keep PubChem values verbatim; do not rewrite or normalize names.
  • If multiple records are returned, use the first record consistently.
  • Do not silently swap stereochemistry markers.
安全使用建议
This skill is coherent for converting and validating molecular representations via PubChem. Before enabling it, consider: (1) using it will send whatever molecule strings are provided to PubChem (do not submit proprietary or confidential compounds if data-sharing is a concern); (2) ensure curl and python3 are available in the runtime environment; and (3) the skill returns PubChem values verbatim, so downstream code should validate/normalize results if needed.
功能分析
Type: OpenClaw Skill Name: intern-pubchem-name-conversion Version: 0.1.0 The skill is suspicious due to a high-risk shell injection vulnerability. The `SKILL.md` instructs the agent to execute shell commands like `python3 -c '...' "$INPUT_VALUE"` and implicitly construct `curl` commands using user-controlled input (`INPUT_VALUE`). If the OpenClaw agent does not rigorously escape `INPUT_VALUE` before passing it to the shell, an attacker could inject arbitrary shell commands, leading to Remote Code Execution (RCE). While the skill's stated purpose is benign (PubChem conversion) and there's no evidence of intentional malicious behavior like data exfiltration or backdoors, the direct execution of user-controlled input in a shell context constitutes a critical vulnerability.
能力评估
Purpose & Capability
The skill name and description match the runtime instructions: it queries PubChem PUG-REST to convert/validate IUPAC, SMILES, and molecular formula. Required binaries (curl, python3) are reasonable for making HTTP requests and URL-encoding.
Instruction Scope
All instructions stay within the stated purpose and reference only PubChem endpoints. The skill will send user-provided molecule strings to pubchem.ncbi.nlm.nih.gov (expected for this task); it does not instruct reading local files, other environment variables, or unrelated system state. Note: user inputs are transmitted to an external API (PubChem).
Install Mechanism
No install spec and no code files — instruction-only skill. This is low-risk: nothing is written to disk or downloaded by the skill.
Credentials
The skill requests no credentials, no config paths, and only requires curl and python3. There are no extraneous or unrelated environment variables or secrets requested.
Persistence & Privilege
always is false and the skill does not request persistent/privileged presence or modify other skills. Normal autonomous invocation is allowed by platform defaults but is not a special privilege here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install intern-pubchem-name-conversion
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /intern-pubchem-name-conversion 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release: PubChem-based conversion between IUPAC, SMILES, and formula with fallback strategy.
元数据
Slug intern-pubchem-name-conversion
版本 0.1.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Intern PubChem Name Conversion 是什么?

Convert molecules between IUPAC, SMILES, and molecular formula using PubChem as the source of truth. Use this whenever the user asks to convert, normalize, o... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 357 次。

如何安装 Intern PubChem Name Conversion?

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

Intern PubChem Name Conversion 是免费的吗?

是的,Intern PubChem Name Conversion 完全免费(开源免费),可自由下载、安装和使用。

Intern PubChem Name Conversion 支持哪些平台?

Intern PubChem Name Conversion 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Intern PubChem Name Conversion?

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

💬 留言讨论