scientific-schematics

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

Updated Oct 7, 2022
One-click install
npx skills add https://github.com/tamagusko/linux-cfg --skill scientific-schematics-tamagusko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scientific-schematics
Source: https://github.com/tamagusko/linux-cfg/tree/main/dotfiles/claude/skills/scientific-schematics
Command: npx skills add https://github.com/tamagusko/linux-cfg --skill scientific-schematics-tamagusko

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) normally requires manual drawing tools or complex code. This Skill generates them from plain-language descriptions and iteratively refines them until they meet quality thresholds for the target document type. ## Core Features & Use Cases - Natural Language Diagram Generation: Describe a CONSORT flowchart, Transformer architecture, MAPK pathway, or IoT system diagram and receive a publication-ready PNG via the OpenRouter API. - Smart Iterative Refinement: Gemini 3.1 Pro Preview reviews each generated image against document-type quality thresholds (8.5/10 for journals down to 6.5/10 for presentations) and only regenerates when the score falls short. - Structured Review Logs: Every run saves versioned images plus a JSON log with per-iteration scores, critiques, and early-stop reasons. - Use Case: A researcher writing a journal submission runs the generator with --doc-type journal to produce a CONSORT participant flow diagram that is automatically refined until it scores 8.5/10 or higher. ## Quick Start Set the OPENROUTER_API_KEY environment variable, then ask the assistant to generate a scientific diagram such as a CONSORT flowchart saved to figures/consort.png with journal quality settings.

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 scripts/generate_schematic.py with a natural language prompt and an output path, for example a CONSORT flowchart description saved to figures/consort.png. The script calls the OpenRouter API, generates the image, reviews it, and saves versioned outputs plus a JSON review log.

What API key do I need for AI diagram generation?

You need an OpenRouter API key set as the OPENROUTER_API_KEY environment variable or passed via the --api-key flag. Keys are obtained from https://openrouter.ai/keys, and the scripts also load keys from a .env file if python-dotenv is installed.

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, preprint/report 7.5, 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 up to two iterations.

Why does diagram generation fail with an API key error?

Generation fails when OPENROUTER_API_KEY is unset or invalid. Verify the variable with echo $OPENROUTER_API_KEY, export it in your shell profile, or place it in a .env file, then rerun with -v verbose mode to see detailed API errors.

What are the limitations of AI-generated scientific diagrams?

Output is raster PNG only, not vector PDF/SVG, so print scaling is limited. Refinement is capped at two iterations, and complex layouts may still score below journal thresholds, requiring more specific prompts with layout, labels, and quantitative details.