Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
373 changes: 369 additions & 4 deletions .github/scripts/generate_skills.py

Large diffs are not rendered by default.

17 changes: 13 additions & 4 deletions .github/workflows/generate-skills.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches: [main, master]
paths:
- '**.qmd'
- 'skill.md'
- 'skill-spec.md'
- '.github/scripts/generate_skills.py'
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -119,19 +119,28 @@ jobs:
git status --short
fi

- name: Check for changes (including unified skill.md)
id: git-check-unified
run: |
if git diff --quiet skill.md && git diff --quiet -- skills/; then
echo "No unified skill or skills directory changes."
else
echo "unified_changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Commit and push skill documents
if: steps.git-check.outputs.committed == 'true'
if: steps.git-check.outputs.committed == 'true' || steps.git-check-unified.outputs.unified_changed == 'true'
run: |
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add skills/
git add skills/ skill.md
git commit -m "chore: regenerate AI skill documents" \
-m "Auto-generated skill documents from QMD tutorials."
BRANCH="${PR_BRANCH:-${{ github.ref_name }}}"
git push origin "${BRANCH}"

- name: Post PR comment
if: steps.git-check.outputs.committed == 'true' && inputs.pr_number != ''
if: (steps.git-check.outputs.committed == 'true' || steps.git-check-unified.outputs.unified_changed == 'true') && inputs.pr_number != ''
uses: actions/github-script@v7
with:
script: |
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/quarto-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,19 @@ jobs:
QUARTO_JULIA_PROJECT: ${{ env.QUARTO_JULIA_PROJECT }}
run: Rscript -e 'babelquarto::render_website()'

- name: Generate unified skill ZIP package
run: |
mkdir -p _site/
# Stage files with correct names for the zip
SKILL_TMP=$(mktemp -d)
cp skill.md "${SKILL_TMP}/skill.md"
cp files/gallery_data.csv "${SKILL_TMP}/gallery_data.csv"
cp files/gallery_data_zh.csv "${SKILL_TMP}/gallery_data_zh.csv"
cp files/bizard-skill-readme.md "${SKILL_TMP}/README.md"
(cd "${SKILL_TMP}" && zip -r - skill.md gallery_data.csv gallery_data_zh.csv README.md) > _site/bizard-skill.zip
rm -rf "${SKILL_TMP}"
echo "✅ Created _site/bizard-skill.zip ($(du -h _site/bizard-skill.zip | cut -f1))"

# ── Save freeze cache (ALWAYS – even on failure) ─────────
# This is the key to reducing wasted work across consecutive
# failed builds. Even if the render fails on file #400,
Expand Down
83 changes: 55 additions & 28 deletions Skills.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,64 @@ from: markdown+emoji

## What are Bizard Skills? :brain:

**Bizard Skills** convert every tutorial in this atlas into a compact, structured **AI skill document** — a plain-text summary of what a chart is, when to use it, what packages it needs (R, Python, or Julia), and the minimal reproducible code to produce it. Skills can be:
**Bizard Skills** is an AI skill package that turns your AI assistant into a biomedical visualization expert. When you load this skill, your AI can:

