Agent skill

Single Step Retrosynthesis

by PKU-YuanGroup in PKU-YuanGroup/OpenAI4S

Generate ranked one-step precursor sets for a product with RetroChimera; use for disconnection ideas or expansion-policy calls.

MITAuto-check passed

Install Single Step Retrosynthesis

skills CLI
$ npx skills add PKU-YuanGroup/OpenAI4S --skill single-step-retrosynthesis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install PKU-YuanGroup/OpenAI4S single-step-retrosynthesis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/PKU-YuanGroup/OpenAI4S.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/single-step-retrosynthesis .claude/skills/single-step-retrosynthesis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
single-step-retrosynthesis
GitHub stars
622
Token cost
~1.8k tokens
SKILL.md length
664 words
Files
3
Skills in repo
17
Repo updated
First seen
Licence
MIT

At a glance

Generate ranked one-step precursor sets for a product with RetroChimera; use for disconnection ideas or expansion-policy calls.

  • Disconnection ideas
  • SKILL.md covers Run through the checked adapter, Compare candidates correctly, Optional diversity model and Output contract, plus 1 more section
  • Calls uv and conda
  • Expansion-policy calls

What it does

Single Step Retrosynthesis is an agent skill from PKU-YuanGroup/OpenAI4S. Generate ranked one-step precursor sets for a product with RetroChimera; use for disconnection ideas or expansion-policy calls. Do not recurse, search stock, or call the result a complete route.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `README.md` and `README_zh.md`).

The repository describes itself as: Open-source AI agent for scientific research. Analyze data in Python/R with Claude, GPT, Gemini, and more. The licence is MIT.

When your agent uses it

  • Disconnection ideas
  • Expansion-policy calls

Example prompts

  • “/single-step-retrosynthesis”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 4a72e87. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv
    • conda

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Single Step Retrosynthesis loads about 1.8k tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 664 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from PKU-YuanGroup/OpenAI4S at commit 4a72e87, republished under its MIT licence (© PKU-YuanGroup). 664 words, ~1,795 tokens.

Download SKILL.mdSave it as .claude/skills/single-step-retrosynthesis/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
single-step-retrosynthesis
description
Generate ranked one-step precursor sets for a product with RetroChimera; use for disconnection ideas or expansion-policy calls. Do not recurse, search stock, or call the result a complete route.
license
MIT
origin
openai4s

Single-step retrosynthesis

Answer one scientific question: given one product, which precursor sets could produce it in one reaction? Do not recurse, check stock, invent conditions, or call the output a synthesis route. Hand accepted candidates to retrosynthesis_planning for multi-step search.

Use RetroChimera 1 as the default. Its ensemble combines edit-based and de-novo components, exposes a direct Syntheseus-compatible Python API, and publishes Pistachio, USPTO-FULL, and USPTO-50K checkpoints. The OpenAI4S adapter already runs it in an isolated process so PyTorch and model dependencies never enter the stdlib core.

Run through the checked adapter

Create a separate environment and install the model:

bash
conda create -n retrochimera python=3.10 -y
conda run -n retrochimera python -m pip install "retrochimera==1.2.0"

The USPTO-50K checkpoint uses RetroChimera's Graphium architecture and requires "retrochimera[graphium]==1.2.0" instead. Install that extra before using the smaller checkpoint as a smoke test.

Acquire and verify a reviewed checkpoint with retrosynthesis_planning/model_deployment.py; keep weights outside git. Then:

The checked adapter and deployment notes are deliberately owned by the retrosynthesis_planning Skill. A delegated specialist that runs this recipe must therefore be allowlisted for both single-step-retrosynthesis and retrosynthesis_planning; loading a Skill never widens that allowlist. Load and read the dependency through the Skill APIs before importing it:

python
host.load_skill("retrosynthesis_planning")
backend_notes = host.skills.read("retrosynthesis_planning", "MODEL_BACKENDS.md")

If either call is refused, stop and ask the caller to add the dependency to the specialist profile. Do not bypass the gate with workspace file reads or a ../ resource path. Once access is confirmed, the USPTO-50K smoke-test checkpoint created by those notes lives under the same workspace root. Run the adapter:

python
from pathlib import Path

from retrosynthesis_planning.external_backends import SyntheseusBackend

workspace = Path.cwd().resolve()
model_dir = workspace / "models" / "retrochimera" / "uspto50k"
manifest = model_dir / "model-manifest.json"

backend = SyntheseusBackend(
    model="RetroChimera",
    model_dir=model_dir,
    manifest=manifest,
    python_command=(
        "conda",
        "run",
        "--no-capture-output",
        "-n",
        "retrochimera",
        "python",
    ),
)
result = backend.single_step("Oc1ccc(OCc2ccccc2)c(Br)c1", num_results=5)
for proposal in result["predictions"]:
    print(proposal["rank"], proposal["reactants_smiles"], proposal["score"])

