当前位置: 首页 > Skill >

Chalk Art Image Generator

Chalk Art Image Generator

Chalk Art Image Generator

生成粉笔画和黑板艺术。适用于用户请求粉笔画、黑板菜单或深色背景粉彩画。

1.0.1 2026.11.11 946
获取Skill文件查看使用说明
作 者:许知 许可证: 更新时间:2026.11.11
本文目录展开

Chalk Art Image Generator (chalk-art-image-generator)

Generate chalkboard art and chalk drawings. Use when the user asks for chalk art, blackboard menu, or pastel drawing on dark background.

This skill follows a single aggregated gateway backend model. One API key is used locally, while multiple models are aggregated behind the gateway. The CLI wraps the full async flow: submit task -> poll lowercase task_status -> fetch data.images. The backend platform is a fixed implementation choice, not a configurable provider switch. If another platform is needed, publish a separate skill for it.

The design goal is smooth automation for common workflows such as single-image generation, multi-file prompts, image-to-image with references, batch jobs, EXTEND defaults, and reusable style presets. Full gateway-alignment notes are in references/weryai-platform.md.

Strict Style Enforcement

As the Chalk Art Image Generator agent, you MUST always enforce this specific style.

  1. Always append --style chalk to your chalk-art-image-generator CLI command.
  2. When building the prompt, seamlessly blend these keywords into the visual description: "chalk drawing, on blackboard, dusty, textured lines, pastel colors on dark background". Do not ask the user which style they want, because this skill is strictly dedicated to Chalk Art Image Generator.

