/reaction-draw:reaction-drawfrom reaction-draw
Draws chemical structures and electron-pushing mechanisms from papers, images, reaction names, or descriptions using Octet Draw. Produces ChemDraw (.cdxml), SVG, and PNG files.
Ships in reaction-draw. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Use the bundled scripts for layout, numbering, arrows, and checks; do not read their source or write your own PDF parser, checker, or renderer.
Run the scripts using this folder's path, and keep both the input JSON file (format and commands) and the output folder (DIR) in your working directory.
mechanism, proposed, Scheme, or Figure using pdftotext or PyMuPDF (if installed), and read only the relevant page and legend. For an image, read the species and arrows directly from it. For a reaction name or description, use the standard textbook mechanism.templates/cofactor_fragments.json. Preserve atom maps and cite the figure or page in source. Set "expected_stereo": {"species:map": "R"} for every stereocenter using the paper's (R)/(S) descriptors; otherwise, derive it from the compound's standard name or a database entry (input format).python scripts/draw_figure.py input.json --out DIR. A drawing can take several minutes; set the tool timeout to at least 10 minutes and wait for the RESULT line without interrupting it. The script lays out the figure and fixes the layout itself. Fix every input error, and the FIX lines that a NEXT line places in the input itself, in the input file and rerun. On CHECKS FAILED, revise the layout: write three differently revised copies of the input that address the FIX lines (for example, different offset, rotate, or bend values, abbreviating a non-reacting group, or splitting a crowded step into two panels), draw them at once with python scripts/draw_figure.py a.json b.json c.json --versions --out DIR, and continue from the version named in the BEST line. Make at most two such rounds; then hand over the BEST version, passing or not. Never edit the generated drawing manually. Run python scripts/draw_figure.py --check-env and install what its MISSING lines name only if layout error or drawing failed occurs. Run the drawing command at most four times for a figure (an input error stops before drawing and does not count); then hand over the best figure as it is. These limits apply until the figure is handed over; changes the user asks for afterwards do not count.figure_small.png to verify the electron flow against the source, and review the AUDIT lines printed with it. Fix any chemistry error in the input file and rerun.figure.cdxml, figure.svg, figure.png, and a 2–4 line caption (citing the source, level of certainty, and abbreviation definitions). On RESULT: CHECKS FAILED, also state that it fails the checks and report its FIX lines in plain words; the user can point out what to change or edit figure.cdxml. Leave figure_small.png (for review) where it was drawn. Do not include PDF, TIFF, or ZIP files unless requested.[H:n]).show every carbon whose symbol must be displayed (e.g., terminal methyls, carbons named in the text, or the C of CO₂); do not label every skeletal carbon.numbers, never free text. Number a carbon with the digit alone (1, not C1); a heteroatom that the source numbers with its symbol may instead have that text as its label (O3, N1′), which shows the number at full size after the symbol.+ signs between species within a panel, as the panel title already identifies them. Use plus (never free text) only when the source explicitly shows a +."ts": true with partial or 1.5 bonds (template).FIX line is unclear.Glu170), or one-letter codes (K123) when requested or used consistently in the source. Maintain one style per figure.[Zn+2:1]([*:21])... with "residue": {"21": "His94"}.cut (wavy truncation marks), and name the residue with a texts entry near its α carbon. Draw consecutive residues shown with their backbone as one chain, each named by its own text. A residue whose side chain alone takes part keeps its residue label.LICENSE (opens in a new tab)NOTICE (opens in a new tab)references/audit-checklist.md (opens in a new tab)references/input-more.md (opens in a new tab)references/iupac-rules.md (opens in a new tab)scripts/README.md (opens in a new tab)scripts/check_rules.py (opens in a new tab)scripts/draw_figure.py (opens in a new tab)scripts/fix_hbonds.py (opens in a new tab)scripts/iupac_features.py (opens in a new tab)scripts/layout.py (opens in a new tab)scripts/layout_repair.py (opens in a new tab)scripts/octet/adapter.ts (opens in a new tab)scripts/octet/build.mjs (opens in a new tab)scripts/octet/chemdraw_compat.py (opens in a new tab)scripts/octet/dist/octet-adapter.html (opens in a new tab)scripts/octet/dist/octet-adapter.json (opens in a new tab)scripts/octet/octet_draw.py (opens in a new tab)scripts/octet/octet_run.py (opens in a new tab)scripts/octet/package.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub t-0hmura/reaction-draw --plugin reaction-drawOther plugins' skills for the same job