Require a path-free manifest containing model version, checkpoint ID and hash, training dataset, and code/weight licenses. Leave automatic model download off. The adapter caps requests at ten candidates because low-ranked beams become increasingly hallucination-prone.

Compare candidates correctly

  • Canonicalize each molecule, sort dot-separated components, and collapse exact duplicate precursor sets before comparing models.
  • Preserve raw rank and raw model score. Do not calibrate a probability without a held-out set matching the deployment domain.
  • Reject unparsable outputs and obvious atom/charge pathologies, but label this as structural screening rather than feasibility validation.
  • Use reaction-forward-prediction for round-trip product recovery and reaction-atom-mapping only after both sides of a proposed reaction are known.
  • Keep disagreements between edit-based and sequence-based models as review diversity; do not average scores from unlike models.

For a class-unknown benchmark, run the deterministic protocol after model inference. The protocol fails closed without RDKit because identity/string fallbacks would corrupt exact-match science; install the repository's optional chemistry environment first:

bash
uv sync --extra chemistry

Then normalize the frozen public output:

bash
uv run python skills/retrosynthesis_planning/single_step_benchmark.py normalize \
  --targets input/targets.csv \
  --predictions results/predictions.jsonl \
  --model-manifest input/model_manifest.json \
  --top-k 10 \
  --output results/intermediate_results.json

The public target CSV is intentionally strict: it accepts only target_id and product_smiles, so a reaction class, reference precursor, patent identifier, or accidental extra column fails closed. Run evaluate only in the separate evaluator process after predictions are frozen:

bash
uv run python skills/retrosynthesis_planning/single_step_benchmark.py evaluate \
  --targets input/targets.csv \
  --predictions results/predictions.jsonl \
  --references private_evaluator/reference_precursor_sets.jsonl \
  --top-k 10 \
  --output private_evaluator/metrics.json

The evaluator compares dot-separated precursor molecules as unordered multisets, preserves invalid and duplicate beams, scores each target before aggregation, and supports multiple recorded precursor sets per product. It does not turn patent-record recovery into a feasibility label.

Show full SKILL.md (192 more words)Show less

Optional diversity model

Use sagawa/ReactionT5v2-retrosynthesis when a second sequence model is useful. It is MIT, 0.2B parameters, and loads directly through Transformers. Record whether the checkpoint is the ORD-pretrained model or the USPTO-50K fine-tune: their benchmark meanings are very different. It is not the default proposal model.

Output contract

Return product SMILES, ordered precursor sets, model/checkpoint provenance, raw scores, parse status, duplicate group, and explicit caveats. A precursor set is a hypothesis for chemist review, not evidence of literature precedent, selectivity, available conditions, yield, safety, or experimental success.

Failure modes

SymptomAction
model_dir is requiredInstall a reviewed checkpoint and pass its directory; do not enable an implicit download.
backend timeout or OOMLower num_results, use the smaller USPTO-50K checkpoint for a smoke test, or move the isolated worker to a GPU environment.
many invalid or repeated beamsStop expanding the beam; report low candidate diversity and try an independent model.
high score but failed forward recoveryKeep it as a disagreement requiring chemistry review; never overwrite either raw result.

Primary model source: https://github.com/microsoft/retrochimera. Read deployment details and reviewed checkpoint metadata with host.skills.read("retrosynthesis_planning", "MODEL_BACKENDS.md") after the dependency has been allowed and loaded.

© PKU-YuanGroup, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in skills/single-step-retrosynthesis of PKU-YuanGroup/OpenAI4S.

  • SKILL.md
  • README.md
  • README_zh.md

Open the folder on GitHubat commit 4a72e87

Compare with similar skills

Single Step Retrosynthesis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Single Step Retrosynthesis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Single Step Retrosynthesis this skillPKU-YuanGroup/OpenAI4S622—~1.8kAutomated safety check: PassMIT
Manage Settingsasgeirtj/system_prompts_leaks69k—~3.1kAutomated safety check: PassCC0-1.0
Warp Settings Editorwarpdotdev/warp65k1 repos~675Automated safety check: PassAGPL-3.0
Warp Settings Page Builderwarpdotdev/warp65k1 repos~4.5kAutomated safety check: PassAGPL-3.0
Add Server Env Var for User Settinglobehub/lobehub83k—~644Automated safety check: PassCustom licence
Add Settings Pagesimstudioai/sim30k—~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Manage Settings

    asgeirtj/system_prompts_leaks

    Any explicit Muse Code setting question or change (model, reasoning effort, /settings) requires a silent readskill call for bundled:manage-settings as FIRST ACTION—no assistant text or other tool…

    69k GitHub stars~3.1k tokensUpdated yesterday
    Auto-check passed
  • Warp Settings Editor

    warpdotdev/warp

    Finds and changes Warp application settings by searching a bundled JSON schema and editing the matching TOML settings file at the right nesting depth.

    65k GitHub starsUsed in 1 repo~675 tokens
    Productivity & AutomationAuto-check passed
  • How to build a settings page in the Warp desktop client so widgets, page titles and settings search behave correctly, and which common mistakes to avoid.

    65k GitHub starsUsed in 1 repo~4.5k tokens
    Frontend & DesignAuto-check passed
  • Adds a server-side environment variable that sets the default for a user setting in LobeHub, wired from the env schema through server config to the user store and docs.

    83k GitHub stars~644 tokensUpdated today
    DevelopmentAuto-check passed
  • Add Settings Page

    simstudioai/sim

    Add a new Sim settings page, or audit existing settings pages for design-system compliance with the shared SettingsPanel layout.

    30k GitHub stars~1.6k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Plugin Settings Pattern

    anthropics/claude-plugins-official

    Official

    Shows how Claude Code plugins keep per-project settings and state in .claude/plugin-name.local.md files with YAML frontmatter and a markdown body.

    38k GitHub starsUsed in 7 repos~3k tokens
    Agent WorkflowsAuto-check passed

