Skill: Draw Things for AI Agents
Slug: drawthings-agent
Display Name: INLINECODE1
🛠 Setup & Verification (AI ACTION REQUIRED)
If
dt-skill is not found or fails with "module not found", you
MUST perform these steps:
- 1. Global Installation: Run
npm install -g @mijuu/drawthings to ensure the CLI and MCP entry points are available. - Verify Environment: Run
dt-skill doctor. If paths are missing, ask the user for their Draw Things model and server binary paths, then run dt-skill config --server-path "..." --models-path "...".
🧩 Protocol Preference (CRITICAL for AI)
This skill provides two interfaces. You
MUST follow this priority:
- 1. Model Context Protocol (MCP): If you see the tool
generate_image in your toolset, ALWAYS use it. It is the most reliable interface for AI. - CLI Interface (dt-skill): Use
dt-skill gen ONLY if the MCP tool is missing or for server management (e.g., dt-skill server start).
🛠 Target Tool
- - MCP Tool:
generate_image (Preferred) - CLI Command:
dt-skill gen (Fallback)
🤖 AI Usage Instructions
1. Basic Generation
- - MCP: Call
generate_image(prompt: "..."). - CLI: Run
dt-skill gen --prompt "...".
You
MUST provide a detailed prompt.
2. High Quality & Upscaling (CRITICAL)
If the user asks for "high quality", "high resolution", "4K", or "clear" images, you
MUST use the
--upscale parameter
at the time of generation.
- - For 2x Upscale: INLINECODE14
- For 4x Upscale:
--upscale 4 (Note: Takes significantly longer)
Example: INLINECODE16
3. Aspect Ratio & Resolution
Default is
1024x576 (16:9).
- - Square: INLINECODE18
- Portrait: INLINECODE19
- Standard: INLINECODE20
4. Model Selection
- - Default:
z_image_turbo_1.0_q6p.ckpt (Fastest, 8 steps). - Listing Models: Use
dt-skill models to see what is available before suggesting a change.
5. Task Control & Sessions
When running in environments that support background tasks (like OpenClaw or OpenCode), use
is_background: true to allow real-time progress monitoring.
- - Progress: You will see
Sampling step: X/Y. - Heartbeat: Every 30s you will see
... still working .... - Timeout: Default is 600s. For heavy 4x upscales, use
--timeout 1200.
⚠️ CRITICAL CONSTRAINTS for AI
- 1. NO TRUNCATION: Never use "..." or "etc." in the prompt. Provide the complete text.
- NO POST-PROCESSING: Upscaling MUST be part of the initial
gen command. - RESPONSE COMPRESSION: Ensure "Response Compression" (FPY) is DISABLED in Draw Things settings.
📋 Parameter Reference (CLI)
| Parameter | Type | Description |
|---|
| INLINECODE28 | String | (Required) Positive prompt |
| INLINECODE29 |
String | Elements to exclude |
|
--upscale | Number | 1, 2, or 4 |
|
--model | String | Filename of the model |
|
--steps | Number | Number of sampling steps (8-30) |
|
--seed | Number | 0 for random, or specific number |
|
--output | Path | Custom path for result |
|
--timeout | Number | Max runtime in seconds (Default 600) |
技能:面向AI代理的Draw Things
标识符: drawthings-agent
显示名称: 面向AI代理的Draw Things
🛠 设置与验证(AI必须执行的操作)
如果未找到dt-skill或出现模块未找到错误,你
必须执行以下步骤:
- 1. 全局安装:运行npm install -g @mijuu/drawthings以确保CLI和MCP入口点可用。
- 验证环境:运行dt-skill doctor。如果路径缺失,请询问用户其Draw Things模型和服务器二进制文件路径,然后运行dt-skill config --server-path ... --models-path ...。
🧩 协议优先级(对AI至关重要)
本技能提供两个接口。你
必须遵循以下优先级:
- 1. 模型上下文协议(MCP):如果在工具集中看到generate_image工具,始终使用它。这是AI最可靠的接口。
- CLI接口(dt-skill):仅在MCP工具缺失或用于服务器管理时(例如dt-skill server start)使用dt-skill gen。
🛠 目标工具
- - MCP工具:generate_image(首选)
- CLI命令:dt-skill gen(备用)
🤖 AI使用说明
1. 基础生成
- - MCP:调用generate_image(prompt: ...)。
- CLI:运行dt-skill gen --prompt ...。
你
必须提供详细的提示词。
2. 高质量与放大(至关重要)
如果用户要求高质量、高分辨率、4K或清晰的图像,你
必须在生成时使用--upscale参数。
- - 2倍放大:--upscale 2
- 4倍放大:--upscale 4(注意:耗时显著增加)
示例:dt-skill gen --prompt ... --upscale 2
3. 宽高比与分辨率
默认值为1024x576(16:9)。
- - 方形:--width 1024 --height 1024
- 竖屏:--width 576 --height 1024
- 标准:--width 1024 --height 576
4. 模型选择
- - 默认:zimageturbo1.0q6p.ckpt(最快,8步)。
- 列出模型:在建议更换模型前,使用dt-skill models查看可用模型。
5. 任务控制与会话
在支持后台任务的环境中运行时(如OpenClaw或OpenCode),使用is_background: true以允许实时进度监控。
- - 进度:你将看到采样步骤:X/Y。
- 心跳:每30秒你将看到... 仍在运行 ...。
- 超时:默认值为600秒。对于繁重的4倍放大任务,使用--timeout 1200。
⚠️ 对AI的关键约束
- 1. 禁止截断:切勿在提示词中使用...或等。提供完整文本。
- 禁止后处理:放大必须作为初始gen命令的一部分。
- 响应压缩:确保在Draw Things设置中禁用响应压缩(FPY)。
📋 参数参考(CLI)
| 参数 | 类型 | 描述 |
|---|
| --prompt | 字符串 | (必需)正向提示词 |
| --negative-prompt |
字符串 | 要排除的元素 |
| --upscale | 数字 | 1、2或4 |
| --model | 字符串 | 模型文件名 |
| --steps | 数字 | 采样步数(8-30) |
| --seed | 数字 | 0为随机,或指定数字 |
| --output | 路径 | 结果的自定义路径 |
| --timeout | 数字 | 最大运行时间(秒,默认600) |