$npx -y skills add LeonChaoX/qinyan-academic-skills --skill scientific-schematicsCreate publication-quality scientific diagrams using Nano Banana 2 AI with smart iterative refinement. Uses Gemini 3.1 Pro Preview for quality review. Only regenerates if quality is below threshold for your document type. Specialized in neural network architectures, system diagra
| 1 | # Scientific Schematics and Diagrams |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Scientific schematics and diagrams transform complex concepts into clear visual representations for publication. **This skill uses Nano Banana 2 AI for diagram generation with Gemini 3.1 Pro Preview quality review.** |
| 6 | |
| 7 | **How it works:** |
| 8 | - Describe your diagram in natural language |
| 9 | - Nano Banana 2 generates publication-quality images automatically |
| 10 | - **Gemini 3.1 Pro Preview reviews quality** against document-type thresholds |
| 11 | - **Smart iteration**: Only regenerates if quality is below threshold |
| 12 | - Publication-ready output in minutes |
| 13 | - No coding, templates, or manual drawing required |
| 14 | |
| 15 | **Quality Thresholds by Document Type:** |
| 16 | | Document Type | Threshold | Description | |
| 17 | |---------------|-----------|-------------| |
| 18 | | journal | 8.5/10 | Nature, Science, peer-reviewed journals | |
| 19 | | conference | 8.0/10 | Conference papers | |
| 20 | | thesis | 8.0/10 | Dissertations, theses | |
| 21 | | grant | 8.0/10 | Grant proposals | |
| 22 | | preprint | 7.5/10 | arXiv, bioRxiv, etc. | |
| 23 | | report | 7.5/10 | Technical reports | |
| 24 | | poster | 7.0/10 | Academic posters | |
| 25 | | presentation | 6.5/10 | Slides, talks | |
| 26 | | default | 7.5/10 | General purpose | |
| 27 | |
| 28 | **Simply describe what you want, and Nano Banana 2 creates it.** All diagrams are stored in the figures/ subfolder and referenced in papers/posters. |
| 29 | |
| 30 | ## Quick Start: Generate Any Diagram |
| 31 | |
| 32 | Create any scientific diagram by simply describing it. Nano Banana 2 handles everything automatically with **smart iteration**: |
| 33 | |
| 34 | ```bash |
| 35 | # Generate for journal paper (highest quality threshold: 8.5/10) |
| 36 | python scripts/generate_schematic.py "CONSORT participant flow diagram with 500 screened, 150 excluded, 350 randomized" -o figures/consort.png --doc-type journal |
| 37 | |
| 38 | # Generate for presentation (lower threshold: 6.5/10 - faster) |
| 39 | python scripts/generate_schematic.py "Transformer encoder-decoder architecture showing multi-head attention" -o figures/transformer.png --doc-type presentation |
| 40 | |
| 41 | # Generate for poster (moderate threshold: 7.0/10) |
| 42 | python scripts/generate_schematic.py "MAPK signaling pathway from EGFR to gene transcription" -o figures/mapk_pathway.png --doc-type poster |
| 43 | |
| 44 | # Custom max iterations (max 2) |
| 45 | python scripts/generate_schematic.py "Complex circuit diagram with op-amp, resistors, and capacitors" -o figures/circuit.png --iterations 2 --doc-type journal |
| 46 | ``` |
| 47 | |
| 48 | **What happens behind the scenes:** |
| 49 | 1. **Generation 1**: Nano Banana 2 creates initial image following scientific diagram best practices |
| 50 | 2. **Review 1**: **Gemini 3.1 Pro Preview** evaluates quality against document-type threshold |
| 51 | 3. **Decision**: If quality >= threshold → **DONE** (no more iterations needed!) |
| 52 | 4. **If below threshold**: Improved prompt based on critique, regenerate |
| 53 | 5. **Repeat**: Until quality meets threshold OR max iterations reached |
| 54 | |
| 55 | **Smart Iteration Benefits:** |
| 56 | - ✅ Saves API calls if first generation is good enough |
| 57 | - ✅ Higher quality standards for journal papers |
| 58 | - ✅ Faster turnaround for presentations/posters |
| 59 | - ✅ Appropriate quality for each use case |
| 60 | |
| 61 | **Output**: Versioned images plus a detailed review log with quality scores, critiques, and early-stop information. |
| 62 | |
| 63 | ### Configuration |
| 64 | |
| 65 | Set your OpenRouter API key: |
| 66 | ```bash |
| 67 | export OPENROUTER_API_KEY='your_api_key_here' |
| 68 | ``` |
| 69 | |
| 70 | Get an API key at: https://openrouter.ai/keys |
| 71 | |
| 72 | ### AI Generation Best Practices |
| 73 | |
| 74 | **Effective Prompts for Scientific Diagrams:** |
| 75 | |
| 76 | ✓ **Good prompts** (specific, detailed): |
| 77 | - "CONSORT flowchart showing participant flow from screening (n=500) through randomization to final analysis" |
| 78 | - "Transformer neural network architecture with encoder stack on left, decoder stack on right, showing multi-head attention and cross-attention connections" |
| 79 | - "Biological signaling cascade: EGFR receptor → RAS → RAF → MEK → ERK → nucleus, with phosphorylation steps labeled" |
| 80 | - "Block diagram of IoT system: sensors → microcontroller → WiFi module → cloud server → mobile app" |
| 81 | |
| 82 | ✗ **Avoid vague prompts**: |
| 83 | - "Make a flowchart" (too generic) |
| 84 | - "Neural network" (which type? what components?) |
| 85 | - "Pathway diagram" (which pathway? what molecules?) |
| 86 | |
| 87 | **Key elements to include:** |
| 88 | - **Type**: Flowchart, architecture diagram, pathway, circuit, etc. |
| 89 | - **Components**: Specific elements to include |
| 90 | - **Flow/Direction**: How elements connect (left-to-right, top-to-bottom) |
| 91 | - **Labels**: Key annotations or text to include |
| 92 | - **Style**: Any specific visual requirements |
| 93 | |
| 94 | **Scientific Quality Guidelines** (automatically applied): |
| 95 | - Clean white/light background |
| 96 | - High contrast for readability |
| 97 | - Clear, |