Safety & Scope

  • Network: This skill calls the WeryAI gateway over HTTPS (https://api.weryai.com).
  • Auth: Uses IMAGE_GEN_API_KEY. The key is never printed. It may be persisted only when you explicitly run npm run setup -- --persist-api-key.
  • Reference images: Must be public URLs (https:// recommended). http:// may work but is insecure. Local file paths and data: URLs are rejected.
  • No arbitrary shell: The generation runtime does not execute arbitrary shell commands.
  • Files written: Output images and optional local config under .image-skills/chalk-art-image-generator/ (project) and/or ~/.image-skills/chalk-art-image-generator/ (home).

Current Gateway Contract (WeryAI)

Item Contract
Base URL https://api.weryai.com (hard-coded in scripts/main.ts)
Auth Authorization: Bearer via IMAGE_GEN_API_KEY (get a key)
text-to-image POST /v1/generation/text-to-image; requires model, prompt, aspect_ratio
image-to-image POST /v1/generation/image-to-image; also requires images[]
status lookup GET /v1/generation/{taskId}/status; task_status is waiting, processing, succeed, or failed
business success success: true (or status: 200); failures return business codes such as 1001, 1002, 1003
text length the script validates prompt and negative_prompt lengths before request submission
result download after succeed, images are fetched by URL; the script uses timeout, retry, backoff, optional Bearer retry, and minimum-payload validation

See references/weryai-platform.md for field mapping, model lookup guidance, and troubleshooting flow.

Step 0: First-Trigger Readiness Gate

When this skill is triggered for the first time in a project or environment, the agent must not jump straight to model selection or generation. It must do this first:

  1. Check local readiness silently with npm run ensure-ready -- --project . --workflow <workflow>
  2. If runtime dependencies are missing, propose to install them on behalf of the user
  3. If IMAGE_GEN_API_KEY is missing, ask the user for permission to configure it now
  4. Only after readiness and API key are resolved, continue to model selection / prompt clarification / generation

Access token: only use IMAGE_GEN_API_KEY. It may also live in .image-skills/chalk-art-image-generator/.env as IMAGE_GEN_API_KEY=.... After the user approves, the agent may persist it there by running npm run setup -- --project . --workflow <workflow> --persist-api-key when the key is already in env, or by writing the file locally on the user's behalf instead of asking the user to edit files manually.

First-use readiness check: before the first generation run in a new OpenClaw or local instance, the agent must run:

npm run ensure-ready -- --project . --workflow <workflow>

This readiness step is not optional. It checks the local toolchain, reads the local doctor report, and automatically runs bootstrap when local script dependencies are missing.

First-trigger user behavior:

  • If dependencies are missing: ask for approval to install them, then install silently
  • If IMAGE_GEN_API_KEY is missing: tell the user image generation needs an API key and offer to configure it now by writing .image-skills/chalk-art-image-generator/.env on the user's behalf
  • Do not ask the user to debug the environment before this readiness gate runs
  • Do not ask the user to choose a model before readiness and API key are resolved
  • Treat API keys as secrets: prefer writing them locally on the user's behalf, never echo them back, and never include them in normal progress messages

EXTEND.md is optional and can hold default model, quality, aspect ratio, and batch worker limits.

test -f .image-skills/chalk-art-image-generator/EXTEND.md && echo project
test -f "$HOME/.image-skills/chalk-art-image-generator/EXTEND.md" && echo user

Default model on initialization: if no model is configured yet, initialize this skill with Nano Banana 2 (GEMINI_3_1_FLASH_IMAGE) and tell the user that it is now the default. Also remind them they can switch models anytime later.

Model selection: after initialization, one of these provides the active default:

  • --model
  • default_model in EXTEND.md
  • IMAGE_GEN_DEFAULT_MODEL

If none of them is set yet, the agent should initialize the local default to Nano Banana 2 first, tell the user that this workspace now defaults to that model, and remind them they can switch anytime if another model fits better. See references/config/first-time-setup.md, references/config/preferences-schema.md, and references/config/model-registry-schema.md.

Style presets: references/style-presets.md

Model priority:

--model -> EXTEND.md default_model -> IMAGE_GEN_DEFAULT_MODEL

If No Model Was Specified

When the user wants image generation but no model is configured (EXTEND.md, --model, and IMAGE_GEN_DEFAULT_MODEL are all absent):

Do not ask the user to read docs or edit config files. Follow the guided flow in references/config/first-time-setup.md § "Model Selection — Agent-Guided Flow":

  1. Start from the bundled starter registry shipped with this skill. If the model list looks stale or a requested model is missing, refresh it silently with npm run discover-image-models -- --out .image-skills/chalk-art-image-generator/MODELS.json
  2. Initialize local defaults with Nano Banana 2 (GEMINI_3_1_FLASH_IMAGE) by writing EXTEND.md
  3. Tell the user that the default model is now Nano Banana 2, and explicitly remind them they can switch anytime later if they need another model
  4. Continue to prompt clarification and generation
  5. If the user immediately asks for another model, rank candidates for the workflow → npm run recommend-model -- --workflow <workflow> --role <role> --json, then update EXTEND.md

If the workflow is more specific than a generic single image, prefer a role-aware recommendation such as comic-page, comic-character-sheet, infographic-dense, or article-framework instead of only passing the broad workflow name.

If the user later asks to switch models, update EXTEND.md in place — do not ask the user to edit it manually.

If the gateway returns "model does not exist" or a similar model-key error, the agent must first refresh from WeryAI docs and retry recommendation before asking the user for any platform-side information.

If The Request Is Underspecified

When the user gives only a rough idea and the visual brief is still weak, do not jump straight into prompt writing. Use the local brief helper first:

npm run build-visual-brief -- --workflow cover --topic "Habit systems"

Use its question menu to ask about at least:

  1. Photorealistic or illustration
  2. Color temperature / palette direction
  3. Shot language (close-up, wide, etc.)
  4. Composition pattern
  5. Aspect ratio
  6. Text density

Then map the answered brief into the final prompt or workflow files.

Do not tell the user to go read the docs alone. If the CLI fails because the model is missing, the agent should complete this selection flow and retry.

Workflow

  1. On first trigger, run the readiness gate: check dependencies, bootstrap missing local tooling, and confirm IMAGE_GEN_API_KEY.
  2. Confirm a default model is configured (via EXTEND.md or environment), or enter the guided model-selection flow.
  3. Build the prompt: inline text (--prompt) or assembled from files (--promptfiles).
  4. Choose a style preset if applicable (--style).
  5. Run the CLI to submit the task, poll for completion, and download the result.
  6. For multiple images, use batch mode (--batchfile) with parallel jobs.

Script

{baseDir} is the directory containing this file. ${BUN_X} is either bun or npx -y bun.

Path Purpose
{baseDir}/scripts/main.ts the only execution entrypoint

Usage

# examples only; M should be chosen by the user or resolved by the agent
M=<chosen model key>

# single image
${BUN_X} {baseDir}/scripts/main.ts --prompt "a cat" --image cat.png --ar 1:1 -m "$M"

# prompt assembled from multiple files
${BUN_X} {baseDir}/scripts/main.ts --promptfiles system.md user.md --image out.png --ar 16:9 -m "$M"

# style preset
${BUN_X} {baseDir}/scripts/main.ts --prompt "city nightscape" --style cinematic --image out.png --ar 16:9 -m "$M"

# image-to-image with reference
${BUN_X} {baseDir}/scripts/main.ts --prompt "turn it into cyberpunk" --image out.png --ref src.png --ar 1:1 -m "$M"

# quality / resolution
${BUN_X} {baseDir}/scripts/main.ts --prompt "poster" --image poster.png --ar 16:9 --quality 2k -m "$M"
${BUN_X} {baseDir}/scripts/main.ts --prompt "poster" --image poster.png --ar 16:9 --imageSize 2K -m "$M"

# infer aspect from size when --ar is omitted
${BUN_X} {baseDir}/scripts/main.ts --prompt "scene" --image scene.png --size 1280x720 -m "$M"

# batch mode
${BUN_X} {baseDir}/scripts/main.ts --batchfile batch.json --jobs 4 --json

# do not write downloaded images to disk
${BUN_X} {baseDir}/scripts/main.ts --prompt "abstract" --image dummy.png --ar 1:1 --no-download -m "$M"

# dry-run request preview; --image is optional here
${BUN_X} {baseDir}/scripts/main.ts --prompt "test" --ar 1:1 -m "$M" --dry-run

Batch JSON Example

{
  "jobs": 4,
  "tasks": [
    {
      "id": "hero",
      "promptFiles": ["prompts/hero.md"],
      "image": "out/hero.png",
      "model": "<model key from gateway docs>",
      "style": "editorial",
      "ar": "16:9",
      "quality": "2k",
      "use_web_search": false
    },
    {
      "id": "edit",
      "prompt": "turn it into watercolor",
      "image": "out/edit.png",
      "ref": ["assets/in.png"],
      "negative_prompt": "blurry",
      "webhook_url": "https://example.com/hook"
    }
  ]
}

Paths are resolved relative to the batch file directory. If a provider field exists, it is ignored in single-gateway mode. Task-level optional fields include style, webhook_url, negative_prompt, resolution, use_web_search, and caller_id.

Main Options

Option Description
--prompt / -p prompt text
--promptfiles concatenate multiple files into the prompt
--image / -o / --output output path in single-task mode; defaults to .png if no extension is given
--batchfile batch JSON file
--jobs worker count
--model / -m model key; one of CLI / EXTEND.md / IMAGE_GEN_DEFAULT_MODEL must provide it
--style style preset, see style-presets.md
--ar / --aspect-ratio aspect ratio; defaults to EXTEND.md or 1:1
--size WIDTHxHEIGHT; can infer aspect ratio if --ar is omitted
--quality normal or 2k, mapped into gateway resolution
--imageSize 1K, 2K, or 4K
--resolution pass resolution directly to the API
--negative-prompt negative prompt
--ref / --reference reference image, either URL or local file
--n image_number (default: 1)
--webhook-url gateway webhook_url
--use-web-search set use_web_search: true
--caller-id gateway caller_id
--poll-interval-ms / --poll-timeout-ms polling controls
--no-download skip file writing
--dry-run print the final request body instead of calling the API
--json JSON summary or batch report

Parallelism and Retry

  • Batch jobs use gated concurrency through --jobs, with environment overrides such as BASE_IMAGE_GEN_CONCURRENCY and BASE_IMAGE_GEN_START_INTERVAL_MS.
  • A single task retries up to 3 times, but obvious parameter or auth errors are not retried.
  • Batch worker caps come from batch.max_workers in EXTEND.md or BASE_IMAGE_MAX_WORKERS.

Environment Variables

Variable Description
IMAGE_GEN_API_KEY the only API key variable
IMAGE_GEN_DEFAULT_MODEL default model key
BASE_IMAGE_MAX_WORKERS override batch worker limit
BASE_IMAGE_GEN_CONCURRENCY batch concurrency
BASE_IMAGE_GEN_START_INTERVAL_MS minimum delay between batch task starts

Supported .env locations:

  • <cwd>/.image-skills/.env
  • $HOME/.image-skills/.env

Existing environment variables are not overwritten.

Agent Notes

  1. On first use in a new environment, run npm run ensure-ready -- --project . --workflow <workflow> from this skill directory before generation. Do not skip this just because direct API calls appear to work.
  2. Confirm that IMAGE_GEN_API_KEY is available, directly or through .image-skills/.env.
  3. If the model is missing, complete the model-selection flow above before running the CLI.
  4. Single-task mode usually requires --image, but --dry-run may omit it. If --ref is present, the script uses the image-to-image endpoint.
  5. Polling behavior is: waiting / processing -> keep polling, succeed -> use images, failed -> inspect msg.
  6. The selected model key is printed to stderr for easier debugging.

User Feedback During Generation

  • Before generation starts: tell the user what's about to happen, including the model being used (e.g., "Generating your cover with Model X, roughly 30 seconds"). Never start silently.
  • Model disclosure: always mention the model name/key when generation begins. This helps the user understand quality expectations and makes later model switching easier.
  • Batch generation: estimate the total count and rough time. As images complete, show them incrementally — do not wait for the entire batch to finish before showing anything.
  • On failure: do not dump error codes. Translate the failure into a user-level explanation and suggest a fix (e.g., "This model is temporarily unavailable — want to try another one?").
  • On timeout: if polling exceeds the expected window, proactively inform the user (e.g., "Taking longer than usual, still waiting") rather than staying silent.
  • On completion: send/display the image immediately. Never output just a filename — the user must see the actual image. If the platform supports file sending, send the file. If it supports inline rendering, render inline. If neither works, provide a download URL.

Interaction Rules (Mandatory)

These rules apply to every user interaction. They are not optional guidelines.

  1. Never show commands, file paths, config syntax, or schema details to the user. All tool execution is silent.
  2. Never ask the user to edit config files. The agent writes EXTEND.md, MODELS.json, and other configs on behalf of the user.
  3. Ask one question at a time. Do not present all dimensions at once. Lead with the highest-impact choice.
  4. Offer concrete options with descriptions, not raw technical names. If presenting styles, describe what each looks like.
  5. Always disclose the model and estimated time when generation starts.
  6. Show images directly when delivering results. Never respond with only file paths or file names. If the channel supports sending image files, send the file. If it supports inline display, display inline. If neither is possible, provide a clickable download link. A bare filename like output.png is never acceptable delivery.
  7. On iteration, only re-generate what changed. Do not restart the entire workflow.
  8. If tools are missing, propose to install them on behalf of the user — never expose tool names, PATH errors, or ask the user to run install commands. See "Missing Tools" below.
  9. Default to Nano Banana 2 unless the user asks otherwise. When no default model is configured yet, initialize GEMINI_3_1_FLASH_IMAGE (Nano Banana 2), tell the user that it is now the default for this skill, and explicitly remind them they can switch any time if another model fits better.
  10. Reply in the user's language. Match the language the user is using for questions, status updates, explanations, and delivery messages unless they explicitly ask you to switch.
  11. On first trigger, run readiness before anything else. Check dependencies and IMAGE_GEN_API_KEY status before asking the user to choose a model or before starting generation.
  12. Handle API keys as secrets. Offer to configure IMAGE_GEN_API_KEY locally for the user, avoid asking them to paste secrets into normal chat when a local write is possible, and never repeat or quote the key back.

Re-run Behavior

  • Running main.ts with the same --image path overwrites the existing output file.
  • --batchfile re-processes all tasks in the batch; completed images are overwritten.
  • --dry-run never writes files regardless of prior state.
  • Polling a previously completed taskId returns the cached result without re-generating.

Definition of Done

  • IMAGE_GEN_API_KEY is configured and a default model is set in EXTEND.md.
  • The CLI produces a valid image file (or a correct --dry-run request body).
  • Batch mode completes all tasks and reports per-task status via --json.
  • Failed tasks include a user-readable explanation, not just an error code.
  • The model name is disclosed to the user before generation starts.

Missing Tools

If bun and npx are both unavailable in the current environment:

  1. Do not expose tool names or PATH errors to the user. Never mention "bun", "npx", "PATH", or installation commands.
  2. Propose installation in user-friendly terms. Say something like: "I need to set up a small runtime to generate images — OK if I install it now? Takes about 30 seconds."
  3. On user approval, run npm install -g bun or the platform-appropriate installer silently. Report success or failure in plain language.
  4. If the user declines or installation fails, explain honestly: "I can't generate images in this environment right now. You can ask your admin to set up the image toolchain, or try again in a different environment."
  5. Never ask the user to install tools themselves or paste terminal commands.

Troubleshooting

See references/weryai-platform.md. For failed calls, compare the request and response with call history.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,034
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,019
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,017
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,014
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,013
Skill 文件
  • SKILL.md
    • Chalk Art Image Generator (chalk-art-image-generator)
    • Strict Style Enforcement
    • Safety & Scope
    • Current Gateway Contract (WeryAI)
    • Step 0: First-Trigger Readiness Gate
    • If No Model Was Specified
    • If The Request Is Underspecified
    • Workflow
    • Script
    • Usage
      • Batch JSON Example
    • Main Options
    • Parallelism and Retry
    • Environment Variables
    • Agent Notes
    • User Feedback During Generation
    • Interaction Rules (Mandatory)
    • Re-run Behavior
    • Definition of Done
    • Missing Tools
    • Troubleshooting
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期