scientific-schematics

Generate scientific diagrams from natural language prompts using Nano Banana 2 with Gemini quality review.

Updated Sep 2, 2026
One-click install
npx skills add https://github.com/ricfulop/cba-agentic-engineering-bootstrap --skill scientific-schematics-ricfulop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scientific-schematics
Source: https://github.com/ricfulop/cba-agentic-engineering-bootstrap/tree/main/skills/scientific-schematics
Command: npx skills add https://github.com/ricfulop/cba-agentic-engineering-bootstrap --skill scientific-schematics-ricfulop

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 coding, which is slow and demands design expertise. ## Core Features & Use Cases - Natural Language Generation: Describe a diagram in plain text and Nano Banana 2 generates a publication-ready PNG via the OpenRouter API. - Smart Iterative Refinement: Gemini 3.1 Pro Preview scores each image against document-type quality thresholds (8.5 for journals down to 6.5 for presentations) and only regenerates when below threshold. - Review Logging: Every run saves versioned images plus a JSON review log with scores, critiques, and early-stop reasons. - Use Case: Generate a CONSORT participant flow diagram for a clinical trial paper by describing the screening, exclusion, and randomization counts, then receive a journal-threshold-scored figure with a full review log. ## Quick Start Set the OPENROUTER_API_KEY environment variable and ask the agent to run scripts/generate_schematic.py with your diagram description, an output path, and a document type such as journal or poster.

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 your diagram description, an output path via -o, and optionally a --doc-type flag. Nano Banana 2 generates the image through OpenRouter, and Gemini 3.1 Pro Preview reviews it against a quality threshold.

What API key do I need for AI diagram generation?

You need an OpenRouter API key set as the OPENROUTER_API_KEY environment variable, available at openrouter.ai/keys. You can also pass it with the --api-key flag or store it in a .env file.

How does the iterative quality review work?

Each generated image is scored 0-10 by Gemini 3.1 Pro Preview against a document-type threshold (8.5 for journal, 6.5 for presentation). If the score meets the threshold, generation stops early; otherwise the prompt is improved and regeneration occurs up to the iteration limit.

Why did my diagram generation fail with an API error?

Failures usually come from a missing or invalid OPENROUTER_API_KEY, a missing requests library, or API timeouts. Run with -v for verbose output showing the exact HTTP status and error detail returned by OpenRouter.

Should I use AI-generated figures for journal manuscripts?

No. The skill's CBA override states AI figures are for board slides and early review cartoons only. Final journal figures should be real data renderings produced via lib/styles.py, with AI diagrams reserved for presentations and drafts.