← Back to Skills Marketplace
guox18

Intern PubChem Name Conversion

by guox18 · GitHub ↗ · v0.1.0
cross-platform ⚠ suspicious
357
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install intern-pubchem-name-conversion
Description
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...
README (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.
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install intern-pubchem-name-conversion
  3. After installation, invoke the skill by name or use /intern-pubchem-name-conversion
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.0
Initial release: PubChem-based conversion between IUPAC, SMILES, and formula with fallback strategy.
Metadata
Slug intern-pubchem-name-conversion
Version 0.1.0
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 357 downloads so far.

How do I install Intern PubChem Name Conversion?

Run "/install intern-pubchem-name-conversion" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Intern PubChem Name Conversion free?

Yes, Intern PubChem Name Conversion is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Intern PubChem Name Conversion support?

Intern PubChem Name Conversion is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Intern PubChem Name Conversion?

It is built and maintained by guox18 (@guox18); the current version is v0.1.0.

💬 Comments