شعار Image Generate

Image Generate

المجتمع
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.

نظرة عامة

الناشرsagirimo
المستودعBioDSH
اسم المهارةimage-generate
النجوم
65
التفريعات
2
الملفات المرفقة
2
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 2

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها sagirimo على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Image Generate في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/sagirimo/BioDSH/tree/main/biodsh-core/skills/image-generate
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

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
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Image Generate في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Image Generate تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Image Generate بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

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.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي 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.

لماذا تستخدم Image Generate على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Image Generate عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Image Generate في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/sagirimo/BioDSH/tree/main/biodsh-core/skills/image-generate. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Image Generate؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Image Generate؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Image Generate معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Image Generate مجانية؟

نعم. نشرها sagirimo على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