docs-generate-schematicslisted
Install: claude install-skill bitranox/bitranox-skills
# Generating scientific schematics with an AI image model
> Adapted from the MarkItDown skill in K-Dense-AI/claude-scientific-skills (MIT). See THIRD_PARTY_NOTICES.md.
Generate publication-style schematic images (flowcharts, block diagrams, architecture
figures) from a text description. The AI variant runs an iterative quality loop: generate,
have a vision model critique the result against the document type, regenerate until the
quality threshold or the iteration cap is hit.
## Requirements
- `OPENROUTER_API_KEY` in the environment (both scripts talk to OpenRouter).
- `httpx2` for the AI script: run it with `uv run`, which reads the script's PEP 723 block
and fetches the dependency. Plain `python3` only works if httpx2 is already installed. The
wrapper script imports only stdlib, but it re-launches the AI script with the SAME
interpreter (`sys.executable`), so it needs `httpx2` just as much - run it under
`uv run --with httpx2` too, or the child exits 1 on its first import.
## Usage
```bash
# AI generation with quality-review loop
uv run scripts/generate_schematic_ai.py "CONSORT participant flow for a two-arm RCT" -o flow.png
uv run scripts/generate_schematic_ai.py "Neural network architecture diagram" -o arch.png --iterations 2
uv run scripts/generate_schematic_ai.py "Simple block diagram" -o diagram.png --doc-type poster
# Wrapper: same quality-review loop, with the iteration cap clamped to 2
uv run --with httpx2 scripts/generate_schematic.py "Data pipeline o