- Copied directly into AI assistant context windows (ChatGPT, Copilot, Claude, etc.)
- Used by local LLM tools like [LM Studio](https://lmstudio.ai/) or [Ollama](https://ollama.ai/)
- Downloaded as a ZIP for offline use in custom AI pipelines
- Referenced by automated bioinformatics workflows
- **Recommend** the best visualization type for your data and research question
- **Generate** reproducible R / Python / Julia plotting code adapted from Bizard tutorials
- **Search** across 793 curated figure examples using the included gallery data
- **Link** you to the full tutorial for detailed customization

The skill package works with any AI tool that supports custom instructions or knowledge files:

- **ChatGPT / GPT-4**: Load as custom instructions + knowledge file
- **Claude**: Upload as project files
- **GitHub Copilot Chat**: Reference with `#file:skill.md`
- **Local LLMs** (Ollama, LM Studio): Load as system prompt context

::: callout-tip
**How to use a skill**: Click any card below to view the skill document, then copy its content into your AI assistant prompt. You can also use the **📋 Get AI Skill** button on any tutorial page!
**Quick start**: Download the ZIP below → Load `skill.md` as your AI's instructions → Upload `gallery_data.csv` as a knowledge file → Ask: *"Help me create a volcano plot for my differential expression results"*
:::

::: callout-note
## Skill Generation Specification
Skills are generated following the professional specification in [`skill.md`](https://github.com/openbiox/Bizard/blob/main/skill.md). The specification guides both LLM-based and rule-based skill generation to ensure consistent, high-quality output.
:::
---

## Download the Skill Package {#download}

The ZIP contains:

- **`skill.md`** — AI skill instructions: teaches your AI assistant how to use Bizard for visualization recommendations and code generation
- **`gallery_data.csv`** — 793 visualization examples with image URLs, tutorial links, descriptions, and categories
- **`gallery_data_zh.csv`** — Chinese version of the gallery data
- **`README.md`** — Installation guide for different AI tools

```{=html}
<div style="text-align:center;margin:2rem 0;">
<a class="bizard-skill-dl" href="bizard-skill.zip" download
style="display:inline-flex;align-items:center;gap:0.5rem;background:linear-gradient(135deg,#3a86ff,#2563eb);color:#fff;border:none;padding:1rem 2.5rem;border-radius:10px;cursor:pointer;font-size:1.1rem;font-weight:700;text-decoration:none;box-shadow:0 4px 14px rgba(58,134,255,.3);transition:transform .15s,box-shadow .15s;"
onmouseover="this.style.transform='translateY(-2px)';this.style.boxShadow='0 6px 20px rgba(58,134,255,.4)'"
onmouseout="this.style.transform='none';this.style.boxShadow='0 4px 14px rgba(58,134,255,.3)'">
⬇️ Download Bizard Skill ZIP
</a>
</div>
<script>
// Fix download link paths for pages served under subdirectories (e.g. zh/)
(function() {
var parts = window.location.pathname.replace(/\/+$/, '').split('/');
var segmentsAfterRoot = parts.length - 2;
var prefix = '';
for (var i = 0; i < segmentsAfterRoot; i++) prefix += '../';
if (!prefix) prefix = './';
document.querySelectorAll('a.bizard-skill-dl, a[href="bizard-skill.zip"], a[href$="/bizard-skill.zip"]').forEach(function(a) {
a.href = prefix + 'bizard-skill.zip';
});
})();
</script>
```

---

## Browse Skills by Category {#browse}

Use the search box, language filter, or click a category to filter skills.
Use the search box, language filter, or click a category to browse all available visualization skills.

```{=html}
<div id="skills-browser" style="margin-bottom:2rem;">
Expand Down Expand Up @@ -179,34 +216,24 @@ function copySkill() {

---

## Download All Skills

The full skill database is available as JSON:
## Download Resources

- **[`skills/index.json`](skills/index.json)** — Lightweight index (names, categories, packages, URLs)
- **[`skills/bizard_skills.json`](skills/bizard_skills.json)** — Full skill documents with code
- **[Download Skill ZIP](bizard-skill.zip)** — Complete unified skill package
- **[`skills/index.json`](skills/index.json)** — Lightweight JSON index (names, categories, packages, URLs)
- **[`skills/bizard_skills.json`](skills/bizard_skills.json)** — Full skill documents with embedded code

## Regenerating Skills

Skills can be regenerated using the generation script, which supports both LLM-powered and offline modes:
Skills are **automatically regenerated** when tutorials are updated on the main branch. To regenerate manually:

```bash
# LLM mode (requires API key in environment)
python .github/scripts/generate_skills.py --format both --verbose

# Offline mode (rule-based extraction)
python .github/scripts/generate_skills.py --offline --format both --verbose

# Process specific files only
python .github/scripts/generate_skills.py --files Omics/VolcanoPlot.qmd --verbose
```

Skills are also **automatically regenerated** when tutorials are updated on the main branch, and can be triggered manually via a PR comment:

```
/skill → regenerate skills for changed files
/skill Omics/VolcanoPlot.qmd → regenerate for a specific file
/skill --offline → use offline mode
```
The unified `skill.md` is automatically rebuilt from the skills index every time skills are generated.

See the [Skill Generation Guide](https://github.com/openbiox/Bizard/blob/main/skill.md) for the full specification.
See the [Skill Generation Specification](https://github.com/openbiox/Bizard/blob/main/skill-spec.md) for the full technical specification.
81 changes: 54 additions & 27 deletions Skills.zh.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,64 @@ from: markdown+emoji

## 什么是 Bizard 技能? :brain:

**Bizard 技能** 将本图集中的每个教程转换为紧凑、结构化的 **AI 技能文档** — 纯文本摘要,包含图表用途、使用时机、所需包(R、Python 或 Julia)以及最小可复现代码。技能可以
**Bizard 技能** 是一个 AI 技能包,可以让你的 AI 助手成为生物医学可视化专家。加载此技能后,你的 AI 可以

- 直接复制到 AI 助手的上下文窗口中(ChatGPT、Copilot、Claude 等)
- 与本地 LLM 工具配合使用,如 [LM Studio](https://lmstudio.ai/) 或 [Ollama](https://ollama.ai/)
- 作为 ZIP 包下载,用于离线 AI 管道
- 在自动化生物信息学工作流中引用
- **推荐** 最适合你数据和研究问题的可视化类型
- **生成** 基于 Bizard 教程的可复现 R / Python / Julia 绑图代码
- **搜索** 793 个精选图形示例(使用附带的画廊数据)
- **链接** 到完整教程以获取详细的自定义选项

技能包适用于任何支持自定义指令或知识文件的 AI 工具:

- **ChatGPT / GPT-4**:作为自定义指令 + 知识文件加载
- **Claude**:作为项目文件上传
- **GitHub Copilot Chat**:使用 `#file:skill.md` 引用
- **本地 LLM**(Ollama、LM Studio):作为系统提示上下文加载

::: callout-tip
**如何使用技能**:点击下方任意卡片查看技能文档,然后将内容复制到 AI 助手提示中。您也可以在任何教程页面使用 **📋 获取 AI 技能** 按钮!
**快速开始**:下载下方 ZIP 包 → 将 `skill.md` 加载为 AI 指令 → 上传 `gallery_data.csv` 作为知识文件 → 提问:*"帮我为差异表达结果创建一个火山图"*
:::

::: callout-note
## 技能生成规范
技能根据 [`skill.md`](https://github.com/openbiox/Bizard/blob/main/skill.md) 中的专业规范生成。该规范指导 LLM 和规则引擎生成一致、高质量的技能文档。
:::
---

## 下载技能包 {#download}

ZIP 包含:

- **`skill.md`** — AI 技能指令:教会你的 AI 助手如何使用 Bizard 进行可视化推荐和代码生成
- **`gallery_data.csv`** — 793 个可视化示例,包含图片 URL、教程链接、描述和分类
- **`gallery_data_zh.csv`** — 画廊数据的中文版本
- **`README.md`** — 不同 AI 工具的安装指南

```{=html}
<div style="text-align:center;margin:2rem 0;">
<a class="bizard-skill-dl" href="bizard-skill.zip" download
style="display:inline-flex;align-items:center;gap:0.5rem;background:linear-gradient(135deg,#3a86ff,#2563eb);color:#fff;border:none;padding:1rem 2.5rem;border-radius:10px;cursor:pointer;font-size:1.1rem;font-weight:700;text-decoration:none;box-shadow:0 4px 14px rgba(58,134,255,.3);transition:transform .15s,box-shadow .15s;"
onmouseover="this.style.transform='translateY(-2px)';this.style.boxShadow='0 6px 20px rgba(58,134,255,.4)'"
onmouseout="this.style.transform='none';this.style.boxShadow='0 4px 14px rgba(58,134,255,.3)'">
⬇️ 下载 Bizard 技能 ZIP
</a>
</div>
<script>
// Fix download link paths for pages served under subdirectories (e.g. zh/)
(function() {
var parts = window.location.pathname.replace(/\/+$/, '').split('/');
var segmentsAfterRoot = parts.length - 2;
var prefix = '';
for (var i = 0; i < segmentsAfterRoot; i++) prefix += '../';
if (!prefix) prefix = './';
document.querySelectorAll('a.bizard-skill-dl, a[href="bizard-skill.zip"], a[href$="/bizard-skill.zip"]').forEach(function(a) {
a.href = prefix + 'bizard-skill.zip';
});
})();
</script>
```

---

## 按分类浏览技能 {#browse}

使用搜索框、语言筛选或点击分类来筛选技能
使用搜索框、语言筛选或点击分类来浏览所有可用的可视化技能

```{=html}
<div id="skills-browser" style="margin-bottom:2rem;">
Expand Down Expand Up @@ -175,34 +212,24 @@ function copySkill() {

---

## 下载所有技能

完整的技能数据库可通过 JSON 获取:
## 下载资源

- **[`skills/index.json`](skills/index.json)** — 轻量级索引
- **[下载技能 ZIP 包](bizard-skill.zip)** — 完整的统一技能包
- **[`skills/index.json`](skills/index.json)** — 轻量级 JSON 索引
- **[`skills/bizard_skills.json`](skills/bizard_skills.json)** — 完整技能文档

## 重新生成技能

技能支持 LLM 驱动和离线两种生成模式
技能在教程更新到主分支时**自动重新生成**。手动重新生成

```bash
# LLM 模式(需要配置 API 密钥)
python .github/scripts/generate_skills.py --format both --verbose

# 离线模式(基于规则提取)
python .github/scripts/generate_skills.py --offline --format both --verbose

# 仅处理特定文件
python .github/scripts/generate_skills.py --files Omics/VolcanoPlot.qmd --verbose
```

技能在教程更新到主分支时**自动重新生成**,也可以在 PR 中通过评论命令手动触发:

```
/skill → 重新生成已更改文件的技能
/skill Omics/VolcanoPlot.qmd → 重新生成特定文件的技能
/skill --offline → 使用离线模式
```
统一的 `skill.md` 在每次生成技能时从技能索引自动重建。

查看完整规范:[技能生成指南](https://github.com/openbiox/Bizard/blob/main/skill.md)。
查看完整技术规范:[技能生成规范](https://github.com/openbiox/Bizard/blob/main/skill-spec.md)。
52 changes: 52 additions & 0 deletions files/bizard-skill-readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Bizard AI Skill — Installation Guide

## What's in this package?

| File | Purpose |
|------|---------|
| `skill.md` | The AI skill instruction document — load this into your AI assistant |
| `gallery_data.csv` | 793 visualization examples with image URLs, tutorial links, descriptions, and categories |
| `gallery_data_zh.csv` | Chinese version of the gallery data |
| `README.md` | This file |

## Quick Start

### ChatGPT / GPT-4

1. Go to **Settings → Personalization → Custom Instructions** (or create a GPT)
2. Paste the contents of `skill.md` into the system prompt / instructions
3. Upload `gallery_data.csv` as a knowledge file
4. Ask: *"I want to compare gene expression across cancer subtypes"*

### Claude

1. Start a new project or conversation
2. Upload `skill.md` and `gallery_data.csv` as project files
3. Ask: *"Help me create a volcano plot for my differential expression results"*

### GitHub Copilot Chat

1. Add `skill.md` and `gallery_data.csv` to your workspace
2. Reference them with `#file:skill.md` in Copilot Chat
3. Ask: *"Based on the Bizard skill, suggest a visualization for my survival data"*

### Local LLMs (Ollama, LM Studio, etc.)

1. Load `skill.md` as part of your system prompt
2. Provide `gallery_data.csv` as context when asking visualization questions
3. The skill will guide the model to recommend appropriate chart types and code

## What can this skill do?

Once installed, your AI assistant can:

- **Recommend** the best visualization type for your biomedical data
- **Generate** reproducible R / Python / Julia code based on Bizard tutorials
- **Link** to the full tutorial at https://openbiox.github.io/Bizard/ for detailed customization
- **Search** the gallery data to find specific figure examples

## Learn More

- **Website**: https://openbiox.github.io/Bizard/
- **Repository**: https://github.com/openbiox/Bizard
- **License**: CC-BY-NC — Bizard Collaboration Group, Luo Lab, and Wang Lab
Loading