360 Secure SkillHub
360 安全技能中心

Clawhub Skill

这是一个 TypeScript 命令行工具,输入论文方法章节文本和图注,经规划、润色、可视化、批评迭代等多智能体模式,调用阿里云 DashScope 的文生图模型生成架构图或数据图并输出 PNG 文件;支持候选数量、批评轮次、宽高比、任务类型与多种图像模型选择,需用户自行配置 DashScope API Key。

zdywrnm
zdywrnm
热度 47.57
最近更新 2026-05-11 17:38:19
分类:创作依赖:代码执行 / 读写文件 / 第三方 API应用场景:图像生成 / 研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add paperbanana-dashscope
Metadata
name
paperbanana-dashscope
description
Generate academic figures and scientific diagrams from paper text using a multi-agent pipeline powered by Alibaba Cloud DashScope (Qwen-VL + Wanxiang/Qwen-Image). Use when the user wants to create figures for research papers, visualize methods sections, generate architecture diagrams, or produce illustrations for academic content. Supports diagram and plot tasks with multi-round critic refinement.

paperbanana-dashscope

Native TypeScript CLI for generating academic figures from paper text. Zero Python dependencies. Powered by Alibaba Cloud DashScope.

Install & Update

npm install -g paperbanana-dashscope
paperbanana-dashscope --version

Prerequisites

User must configure a DashScope API key. Check current status:

paperbanana-dashscope info

If no API key is configured, set one of:

# Option 1: Environment variable (simplest)
export OPENAI_API_KEY="sk-xxx"

# Option 2: Global config file
mkdir -p ~/.paperbanana-dashscope
cat > ~/.paperbanana-dashscope/config.yaml << 'YAML'
defaults:
  main_model_name: "qwen-vl-max"
  image_gen_model_name: "wanx2.1-t2i-turbo"
api_keys:
  openai_api_key: "sk-xxx"
YAML

Basic Usage

Generate a single figure from text:

paperbanana-dashscope generate \
  --content "Method section text describing the architecture..." \
  --caption "Figure 1: System overview" \
  --output ~/Downloads/figure.png \
  --num-candidates 1

Key Options

Option Description Default
--content <text> Paper text describing the method required
--caption <text> Figure caption required
--output <path> Output PNG file path required
--task <type> diagram or plot diagram
--num-candidates <n> Number of candidates to generate 1
--max-critic-rounds <n> Critic refinement iterations 3
--aspect-ratio <ratio> 1:1, 16:9, 4:3, 21:9, etc 21:9
--main-model-name <id> VLM for planning/critic qwen-vl-max
--image-gen-model-name <id> Image generation model wanx2.1-t2i-turbo

Available Image Models

DashScope supports three families of text-to-image models:

Wanxiang legacy (fast, cheap):

  • wanx2.1-t2i-turbo (default, fastest)
  • wanx2.1-t2i-plus (better quality)

Wanxiang 2.7 (latest, highest quality):

  • wan2.7-image-pro (professional, supports 4K output in text-to-image)
  • wan2.7-image (standard, supports up to 2K, same pricing as wan2.6)

Wanxiang 2.x (previous generation):

  • wan2.6-t2i (flagship of 2.6 series)
  • wan2.5-t2i-preview
  • wan2.2-t2i-flash / wan2.2-t2i-plus

Qwen-Image (best for figures with text labels):

  • qwen-image-plus (recommended for diagrams with English/Chinese labels)
  • qwen-image-max (top-tier text rendering)

Switch models inline:

paperbanana-dashscope generate \
  --content "..." \
  --caption "..." \
  --image-gen-model-name wan2.6-t2i \
  --output figure.png

Pipeline Modes

Use --exp-mode to control which agents run:

Mode Agents Use case
vanilla Vanilla only Fastest, no refinement
dev_planner Planner only Just generate description
dev_planner_critic Planner + Critic With refinement loop
dev_full Planner + Stylist + Visualizer + Critic Full pipeline
demo_full Same as dev_full + retriever Default, best quality

Common Workflows

Quick draft (fast, low cost):

paperbanana-dashscope generate \
  --content "..." \
  --caption "..." \
  --output draft.png \
  --exp-mode vanilla \
  --image-gen-model-name wanx2.1-t2i-turbo

High-quality figure for paper submission:

paperbanana-dashscope generate \
  --content "..." \
  --caption "..." \
  --output paper_fig.png \
  --image-gen-model-name wan2.6-t2i \
  --num-candidates 3 \
  --max-critic-rounds 5

Figure with English/Chinese text labels:

paperbanana-dashscope generate \
  --content "..." \
  --caption "..." \
  --output labeled.png \
  --image-gen-model-name qwen-image-plus

Troubleshooting

  • "未检测到任何 API Key": Run paperbanana-dashscope info and follow the configuration guide.
  • "size is not in the correct format": This is fixed in v1.0.2+. Run npm update -g paperbanana-dashscope.
  • "url error": Old version. Upgrade to v1.0.2+ for support of new wan2.6 / qwen-image models.

Resources