scientific-schematics

Generate publication-quality scientific diagrams from natural language descriptions using OpenRouter image models.

Updated Jun 18, 2026
One-click install
npx skills add https://github.com/svpfahad/RES200 --skill scientific-schematics-svpfahad
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scientific-schematics
Source: https://github.com/svpfahad/RES200/tree/main/claude-scientific-writer-main/.claude/skills/scientific-schematics
Command: npx skills add https://github.com/svpfahad/RES200 --skill scientific-schematics-svpfahad

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, python-dotenv, and includes scripts (resource) and references (resource) components.

What problem does it solve? Creating publication-quality scientific diagrams (flowcharts, neural network architectures, biological pathways, circuit diagrams) traditionally requires manual drawing tools or coding. This Skill generates diagrams automatically from natural language descriptions, with AI-driven quality review and iterative refinement. ## Core Features & Use Cases - Natural Language Diagram Generation: Describe any scientific diagram and Nano Banana Pro (Gemini 3 Pro Image) generates it via the OpenRouter API. - Smart Iterative Refinement: Gemini 3 Pro reviews each generated image against document-type quality thresholds (journal 8.5/10, poster 7.0/10, presentation 6.5/10) and only regenerates when quality falls short. - Structured Review Logs: Each run produces versioned images (v1, v2, final) plus a JSON review log with scores, critiques, and early-stop reasons. - Use Case: A researcher needs a CONSORT participant flow diagram for a journal submission. They describe the screening, exclusion, and randomization numbers, and receive a publication-ready PNG that passed an 8.5/10 quality review. ## Quick Start Set the OPENROUTER_API_KEY environment variable, then ask the assistant to generate a CONSORT flowchart with your participant numbers saved to figures/consort.png for a journal document type.

Frequently Asked Questions about scientific-schematics

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

FAQPage Schema
How do I generate a scientific diagram from a text description?

Run python scripts/generate_schematic.py with your diagram description and an output path, for example -o figures/diagram.png. The script calls the OpenRouter API to generate the image and automatically reviews its quality.

What API key do I need for AI diagram generation?

You need an OpenRouter API key from https://openrouter.ai/keys. Set it as the OPENROUTER_API_KEY environment variable, add it to a .env file, or pass it with the --api-key flag.

How does the quality threshold work for different document types?

Each document type has a score threshold out of 10: journal 8.5, conference/thesis/grant 8.0, poster 7.0, presentation 6.5. If the Gemini review score meets the threshold, generation stops early; otherwise the prompt is improved and the image regenerated.

Why does diagram generation fail with an API key error?

The generator raises a ValueError when OPENROUTER_API_KEY is not found in the environment, a .env file, or the --api-key argument. Verify the key is exported in your shell and that the requests library is installed.

What output files does the schematic generator produce?

For an output like diagram.png, it saves versioned iterations (diagram_v1.png, diagram_v2.png), copies the final version to diagram.png, and writes diagram_review_log.json containing scores, critiques, and early-stop information.

What are the limitations of AI-generated scientific diagrams?

Generation is capped at 2 refinement iterations and depends on prompt specificity; vague prompts produce low-quality results. Output is raster PNG rather than vector formats, and each diagram costs roughly $0.05-0.30 in API fees.