protocol-import

Convert lab protocol files into RM Protocols Builder import JSON with live formula blocks.

Updated Mar 20, 2026
One-click install
npx skills add https://github.com/McGheeLab/McGheeLabWebsite --skill protocol-import-mcgheelab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: protocol-import
Source: https://github.com/McGheeLab/McGheeLabWebsite/tree/main/.claude/skills/protocol-import
Command: npx skills add https://github.com/McGheeLab/McGheeLabWebsite --skill protocol-import-mcgheelab

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Lab protocols stored as Word documents, PDFs, or Markdown files cannot be loaded into the McGhee Lab RM Protocols Builder without manual re-entry, and static text loses any embedded calculations or images. ## Core Features & Use Cases - Format Conversion: Reads .md, .docx, and .pdf protocol files and emits a single .protocol-import.json file matching the protocol-import-v1 schema accepted by the RM import button. - Calculation Extraction: Detects arithmetic in protocol prose and emits formula or calculator blocks with named snake_case variables, turning the protocol into a live calculator whose values update in steps via [!var:name] tokens. - Image Embedding: Extracts embedded images (via pandoc for .docx, pdfimages for .pdf), base64-encodes them, and embeds them as data URIs in figure blocks. - Use Case: A researcher has a Matrigel protocol as a Word document and wants it on the RM protocols page; the skill converts it to JSON with materials tables, safety callouts, and an agarose-mass calculator, ready to upload via the Import button. ## Quick Start Ask the assistant to convert your protocol file, for example: convert my Agarose LLS Sieves.md protocol into the RM import JSON format.

Frequently Asked Questions about protocol-import

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I import a Word or PDF protocol into RM Protocols Builder?

Convert the source file into a `.protocol-import.json` file, then open mcgheelab.com/rm/pages/protocols.html, click the Import button, drop in the JSON, pick a slug, and confirm. The page validates the file and writes it to Firestore with an automatic v1 snapshot.

What file formats does protocol import support?

The conversion accepts .md, .docx, and .pdf sources. Markdown is read directly, .docx is best converted through pandoc with media extraction, and .pdf images are pulled out with pdfimages before base64 encoding.

How do protocol calculations become live calculators?

Arithmetic in the source prose is converted into formula or calculator blocks with snake_case variables, labels, units, and mathjs expressions. Step text then references outputs with [!var:name] tokens so values update live when inputs change.

Does the import JSON link materials to lab inventory automatically?

No. Materials rows must always set item_ref to null because the authoring side does not know the lab's inventory ids. The page-side matcher links materials to inventory after the JSON is uploaded.

What are the size limits for protocol import JSON files?

Individual images are limited to 15 MB by the Storage rule and should be downsampled if larger. If the total JSON exceeds 50 MB, the upload UI will struggle, so the user should be warned before handoff.