skills/documentation/research/scientific-schematics/SKILL.md
Create publication-quality scientific diagrams using Claude AI with smart iterative refinement. Uses Claude for quality review. Only regenerates if quality is below threshold for your document type. Specialized in neural network architectures, system diagrams, flowcharts, biological pathways, and complex scientific visualizations.
npx skillsauth add pantheon-org/tekhne scientific-schematicsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Scientific schematics and diagrams transform complex concepts into clear visual representations for publication. This skill uses Claude AI for diagram generation with Claude quality review.
How it works:
Quality Thresholds by Document Type:
| Document Type | Threshold | Description | |---------------|-----------|-------------| | journal | 8.5/10 | Nature, Science, peer-reviewed journals | | conference | 8.0/10 | Conference papers | | thesis | 8.0/10 | Dissertations, theses | | grant | 8.0/10 | Grant proposals | | preprint | 7.5/10 | arXiv, bioRxiv, etc. | | report | 7.5/10 | Technical reports | | poster | 7.0/10 | Academic posters | | presentation | 6.5/10 | Slides, talks | | default | 7.5/10 | General purpose |
Simply describe what you want, and Claude creates it. All diagrams are stored in the figures/ subfolder and referenced in papers/posters.
Create any scientific diagram by simply describing it. Claude handles everything automatically with smart iteration:
# Generate for journal paper (highest quality threshold: 8.5/10)
python scripts/generate_schematic.py "CONSORT participant flow diagram with 500 screened, 150 excluded, 350 randomized" -o figures/consort.png --doc-type journal
# Generate for presentation (lower threshold: 6.5/10 - faster)
python scripts/generate_schematic.py "Transformer encoder-decoder architecture showing multi-head attention" -o figures/transformer.png --doc-type presentation
# Generate for poster (moderate threshold: 7.0/10)
python scripts/generate_schematic.py "MAPK signaling pathway from EGFR to gene transcription" -o figures/mapk_pathway.png --doc-type poster
# Custom max iterations (max 2)
python scripts/generate_schematic.py "Complex circuit diagram with op-amp, resistors, and capacitors" -o figures/circuit.png --iterations 2 --doc-type journal
What happens behind the scenes:
Smart Iteration Benefits:
Output: Versioned images plus a detailed review log with quality scores, critiques, and early-stop information.
Set your Anthropic Claude API API key:
export ANTHROPIC_API_KEY='your_api_key_here'
Get an API key at: https://console.anthropic.com/
Effective Prompts for Scientific Diagrams:
✓ Good prompts (specific, detailed):
✗ Avoid vague prompts:
Key elements to include:
Scientific Quality Guidelines (automatically applied):
A diagram communicates faster than a paragraph. Three principles guide every generation:
--doc-type flag.--iterations higher than 2; diminishing returns set in fast.# Confirm your API key is set before running any generation
echo "ANTHROPIC_API_KEY is ${ANTHROPIC_API_KEY:+set}"
This skill should be used when:
Simply describe your diagram in natural language. Claude generates it automatically:
python scripts/generate_schematic.py "your diagram description" -o output.png
That's it! The AI handles:
Works for all diagram types:
No coding, no templates, no manual drawing required.
The AI generation system uses smart iteration - it only regenerates if quality is below the threshold for your document type:
┌─────────────────────────────────────────────────────┐
│ 1. Generate image with Claude │
│ ↓ │
│ 2. Review quality with Claude │
│ ↓ │
│ 3. Score >= threshold? │
│ YES → DONE! (early stop) │
│ NO → Improve prompt, go to step 1 │
│ ↓ │
│ 4. Repeat until quality met OR max iterations │
└─────────────────────────────────────────────────────┘
Prompt Construction:
Scientific diagram guidelines + User request
Output: diagram_v1.png
Claude evaluates the diagram on:
Example Review Output:
SCORE: 8.0
STRENGTHS:
- Clear flow from top to bottom
- All phases properly labeled
- Professional typography
ISSUES:
- Participant counts slightly small
- Minor overlap on exclusion box
VERDICT: ACCEPTABLE (for poster, threshold 7.0)
| If Score... | Action | |-------------|--------| | >= threshold | STOP - Quality is good enough for this document type | | < threshold | Continue to next iteration with improved prompt |
Example:
If quality is below threshold, the system:
All iterations are saved with a JSON review log that includes early-stop information:
{
"user_prompt": "CONSORT participant flow diagram...",
"doc_type": "poster",
"quality_threshold": 7.0,
"iterations": [
{
"iteration": 1,
"image_path": "figures/consort_v1.png",
"score": 7.5,
"needs_improvement": false,
"critique": "SCORE: 7.5\nSTRENGTHS:..."
}
],
"final_score": 7.5,
"early_stop": true,
"early_stop_reason": "Quality score 7.5 meets threshold 7.0 for poster"
}
Note: With smart iteration, you may see only 1 iteration instead of the full 2 if quality is achieved early!
See references/advanced-usage.md for:
ScientificSchematicGenerator class)See references/generation-examples.md for complete examples: CONSORT flowchart, neural network architecture, biological pathway, system architecture.
The main entry point for generating scientific schematics:
# Basic usage
python scripts/generate_schematic.py "diagram description" -o output.png
# Custom iterations (max 2)
python scripts/generate_schematic.py "complex diagram" -o diagram.png --iterations 2
# Verbose mode
python scripts/generate_schematic.py "diagram" -o out.png -v
Note: The Claude AI generation system includes automatic quality review in its iterative refinement process. Each iteration is evaluated for scientific accuracy, clarity, and accessibility.
\includegraphics{} for generated imagesSee references/troubleshooting.md for:
Load these files for comprehensive information on specific topics:
references/diagram_types.md - Catalog of scientific diagram types with examplesreferences/best_practices.md - Publication standards and accessibility guidelinesThis skill works synergistically with:
See references/troubleshooting.md for the full quality, accessibility, typography, and publication-standards checklist.
# Required
export ANTHROPIC_API_KEY='your_api_key_here'
# Get key at: https://console.anthropic.com/
Simplest possible usage:
export ANTHROPIC_API_KEY='your_api_key_here'
python ./scripts/generate_schematic.py "your diagram description" -o figures/output.png
WHY: Committed credentials are immediately exposed in version history and will be rotated or revoked.
BAD — key hardcoded in source:
api_key = "sk-ant-abc123"
GOOD — key from environment:
export ANTHROPIC_API_KEY='your_api_key_here'
python ./scripts/generate_schematic.py "diagram" -o figures/output.png
WHY: The maximum is 2. Exceeding it either raises a validation error or produces no additional quality gain; smart iteration already stops early when the threshold is met.
BAD --iterations 5 to "ensure maximum quality". → GOOD Use --iterations 2 at most; the system stops early if quality is achieved on iteration 1.
WHY: The default threshold (7.5/10) is lower than journal (8.5/10). Skipping the flag for journal submissions means the diagram may pass a lower bar and fail editorial review.
BAD Run without --doc-type for a Nature submission. → GOOD ALWAYS pass --doc-type journal for peer-reviewed journals.
WHY: Matplotlib, seaborn, or R produce reproducible, data-bound figures with proper axis labels and error bars. The AI generation script is designed for conceptual scientific diagrams, not data visualisation.
BAD Generate a bar chart or scatter plot with this script. → GOOD Use a plotting library for data figures; reserve this skill for architecture diagrams, flowcharts, and pathway diagrams.
tools
A skill that produces warnings but no errors.
testing
A well-formed example skill for testing the validator.
development
A skill with code blocks and imperative instructions for testing content and contamination analysis.
tools