scientific-diagram-generation

scientific-diagram-generation is a skill for Claude Code, Codex from Zaoqu-Liu/ScienceClaw. It costs 0 tokens per session (1,755 once invoked), scanned A, original, MIT.

An image-generation tool for creating scientific illustrations, including diagrams of mechanisms, biological pathways, and other research figures. It uses Google's Gemini image model through an API.

In plain words
What is it for?
Use it to create diagrams and publication-style illustrations for research documents and presentations.
Why use it?
It helps turn scientific ideas into visual figures when a written explanation alone is difficult to follow.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create diagrams and publication-style illustrations for research documents and presentations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zaoqu-liu/scienceclaw/scientific-diagram-generation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Zaoqu-Liu/ScienceClaw --skill scientific-diagram-generation
Clone the repo
git clone --depth 1 https://github.com/Zaoqu-Liu/ScienceClaw

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for scientific-diagram-generation

README.md
[![agentmods](https://agentmods.dev/badge/skills/zaoqu-liu/scienceclaw/scientific-diagram-generation/github.svg)](https://agentmods.dev/skills/zaoqu-liu/scienceclaw/scientific-diagram-generation)
Your own site
<a href="https://agentmods.dev/skills/zaoqu-liu/scienceclaw/scientific-diagram-generation"><img src="https://agentmods.dev/badge/skills/zaoqu-liu/scienceclaw/scientific-diagram-generation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for scientific-diagram-generation

Your own site · 80×15
<a href="https://agentmods.dev/skills/zaoqu-liu/scienceclaw/scientific-diagram-generation"><img src="https://agentmods.dev/badge/skills/zaoqu-liu/scienceclaw/scientific-diagram-generation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,755 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01755
Opus 5.5 $0.00000 $0.00702
Sonnet 5.5 $0.00000 $0.00351
Haiku 4.5 $0.00000 $0.00176

Measured 2mo ago against content hash 9dced965e077, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

scientific-diagram-generation scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X POST "${GEMINI_BASE_URL:-https://generativelanguage.googleapis.com/v1beta}/models/gemini-3.1-flash-image-preview:generateContent" \
skills/scientific-diagram-generation/SKILL.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Scientific Diagram Generation

AI-powered scientific illustration generation using Gemini Image models. Creates publication-quality mechanism diagrams, pathway illustrations, and scientific figures.

API Configuration

Parameter Value
Provider Google Gemini
Model gemini-3.1-flash-image-preview
Base URL ${GEMINI_BASE_URL:-https://generativelanguage.googleapis.com/v1beta}/models
Full Endpoint ${GEMINI_BASE_URL}/models/gemini-3.1-flash-image-preview:generateContent
Auth Authorization: Bearer <LLM_API_KEY>
API Key env var LLM_API_KEY (Gemini series key)
Response Image in candidates[].content.parts[].inlineData.data (base64 PNG)

API Call Structure

curl -X POST "${GEMINI_BASE_URL:-https://generativelanguage.googleapis.com/v1beta}/models/gemini-3.1-flash-image-preview:generateContent" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LLM_API_KEY" \
  -d '{
    "contents": [{"role": "user", "parts": [{"text": "YOUR_PROMPT_HERE"}]}],
    "generationConfig": {
      "responseModalities": ["TEXT", "IMAGE"]
    }
  }'

Python Implementation

import httpx, base64

API_KEY = "your-gemini-key"
MODEL = "gemini-3.1-flash-image-preview"
BASE = os.environ.get("GEMINI_BASE_URL", "https://generativelanguage.googleapis.com/v1beta")
URL = f"{BASE}/models/{MODEL}:generateContent"

async def generate(prompt: str) -> bytes:
    payload = {
        "contents": [{"role": "user", "parts": [{"text": prompt}]}],
        "generationConfig": {"responseModalities": ["TEXT", "IMAGE"]}
    }
    async with httpx.AsyncClient(timeout=120) as c:
        r = await c.post(URL, json=payload,
            headers={"Content-Type": "application/json",
                     "Authorization": f"Bearer {API_KEY}"})
        r.raise_for_status()
        for cand in r.json().get("candidates", []):
            for part in cand["content"]["parts"]:
                if "inlineData" in part:
                    return base64.b64decode(part["inlineData"]["data"])
    return b""

Read the full file on GitHub · 197 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 197 lines · 0 tokens per session scan A 9dced965e077

Subscribe to this mod's changes

scientific-diagram-generation is a skill published in the GitHub repository Zaoqu-Liu/ScienceClaw (60 stars, last pushed 20d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,755 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

scientific-diagram-generation compared with skills from other repositories

scientific-diagram-generation next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
scientific-diagram-generationZaoqu-Liu/ScienceClawSkill6020d agoMITA0Claude Code, Codex
instrument-data-to-allotropeanthropics/knowledge-work-pluginsSkill37k4d agoApache-2.0A123Claude Code
matlabK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA44Claude Code
exploratory-data-analysisK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA83Claude Code
phylogeneticsK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA71Claude Code, Codex
research-engineerdavila7/claude-code-templatesSkill34ktodayMITA43Claude Code, Codex
mapping-to-snomedmaziyarpanahi/openmedSkill5.9ktodayApache-2.0A205Claude Code