Logotipo de Image Generate

Image Generate

Comunidad
sagirimo
image-generate

Generate scientific illustrations (graphical abstracts, mechanism schematics, cover art, poster art) from a text prompt through the image provider configured in the BioDSH app. Not for data plots.

Descripción general

Editorsagirimo
RepositorioBioDSH
Nombre de la habilidadimage-generate
Estrellas
65
Forks
2
Archivos incluidos
2
LicenciaMIT
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Archivos incluidos: 2

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por sagirimo en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Image Generate en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/sagirimo/BioDSH/tree/main/biodsh-core/skills/image-generate
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sagirimo/BioDSH.git /tmp/BioDSH
mkdir -p .claude/skills
cp -r /tmp/BioDSH/biodsh-core/skills/image-generate .claude/skills/image-generate
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Image Generate en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Image Generate automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Image Generate no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

AI scientific illustration (text-to-image)

Use this skill when the user wants a picture that is drawn, not computed: a graphical abstract, a mechanism or pathway schematic, a cell/tissue cartoon, journal cover art, a poster hero image, a conceptual figure for a talk.

Do not use it for data plots (UMAP, volcano, heatmap, bar/box plots, survival curves). Those must come from the data through matplotlib/seaborn/scanpy so that every point is real. An image model cannot plot data; it only paints something that looks like a plot.

Provider configuration

The provider is configured by the user in the BioDSH app under 更多 → 图像生成 (base URL, API key, model). The app passes it to this script as environment variables BIODSH_IMAGE_BASE_URL, BIODSH_IMAGE_API_KEY, BIODSH_IMAGE_MODEL. Any OpenAI-compatible Images API works (OpenAI gpt-image-1, 智谱 CogView cogview-4-250304, SiliconFlow Kwai-Kolors/Kolors, 通义万相 wan2.2-t2i-flash, ...).

If the script prints {"error": "...not configured..."}, tell the user to fill in 更多 → 图像生成 in the app. Never guess a base URL or key and never ask the user to paste a key into the chat.

Command

bash
python "<skill dir>/generate.py" --prompt "..." --out generated_images

Options: --name NAME (file stem, default: slug of the prompt + timestamp), --size 1024x1024 (normalized per provider, e.g. 智谱 accepts 1024x1024, 768x1344, 864x1152, 1344x768, 1152x864, 1440x720, 720x1440), --n 1 (number of variants), --style scientific|flat|photo|none (default scientific, prepends a style template to your prompt), --negative "..." (things to avoid), --reference path.png (OpenAI-style providers only; others return an error).

Output: generated_images/<name>-1.png (one file per variant) plus generation.json (prompt, final prompt, model, provider hostname, size, files, elapsed seconds). The script prints the same JSON to stdout. On failure it prints {"error": ...} and exits 1; report the error text to the user as-is (HTTP status and body excerpt are included) and do not retry in a loop.

Writing a good prompt for a scientific figure

State, in one or two sentences each:

  • Subject — the biological entities and the relationship between them: "a T cell contacting a tumor cell through PD-1/PD-L1, with a blocking antibody in between".
  • Style — the --style scientific template already asks for a clean vector-like illustration on a white background with flat colors; add only the deviations ("isometric", "watercolor", "dark background for a slide").
  • Layout — left-to-right flow, number of panels, where the arrows go, what is enlarged in an inset.
  • What to avoid — put it in --negative: "text, letters, watermark, photorealistic gore, extra limbs, cluttered background". Ask for no text whenever possible: models misspell gene names; add labels afterwards in PowerPoint/Illustrator.

Keep prompts concrete and short (under ~80 words). Generate 2–3 variants (--n 2) when the user is exploring, one when they know what they want. Iterate on wording rather than re-running the same prompt.

After generation

  • Report the absolute path of every PNG to the user and show the image if the interface supports it.
  • Remind the user to check the image for factual errors: image models invent labels, ligand/receptor pairs, organelle shapes and arrow directions. A generated schematic is a draft to be corrected, not a source of truth, and should be labelled as AI-generated in a manuscript where the journal requires it.
  • Record the prompt in the report (it is in generation.json) so the figure can be regenerated.

Examples

bash
# graphical abstract, two variants to choose from
python "<skill dir>/generate.py" --prompt "left: a tumor with infiltrating T cells; right: the same tumor after anti-PD-1 therapy with more T cells and shrinking tumor; arrow between them" --n 2 --out generated_images

# wide poster banner, 智谱 CogView accepts 1440x720
python "<skill dir>/generate.py" --prompt "cross-section of a lymph node with B-cell follicles and T-cell zones" --size 1440x720 --negative "text, letters" --out generated_images

# photo-like cover art
python "<skill dir>/generate.py" --prompt "close-up of a single neuron with glowing synapses on a dark background" --style photo --name cover --out generated_images

Chinese prompt tips

Most image models follow English prompts more reliably than Chinese ones (CogView and 万相 handle Chinese well; OpenAI and Kolors prefer English). When the user writes the request in Chinese, translate the subject/style/layout into a precise English prompt internally before calling the script, but keep all your replies, file descriptions and the summary in Chinese. Do not translate gene, protein or drug names — keep the standard symbols (PD-1, TP53, KRAS G12C). If the user wants Chinese characters inside the image, warn that most models render CJK text poorly and suggest adding the text afterwards.

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Son archivos de solo lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA Image Generate?

Generate scientific illustrations (graphical abstracts, mechanism schematics, cover art, poster art) from a text prompt through the image provider configured in the BioDSH app. Not for data plots.

¿Por qué usar Image Generate en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Image Generate está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Image Generate en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/sagirimo/BioDSH/tree/main/biodsh-core/skills/image-generate. TypingMind lee el archivo SKILL.md de esa carpeta, empaqueta los archivos de la carpeta e instala el conjunto como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Image Generate?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Image Generate?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Image Generate con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Image Generate?

Sí. sagirimo la ha publicado en GitHub bajo la licencia MIT. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