More from PKU-YuanGroup/OpenAI4S

All 17 skills in this repo
  • Single Cell Rna Analysis

    PKU-YuanGroup/OpenAI4S

    Reproducible Scanpy workflow for human or mouse 10x scRNA-seq and snRNA-seq count matrices: single-sample descriptive QC, clustering and annotation, or comparative donor-aware pseudobulk DE and Milo…

    622 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Bioprobench

    PKU-YuanGroup/OpenAI4S

    Score an LLM's biological-protocol reasoning on the BioProBench benchmark: protocol QA, step ordering, error detection, protocol generation, and LLM-judged error reasoning; or generate the responses.

    622 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Reaction Atom Mapping

    PKU-YuanGroup/OpenAI4S

    Map atoms and changed bonds for a complete reaction with RXNMapper.

    622 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Reaction Forward Prediction

    PKU-YuanGroup/OpenAI4S

    Predict ranked products from reactants and reagents with ReactionT5v2-forward; use for outcome prediction or round-trip recovery.

    622 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Reaction Yield Estimation

    PKU-YuanGroup/OpenAI4S

    Estimate yield for a fully specified reactant/reagent/product record with ReactionT5v2-yield.

    622 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Rfdiffusion

    PKU-YuanGroup/OpenAI4S

    Generate de novo protein backbones with RFdiffusion for protein-target binders, hotspot-conditioned interfaces, motif scaffolding, partial diffusion, or symmetric assemblies.

    622 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed

Questions about Single Step Retrosynthesis

What does Single Step Retrosynthesis do?

Generate ranked one-step precursor sets for a product with RetroChimera; use for disconnection ideas or expansion-policy calls. Single Step Retrosynthesis is an agent skill from PKU-YuanGroup/OpenAI4S. Generate ranked one-step precursor sets for a product with RetroChimera; use for disconnection ideas or expansion-policy calls.

When should I use Single Step Retrosynthesis?

Single Step Retrosynthesis fits situations like: disconnection ideas; expansion-policy calls.

How do I install Single Step Retrosynthesis in Claude Code?

Run `npx skills add PKU-YuanGroup/OpenAI4S --skill single-step-retrosynthesis -a claude-code`. Or copy the skill folder (skills/single-step-retrosynthesis in PKU-YuanGroup/OpenAI4S) into .claude/skills/single-step-retrosynthesis in your project. Claude Code loads it when a task matches its description.

How do I install Single Step Retrosynthesis in Codex?

Run `npx skills add PKU-YuanGroup/OpenAI4S --skill single-step-retrosynthesis -a codex`. Or copy the skill folder (skills/single-step-retrosynthesis in PKU-YuanGroup/OpenAI4S) into .agents/skills/single-step-retrosynthesis in your project. Codex loads it when a task matches its description.

Can I use Single Step Retrosynthesis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PKU-YuanGroup/OpenAI4S --skill single-step-retrosynthesis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/single-step-retrosynthesis, .gemini/skills/single-step-retrosynthesis, .github/skills/single-step-retrosynthesis and .opencode/skills/single-step-retrosynthesis in your project.

What does Single Step Retrosynthesis need to run?

Going by SKILL.md and its folder, Single Step Retrosynthesis needs the command-line tools its instructions call (uv and conda). Our summary lists: Python 3.

Does Single Step Retrosynthesis access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Single Step Retrosynthesis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Single Step Retrosynthesis use?

Single Step Retrosynthesis is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Single Step Retrosynthesis use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Single Step Retrosynthesis?

Skills that share tags, products or a category with Single Step Retrosynthesis: Manage Settings (asgeirtj/system_prompts_leaks, 69k stars), Warp Settings Editor (warpdotdev/warp, 65k stars), Warp Settings Page Builder (warpdotdev/warp, 65k stars) and Add Server Env Var for User Setting (lobehub/lobehub, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Single Step Retrosynthesis?

PKU-YuanGroup (a GitHub organization) maintains it in PKU-YuanGroup/OpenAI4S, which has 622 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 9, 2026.

Source: PKU-YuanGroup/OpenAI4S on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.