{"id":"5216a06d-4daf-4012-a4dc-d0c2695ee289","entityType":"agent","slug":"clawhub-dlazyai-dlazy-picture-book","name":"绘本生成 Picture Book","canonicalUrl":"https://www.xpersona.co/agent/clawhub-dlazyai-dlazy-picture-book","canonicalPath":"/agent/clawhub-dlazyai-dlazy-picture-book","generatedAt":"2026-10-09T23:47:32.879Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T12:34:11.347Z","emptyReason":null},"description":"picture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a self-contained HTML book with image-left / text-right spreads, page turning, and background music. Defaults to 10 pages. Use when the user wants a picture book / storybook / children's book / bedtime story, or says 'make me a picture book about ...'.","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2.6K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s170j1ymymrxasgd00dsk7tckx84cf45:dlazy-picture-book","sourceUrl":"https://clawhub.ai/dlazyai/dlazy-picture-book","homepage":"https://clawhub.ai/dlazyai/skills/dlazy-picture-book","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/dlazyai/dlazy-picture-book","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/dlazyai/skills/dlazy-picture-book","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":68,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"绘本生成 Picture Book technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T12:34:11.347Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T12:34:11.347Z","emptyReason":null},"stars":null,"forks":null,"downloads":2644,"packageName":null,"latestVersion":"1.3.25","tractionLabel":"2.6K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T12:34:11.312Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T12:34:11.347Z","lastCrawledAt":"2026-10-09T12:34:11.312Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T12:34:11.312Z","lastVerifiedAt":null,"highlights":[{"version":"1.3.25","createdAt":"2026-10-08T01:21:36.464Z","changelog":"例行版本更新 2026-10-08","fileCount":6,"zipByteSize":19154},{"version":"1.3.24","createdAt":"2026-10-04T01:20:52.011Z","changelog":"例行版本更新 2026-10-04","fileCount":6,"zipByteSize":19200},{"version":"1.3.23","createdAt":"2026-10-02T05:01:34.008Z","changelog":"例行版本更新 2026-10-02","fileCount":6,"zipByteSize":19066},{"version":"1.3.22","createdAt":"2026-09-30T01:19:40.049Z","changelog":"例行版本更新 2026-09-30","fileCount":6,"zipByteSize":19137},{"version":"1.3.21","createdAt":"2026-09-28T02:17:26.772Z","changelog":"例行版本更新 2026-09-28","fileCount":6,"zipByteSize":19130},{"version":"1.3.20","createdAt":"2026-09-28T01:19:50.908Z","changelog":"例行版本更新 2026-09-28","fileCount":6,"zipByteSize":19151},{"version":"1.3.19","createdAt":"2026-09-24T01:58:05.106Z","changelog":"例行版本更新 2026-09-24","fileCount":6,"zipByteSize":19297},{"version":"1.3.18","createdAt":"2026-09-20T01:24:25.057Z","changelog":"例行版本更新 2026-09-20","fileCount":6,"zipByteSize":19411}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s170j1ymymrxasgd00dsk7tckx84cf45:dlazy-picture-book","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s170j1ymymrxasgd00dsk7tckx84cf45:dlazy-picture-book` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/dlazyai/dlazy-picture-book before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-dlazy-picture-book/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-dlazy-picture-book/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-dlazy-picture-book/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-dlazy-picture-book/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-dlazy-picture-book/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-dlazy-picture-book/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-09T23:47:32.863Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-dlazy-picture-book/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-dlazy-picture-book/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-dlazy-picture-book/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-dlazy-picture-book/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T12:34:11.347Z","emptyReason":null},"readme":"Skill: 绘本生成 Picture Book\n\nOwner: dlazyai\n\nSummary: picture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a self-contained HTML book with image-left / text-right spreads, page turning, and background music. Defaults to 10 pages. Use when the user wants a picture book / storybook / children's book / bedtime story, or says 'make me a picture book about ...'.\n\nTags: latest:1.3.25\n\nVersion history:\n\nv1.3.25 | 2026-10-08T01:21:36.464Z | user\n\n例行版本更新 2026-10-08\n\nv1.3.24 | 2026-10-04T01:20:52.011Z | user\n\n例行版本更新 2026-10-04\n\nv1.3.23 | 2026-10-02T05:01:34.008Z | user\n\n例行版本更新 2026-10-02\n\nv1.3.22 | 2026-09-30T01:19:40.049Z | user\n\n例行版本更新 2026-09-30\n\nv1.3.21 | 2026-09-28T02:17:26.772Z | user\n\n例行版本更新 2026-09-28\n\nv1.3.20 | 2026-09-28T01:19:50.908Z | user\n\n例行版本更新 2026-09-28\n\nv1.3.19 | 2026-09-24T01:58:05.106Z | user\n\n例行版本更新 2026-09-24\n\nv1.3.18 | 2026-09-20T01:24:25.057Z | user\n\n例行版本更新 2026-09-20\n\nv1.3.17 | 2026-09-18T01:45:30.844Z | user\n\n例行版本更新 2026-09-18\n\nv1.3.16 | 2026-09-14T01:19:04.213Z | user\n\n例行版本更新 2026-09-14\n\nv1.3.15 | 2026-09-10T01:16:36.256Z | user\n\n例行版本更新 2026-09-10\n\nv1.3.14 | 2026-09-08T01:19:07.671Z | user\n\n例行版本更新 2026-09-08\n\nv1.3.13 | 2026-09-07T01:24:50.082Z | user\n\n例行版本更新 2026-09-07\n\nv1.3.12 | 2026-09-04T01:23:32.303Z | user\n\n例行版本更新 2026-09-04\n\nv1.3.11 | 2026-09-02T01:17:46.540Z | user\n\n例行版本更新 2026-09-02\n\nv1.3.10 | 2026-08-31T02:57:53.556Z | user\n\n源码仓库迁移至 github.com/dlazy-ai/cli\n\nv1.3.9 | 2026-08-24T09:29:13.626Z | user\n\nRestore Chinese display name\n\nv1.3.8 | 2026-08-17T09:12:17.826Z | user\n\nRestore Chinese display name\n\nv1.3.7 | 2026-08-10T05:53:17.021Z | user\n\nRestore Chinese display name\n\nv1.3.6 | 2026-08-10T04:09:25.514Z | user\n\nRestore Chinese display name\n\nv1.3.5 | 2026-07-21T02:26:49.342Z | auto\n\ndlazy-picture-book v1.3.5\n\n- Updated required dlazy CLI version to @1.2.3 in all install instructions and metadata.\n- Removed the file: skill-card.md.\n- Minor documentation updates in SKILL.md and SKILL-cn.md to reflect CLI version change.\n\nv1.3.4 | 2026-07-17T10:44:03.112Z | auto\n\ndlazy-picture-book 1.3.4\n\n- Updated documentation: SKILL.md and SKILL-cn.md revised and improved.\n- Removed obsolete file: skill-card.md no longer included.\n- No functional or workflow changes; update is documentation-only.\n\nv1.0.2 | 2026-07-17T08:50:49.169Z | auto\n\n- Updated documentation to clarify usage and workflow in SKILL.md and SKILL-cn.md.\n- Removed the file skill-card.md.\n- No changes to core functionality; this is a documentation and cleanup update.\n\nv1.3.3 | 2026-07-09T01:57:20.323Z | user\n\nset Chinese display name for CN search\n\nv1.3.2 | 2026-07-09T01:52:43.985Z | user\n\nset Chinese display name for CN search\n\nv1.3.1 | 2026-07-09T01:36:06.453Z | user\n\nset Chinese display name for CN search\n\nv1.0.0 | 2026-07-07T20:15:18.118Z | auto\n\n- Initial release of dlazy-picture-book skill (version 1.0.1).\n- Provides a complete workflow to create illustrated children's picture books from a theme.\n- Supports paged story writing, style-consistent image generation, matching background music, and HTML assembly.\n- Includes authentication instructions, output structure, and step-by-step usage guide.\n- Default book is 10 pages with customizable art style, protagonist, and reading age.\n\nv1.3.0 | 2026-07-07T19:54:06.395Z | auto\n\ndlazy-picture-book 1.3.0\n\n- Updated documentation in both English (SKILL.md) and Chinese (SKILL-cn.md).\n- No changes to code or workflow; this version focuses on improved guides and instructions.\n\nv1.0.1 | 2026-07-07T18:41:50.170Z | auto\n\ndlazy-picture-book 1.0.1 — picture book creation workflow and usage clarified\n\n- Provides a clear end-to-end workflow: theme confirmation, story writing, illustration generation (with style consistency), background music, and HTML assembly.\n- Defaults added for page count (10), audience age (3–6), art style (warm watercolor), and protagonist consistency.\n- Step-by-step instructions for generating and assembling a portable, offline HTML picture book (with illustrations, text, and background music).\n- Detailed authentication and API key guidance for dLazy CLI usage included.\n- Sample book.json structure and folder output provided for quick reference.\n- Emphasizes workflow order to ensure coordinated story, images, and sound.\n\nArchive index:\n\nArchive v1.3.25: 6 files, 19154 bytes\n\nFiles: assets/template.html (14664b), scripts/build_book.py (2477b), skill-card.md (2019b), SKILL-cn.md (12769b), SKILL.md (13311b), _meta.json (138b)\n\nFile v1.3.25:SKILL.md\n\n---\nname: dlazy-picture-book\nversion: 1.3.5\ndescription: \"picture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a self-contained HTML book with image-left / text-right spreads, page turning, and background music. Defaults to 10 pages. Use when the user wants a picture book / storybook / children's book / bedtime story, or says 'make me a picture book about ...'.\"\nmetadata:\n  {\n    'clawdbot':\n      {\n        'emoji': '📖',\n        'requires': { 'bins': ['npm', 'npx', 'python3', 'curl'] },\n        'install': 'npm install -g @dlazy/cli@1.2.3',\n        'installAlternative': 'npx @dlazy/cli@1.2.3',\n        'homepage': 'https://github.com/dlazy-ai/cli',\n        'source': 'https://github.com/dlazy-ai/cli',\n        'author': 'dlazyai',\n        'license': 'see-repo',\n        'npm': 'https://www.npmjs.com/package/@dlazy/cli',\n        'configLocation': '~/.dlazy/config.json',\n        'apiEndpoints': ['api.dlazy.com', 'files.dlazy.com'],\n      },\n    'openclaw':\n      {\n        'systemPrompt': \"When making a picture book, follow this skill's workflow strictly: first confirm the theme and paged story, then generate illustrations page by page with dlazy gpt-image-2 (the first page establishes the character and art style; later pages pass the first page as a reference image via --images to stay consistent), generate background music with dlazy elevenlabs-music, and finally assemble book.json into index.html with this skill's scripts/build_book.py. Note: Windows PowerShell forbids `&` / `&&` to chain commands — run them one at a time; never batch-generate all images at once.\",\n      },\n  }\n---\n\n# 绘本生成 Picture Book\n\n[English](./SKILL.md) · [中文](./SKILL-cn.md)\n\npicture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a **self-contained HTML book with image-left / text-right spreads, page turning, and background music**. Defaults to 10 pages.\n\n## Trigger Keywords\n\n- picture book / storybook\n- children's book / illustrated story\n- bedtime story / story book\n- 绘本 / 图画书\n- make me a picture book about ...\n\n## Authentication\n\nAll dlazy requests require a dLazy API key. The recommended way to authenticate is:\n\n```bash\ndlazy login\n```\n\nThis runs a device-code flow (also works in remote shells) and **automatically saves your API key** to the local CLI config — no manual copy/paste required.\n\n### Alternative: Set the Key Manually\n\n```bash\ndlazy auth set YOUR_API_KEY\n```\n\nThe CLI saves the key in your user config directory (`~/.dlazy/config.json` on macOS/Linux, `%USERPROFILE%\\.dlazy\\config.json` on Windows), with file permissions restricted to your OS user account. You can also supply the key per-invocation via the `DLAZY_API_KEY` environment variable.\n\n### Getting Your API Key Manually\n\n1. Sign in or create an account at [dlazy.com](https://dlazy.com)\n2. Go to [dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key)\n3. Copy the key shown in the API Key section\n\nEach key is scoped to your dLazy organization and can be **rotated or revoked at any time** from the same dashboard.\n\n## About & Provenance\n\n- **CLI source code**: [github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli)\n- **Maintainer**: dlazyai\n- **npm package**: `@dlazy/cli`\n- **Homepage**: [dlazy.com](https://dlazy.com)\n\nRun on demand without a global install:\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>\n```\n\nReview the GitHub source before installing.\n\n## How It Works\n\nIllustrations are generated by `dlazy gpt-image-2` and background music by `dlazy elevenlabs-music`; both are thin clients over the dLazy hosted API:\n\n- Prompts and parameters are sent to the dLazy API (`api.dlazy.com`) for inference.\n- Local reference images are uploaded to dLazy media storage (`files.dlazy.com`); result URLs are also hosted there.\n\nThe **story text, page composition, and HTML assembly** happen locally — you (the agent) write the story and call this skill's `scripts/build_book.py` to inject the content into `assets/template.html`, producing a self-contained HTML. Standard SaaS pattern; the skill does not access network or filesystem beyond what the dLazy CLI handles.\n\n---\n\n## What the output looks like\n\nA folder you can open directly; `index.html` is the book:\n\n```\n<book-title>/\n├── index.html        ← the finished book (image-left/text-right, page turning, BGM)\n├── book.json         ← content data (title, per-page image+text, music)\n├── images/           ← cover.png, page-01.png … page-10.png\n└── music/            ← bgm.mp3\n```\n\nReading experience: **cover** (large image + title + \"Start reading\") → **spreads** (illustration on the left in 3:4, story text on the right; turn pages with arrow keys / click left-right / bottom dots) → **end page**. A background-music toggle sits top-right. On mobile it becomes image-top / text-bottom.\n\nImages and music are referenced by **relative paths**, so the whole folder is portable and works offline.\n\n---\n\n## Workflow\n\nA picture book is story + image + sound as one whole; quality comes from keeping the three coordinated. Do the steps in order — each sets up the next.\n\n### Step 0: Confirm the brief\n\nBefore starting, align on these (fill sensible defaults for anything unstated and say so — don't interrogate the user):\n\n- **Theme / core**: what's the story, what does it convey (courage, sharing, friendship…)?\n- **Page count**: defaults to **10**; the user may specify otherwise.\n- **Audience age**: defaults to 3–6. Drives text difficulty and sentence length.\n- **Art style**: defaults to warm, healing watercolor children's-book style. Could also be flat illustration, crayon, Pixar-style 3D, etc.\n- **Protagonist**: give it a concrete look (e.g. \"a little fox in a red scarf\") — it must stay consistent on every page.\n\n### Step 1: Write the paged story into book.json\n\nWrite the **whole book's text first**, then generate images, so the visuals follow one narrative thread.\n\n- A full arc: **opening (introduce hero + world) → setting out / a wish → a problem → a turn → a warm ending.** Spread this across the 10 pages.\n- **1–3 sentences per page**, spoken and vivid, good to read aloud. Shorter for younger readers.\n- Also note a **visual description** for each page (what to draw) — you'll need it next.\n\nWrite `book.json` first (image/music paths as placeholders that will already be correct once generated):\n\n```json\n{\n  \"title\": \"The Little Fox's Star Lantern\",\n  \"subtitle\": \"A warm story about sharing\",\n  \"cover_image\": \"images/cover.png\",\n  \"music\": \"music/bgm.mp3\",\n  \"pages\": [\n    { \"image\": \"images/page-01.png\", \"text\": \"Deep in the forest lived a little fox in a red scarf…\" },\n    { \"image\": \"images/page-02.png\", \"text\": \"…\" }\n  ]\n}\n```\n\n### Step 2: Generate illustrations page by page (keep character + style consistent)\n\nConsistency is where picture books fail — the same fox can't look different on every page. Use the **first page as a style anchor**:\n\n1. **Generate page 1 first**, writing the character look, art style, palette, and composition in full detail. This sets the visual baseline for the whole book.\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --prompt \"Children's book illustration, warm watercolor style, 3:4 portrait. An orange little fox in a red scarf lies on a windowsill gazing at the round moon outside, nighttime, soft warm lamplight, healing childlike mood, clean negative space.\"\n   ```\n\n2. **Pass page 1 as the reference image** via `--images` on every later page so the hero and style carry over; only the scene changes:\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --images images/page-01.png \\\n     --prompt \"Same orange fox in a red scarf, same watercolor style and palette. This page: the fox shoulders a small backpack and walks into the forest under the moonlight. 3:4 portrait.\"\n   ```\n\n3. The result URL is at `result.outputs[0].url`. **Download it into `images/` with curl:**\n\n   ```bash\n   curl -L -o images/page-01.png \"<returned url>\"\n   ```\n\nOn parameters: `--quality low` is low quality (fast, cheap, plenty for small book art); `--size 1024x1536` is the closest small portrait to 3:4 (gpt-image-2 has no exact 3:4 tier; the template crops to 3:4 so it looks right).\n\n**Cover**: same idea — use page 1 as reference to generate a more atmospheric hero image into `images/cover.png`.\n\n> **Execution discipline (important)**: run one generation command at a time — wait for it to return and download before the next — don't fire all 10 image commands at once or chain them with `&`/`&&`. This is both because later pages need the previous image as a reference and because `&`/`&&` error out under Windows PowerShell.\n\n### Step 3: Generate background music\n\nWrite one music prompt from the story's mood; give it enough length to cover a read-through (60–90s for a bedtime story is fine, it loops):\n\n```bash\ndlazy elevenlabs-music --duration 75 \\\n  --prompt \"Gentle, soothing children's bedtime music, soft piano and music box, dreamy and warm, a background for reading a picture book aloud, no vocals.\"\n```\n\nDownload the result into `music/bgm.mp3` with `curl` the same way.\n\n### Step 4: Assemble the HTML\n\nMake sure the paths in `book.json` match the files you actually downloaded, then run this skill's build script:\n\n```bash\npython3 <this-skill-dir>/scripts/build_book.py book.json -o index.html\n```\n\nIt injects `book.json` into `assets/template.html` to produce a self-contained `index.html`. Keep `index.html` next to `images/` and `music/`.\n\n### Step 5: Deliver\n\nTell the user the output folder path, that double-clicking `index.html` opens the book, and that the top-right button toggles the music. Share the cover image URL for a quick preview.\n\n---\n\n## Command cheatsheet\n\n**Illustration · gpt-image-2** (full help: `dlazy gpt-image-2 -h`)\n\n| Flag | Picture-book usage |\n| --- | --- |\n| `--prompt` | Scene description (character + scene + style + \"3:4 portrait\") |\n| `--images` | Reference image (page-1 path) to keep character/style consistent, up to 5 |\n| `--quality` | `low` (small book art, fast and cheap) |\n| `--size` | `1024x1536` (closest small portrait to 3:4) |\n\n**Background music · elevenlabs-music** (full help: `dlazy elevenlabs-music -h`)\n\n| Flag | Picture-book usage |\n| --- | --- |\n| `--prompt` | Mood description (instruments, emotion, \"no vocals\", good for reading aloud) |\n| `--duration` | Seconds; 60–90 is fine for a bedtime story, it loops |\n\nResults are always at `result.outputs[0].url`; download with `curl -L -o <local path> \"<url>\"`.\n\n## Error Handling\n\n| Code | Error Type                         | Example Message                                                                                                          |\n| ---- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |\n| 401  | Unauthorized (No API Key)          | `ok: false, code: \"unauthorized\", message: \"API key is missing or invalid\"`                                              |\n| 501  | Missing required parameter         | `error: required option '--prompt <prompt>' not specified`                                                               |\n| 502  | Local file read error              | `Error: Image file not found: C:\\path\\to\\your\\file`                                                                      |\n| 503  | API request failed (no balance)    | `ok: false, code: \"insufficient_balance\"`                                                                                |\n| 503  | API request failed (server error)  | `HTTP status code error (500 server crash)`                                                                              |\n| 504  | Asynchronous task execution failed | `=== Generation Failed ===` / `{Specific error reason returned by backend, e.g. \"Prompt violates safety policy\"}`        |\n\n> **AGENT CRITICAL INSTRUCTION**:\n>\n> 1. If the result returns `code: \"insufficient_balance\"`, you MUST explicitly tell the user their credits are insufficient and guide them to recharge: [https://dlazy.com/dashboard/organization/settings?tab=credits](https://dlazy.com/dashboard/organization/settings?tab=credits)\n> 2. If the result returns `code: \"unauthorized\"` or indicates a missing API key, you MUST tell the user to get their API key from [https://dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key) and save it with `dlazy auth set <key>`, then resume.\n> 3. If one image is rejected for violating the safety policy, rewrite that page's prompt (drop sensitive/violent/photoreal-person content) and retry — don't abandon the whole book.\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.3.25:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"dlazy-picture-book\",\n  \"version\": \"1.3.25\",\n  \"publishedAt\": 1791422496464\n}\n\nFile v1.3.25:skill-card.md\n\n## Description:\n\nCreates a paged children's picture book from a theme, with consistent illustrations, background music, and a portable HTML reading experience.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dlazyai](https://clawhub.ai/user/dlazyai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nCreators, educators, and families use this skill to turn a theme into an illustrated, read-aloud children's story with optional background music.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Prompts and reference images are sent to dLazy's hosted service.\n\nMitigation: Use the service only for material you are comfortable sharing with dLazy.\n\nRisk: Authentication may store an API key locally on shared machines.\n\nMitigation: Prefer per-invocation environment credentials or npx on shared machines, and protect the key.\n\nRisk: Illustration, music, and book files are downloaded and written locally.\n\nMitigation: Keep generated files in a dedicated output folder.\n\n## Reference(s):\n\n- [ClawHub picture-book skill](https://clawhub.ai/dlazyai/skills/dlazy-picture-book)\n- [dLazy CLI source (linked in skill metadata; not verified release provenance)](https://github.com/dlazy-ai/cli)\n- [dLazy CLI npm package](https://www.npmjs.com/package/@dlazy/cli)\n\n## Skill Output:\n\n**Output Type(s):** [Text, JSON, HTML, Images, Audio, Shell commands]\n\n**Output Format:** [Paged story and book.json, with an HTML book referencing PNG illustrations and MP3 music]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Defaults to 10 pages; generated files are kept together in a portable folder.]\n\n## Skill Version(s):\n\n1.3.25 (source: ClawHub release; artifact frontmatter lists 1.3.5)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.3.25:SKILL-cn.md\n\n---\nname: dlazy-picture-book\nversion: 1.3.5\ndescription: \"绘本生成、儿童绘本、图画书、睡前故事书、picture book、storybook——根据一个主题创作完整绘本：编写分页故事、用 dlazy gpt-image-2 逐页生成风格统一的插图、用 dlazy elevenlabs-music 生成匹配基调的背景音乐，最后组装成一个左图右文、可翻页、带背景音乐的独立 HTML 绘本。默认 10 页。当用户想做绘本 / 图画书 / 儿童故事书 / 睡前故事，或说“帮我做一本关于……的绘本”时使用。\"\nmetadata:\n  {\n    'clawdbot':\n      {\n        'emoji': '📖',\n        'requires': { 'bins': ['npm', 'npx', 'python3', 'curl'] },\n        'install': 'npm install -g @dlazy/cli@1.2.3',\n        'installAlternative': 'npx @dlazy/cli@1.2.3',\n        'homepage': 'https://github.com/dlazy-ai/cli',\n        'source': 'https://github.com/dlazy-ai/cli',\n        'author': 'dlazyai',\n        'license': 'see-repo',\n        'npm': 'https://www.npmjs.com/package/@dlazy/cli',\n        'configLocation': '~/.dlazy/config.json',\n        'apiEndpoints': ['api.dlazy.com', 'files.dlazy.com'],\n      },\n    'openclaw':\n      {\n        'systemPrompt': '当你需要制作绘本时，请严格遵循此技能的工作流：先确认主题与分页故事，再用 dlazy gpt-image-2 逐页生成插图（首页确立角色与画风，后续页用首页作参考图保持一致），用 dlazy elevenlabs-music 生成背景音乐，最后用本技能自带的 scripts/build_book.py 把 book.json 组装成 index.html。注意：Windows PowerShell 中不允许用 `&` 或 `&&` 串联命令，请逐条同步执行；不要一次性批量生成所有图片。',\n      },\n  }\n---\n\n# 绘本生成 Picture Book\n\n[English](./SKILL.md) · [中文](./SKILL-cn.md)\n\n绘本生成、儿童绘本、图画书、睡前故事书、picture book、storybook——根据一个主题创作完整绘本：编写分页故事、用 dlazy gpt-image-2 逐页生成风格统一的插图、用 dlazy elevenlabs-music 生成匹配的背景音乐，最后组装成一个**左图右文、可翻页、带背景音乐的独立 HTML 绘本**。默认 10 页。\n\n## 触发关键词\n\n- 绘本 / 绘本生成\n- 儿童绘本 / 图画书\n- 睡前故事 / 故事书\n- picture book / storybook\n- 帮我做一本关于……的绘本\n\n## 身份验证 (Authentication)\n\n所有 dlazy 请求都需要 dLazy API key。**推荐使用** `dlazy login` 完成登录：\n\n```bash\ndlazy login\n```\n\n该命令使用设备码流程（远程终端也可用），登录成功后 **自动把 API key 写入本地 CLI 配置**，无需手动复制粘贴。\n\n### 备选：手动设置 API Key\n\n如果你已有 API key，也可以直接保存：\n\n```bash\ndlazy auth set YOUR_API_KEY\n```\n\nCLI 会把 key 保存在你的用户配置目录（macOS/Linux 上为 `~/.dlazy/config.json`，Windows 上为 `%USERPROFILE%\\.dlazy\\config.json`），文件权限仅限当前操作系统用户访问。你也可以用 `DLAZY_API_KEY` 环境变量按次传入。\n\n### 手动获取 API Key\n\n1. 登录或在 [dlazy.com](https://dlazy.com) 创建账号\n2. 访问 [dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key)\n3. 复制 API Key 区域显示的密钥\n\n每个 key 都属于你自己的 dLazy 组织，可在同一控制面板**随时轮换或吊销**。\n\n## 关于与来源 (Provenance)\n\n- **CLI 源代码**: [github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli)\n- **维护者**: dlazyai\n- **npm 包名**: `@dlazy/cli`\n- **官网**: [dlazy.com](https://dlazy.com)\n\n如果你不希望在系统上长期保留一个全局 CLI，可以按需运行：\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>\n```\n\n安装前建议先到 GitHub 仓库审阅源码。\n\n## 工作原理 (How It Works)\n\n绘本的**插图**由 `dlazy gpt-image-2` 生成、**背景音乐**由 `dlazy elevenlabs-music` 生成，二者都是 dLazy 托管 API 的轻量封装：\n\n- 你提供的提示词与参数会发送到 dLazy API（`api.dlazy.com`）进行推理。\n- 传入的本地参考图会先上传到 dLazy 媒体存储（`files.dlazy.com`），生成结果 URL 也由 `files.dlazy.com` 托管。\n\n**故事文本、分页编排、HTML 组装**都在本地完成——由你（Agent）编写故事、调用本技能自带的 `scripts/build_book.py` 把内容注入 `assets/template.html` 模版，产出一个自包含的 HTML。这是标准的 SaaS 调用模式，技能本身不越权访问网络或文件系统。\n\n---\n\n## 成品长什么样\n\n一个可以直接双击打开的文件夹，`index.html` 就是绘本：\n\n```\n<绘本标题>/\n├── index.html        ← 最终绘本（左图右文、翻页、背景音乐）\n├── book.json         ← 内容数据（标题、每页图文、音乐）\n├── images/           ← cover.png, page-01.png … page-10.png\n└── music/            ← bgm.mp3\n```\n\n阅读体验：**封面**（大图 + 标题 + “开始阅读”）→ **内页**（左边 3:4 插图，右边故事文字，可用方向键 / 点击左右 / 底部圆点翻页）→ **尾页**。右上角有背景音乐开关。手机上自动变为上图下文。\n\n图片与音乐都用**相对路径**引用，所以整个文件夹拷走即可分享，无需联网。\n\n---\n\n## 工作流\n\n绘本是「故事 + 画面 + 声音」的整体，质量取决于三者是否协调。按下面的顺序做，每一步都为下一步打好基础。\n\n### 第 0 步：确认创作简报\n\n动手前先和用户对齐这几件事（用户没说的，用合理默认值并说明，不要追问到底）：\n\n- **主题 / 故事内核**：讲什么？想传递什么（勇气、分享、友谊…）？\n- **页数**：默认 **10 页**，用户可指定。\n- **受众年龄**：默认 3–6 岁。决定文字难度与句子长度。\n- **画风**：默认温暖治愈的水彩儿童绘本风。也可以是扁平插画、蜡笔、3D 皮克斯风等。\n- **主角**：外形要具体（如“一只戴红围巾的小狐狸”），因为它要在每一页保持一致。\n\n### 第 1 步：编写分页故事，落到 book.json\n\n先把**整本书的文字**写完，再去生成图。这样画面才有统一的叙事线索。\n\n- 一个完整的故事弧：**开场（介绍主角与世界）→ 出发 / 愿望 → 遇到困难 → 转折 → 温暖的结局**。10 页就按这个节奏铺开。\n- 每页 **1–3 句**，口语化、有画面感，适合朗读。低龄段句子更短。\n- 同时为每页想好**画面描述**（这一页画什么），下一步生成插图要用。\n\n把结果先写成 `book.json`（图片 / 音乐路径先占位，生成后已经是对的路径）：\n\n```json\n{\n  \"title\": \"小狐狸的星星灯\",\n  \"subtitle\": \"一个关于分享的温暖故事\",\n  \"cover_image\": \"images/cover.png\",\n  \"music\": \"music/bgm.mp3\",\n  \"pages\": [\n    { \"image\": \"images/page-01.png\", \"text\": \"森林深处住着一只戴红围巾的小狐狸……\" },\n    { \"image\": \"images/page-02.png\", \"text\": \"……\" }\n  ]\n}\n```\n\n### 第 2 步：逐页生成插图（保持角色与画风一致）\n\n一致性是绘本最容易翻车的地方——同一只小狐狸不能每页长得都不一样。做法是**用首页当“风格锚点”**：\n\n1. **先生成第 1 页**，提示词里把角色外形、画风、色调、构图都写足、写细。这张确立整本书的视觉基调。\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --prompt \"儿童绘本插画，温暖水彩风格，3:4 竖构图。一只戴红色围巾的橙色小狐狸趴在窗台上望着窗外圆圆的月亮，夜晚，柔和的暖色灯光，治愈童真的氛围，画面留白干净。\"\n   ```\n\n2. **后续每一页都把第 1 页作为参考图**传给 `--images`，让主角和画风延续，只改场景：\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --images images/page-01.png \\\n     --prompt \"同一只戴红围巾的橙色小狐狸，同样的水彩绘本画风与色调。这一页：小狐狸背起小背包，踏着月光走进森林。3:4 竖构图。\"\n   ```\n\n3. 命令返回后，结果 URL 在 `result.outputs[0].url`。**用 curl 下载到 `images/`**：\n\n   ```bash\n   curl -L -o images/page-01.png \"<返回的 url>\"\n   ```\n\n关于参数：`--quality low` 是低质量（快、省积分，绘本小图足够）；`--size 1024x1536` 是最接近 3:4 的小竖图（gpt-image-2 没有精确的 3:4 档，模版会按 3:4 裁切，视觉上正好）。\n\n**封面**同理：用第 1 页作参考图，生成一张更有氛围感的主视觉存到 `images/cover.png`。\n\n> **执行纪律（重要）**：一次只跑一个生成命令，等它返回、下载好，再跑下一个——不要一次性把 10 张图的命令一股脑并发或用 `&`/`&&` 串起来。这既是因为要拿上一张的结果当参考图，也因为在 Windows PowerShell 下 `&`/`&&` 会报错。\n\n### 第 3 步：生成背景音乐\n\n根据故事基调写一句音乐提示词，时长给足以覆盖阅读（睡前故事 60–90 秒即可，循环播放）：\n\n```bash\ndlazy elevenlabs-music --duration 75 \\\n  --prompt \"温柔舒缓的儿童睡前音乐，轻柔的钢琴与八音盒，梦幻温暖，适合绘本朗读的背景，无人声。\"\n```\n\n返回后同样 `curl` 下载到 `music/bgm.mp3`。\n\n### 第 4 步：组装成 HTML\n\n确认 `book.json` 里的路径和实际下载的文件对得上，然后运行本技能自带的构建脚本：\n\n```bash\npython3 <本技能目录>/scripts/build_book.py book.json -o index.html\n```\n\n脚本会把 `book.json` 注入 `assets/template.html`，生成自包含的 `index.html`。把 `index.html` 和 `images/`、`music/` 放在同一文件夹即可。\n\n### 第 5 步：交付\n\n告诉用户成品文件夹路径，说明双击 `index.html` 就能翻阅、右上角可开关背景音乐。附上封面图 URL 让用户先睹为快。\n\n---\n\n## 命令速查\n\n**插图 · gpt-image-2**（完整帮助：`dlazy gpt-image-2 -h`）\n\n| 参数 | 绘本用法 |\n| --- | --- |\n| `--prompt` | 画面描述（角色 + 场景 + 画风 + “3:4 竖构图”） |\n| `--images` | 参考图（首页图路径），用于保持角色/画风一致，最多 5 张 |\n| `--quality` | `low`（绘本小图够用，快且省积分） |\n| `--size` | `1024x1536`（最接近 3:4 的小竖图） |\n\n**背景音乐 · elevenlabs-music**（完整帮助：`dlazy elevenlabs-music -h`）\n\n| 参数 | 绘本用法 |\n| --- | --- |\n| `--prompt` | 音乐氛围描述（乐器、情绪、“无人声”、适合朗读） |\n| `--duration` | 时长（秒），睡前故事 60–90 即可，循环播放 |\n\n生成结果统一在 `result.outputs[0].url`，用 `curl -L -o <本地路径> \"<url>\"` 下载。\n\n## 错误处理\n\n| Code | 错误类型                         | 示例信息                                                                                             |\n| ---- | -------------------------------- | ---------------------------------------------------------------------------------------------------- |\n| 401  | 未授权 (API Key缺失或无效)       | `ok: false, code: \"unauthorized\", message: \"API key is missing or invalid\"`                          |\n| 501  | 缺少必填参数                     | `error: required option '--prompt <prompt>' not specified`                                            |\n| 502  | 本地文件读取失败                 | `Error: Image file not found: C:\\path\\to\\your\\file`                                                  |\n| 503  | API 请求失败（余额不足）         | `ok: false, code: \"insufficient_balance\"`                                                            |\n| 503  | API 请求失败（服务端错误）       | `HTTP status code error (500 server crash)`                                                          |\n| 504  | 异步任务执行失败                 | `=== Generation Failed ===` / `{后端返回的具体失败原因，如提示词违反安全策略}`                        |\n\n> **智能体关键指令**:\n> 1. 如果返回 `code: \"insufficient_balance\"`（余额不足），必须明确告知用户积分不足，并引导前往充值：[https://dlazy.com/dashboard/organization/settings?tab=credits](https://dlazy.com/dashboard/organization/settings?tab=credits)\n> 2. 如果返回 `code: \"unauthorized\"` 或提示缺少 API Key，必须告知用户前往 [https://dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key) 获取 API Key 并用 `dlazy auth set <key>` 保存，然后继续任务。\n> 3. 若某张图违反安全策略被拒，改写该页提示词（去掉敏感/暴力/写实人物等描述）后重试，不要中断整本书。\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nArchive v1.3.24: 6 files, 19200 bytes\n\nFiles: assets/template.html (14664b), scripts/build_book.py (2477b), skill-card.md (2176b), SKILL-cn.md (12769b), SKILL.md (13311b), _meta.json (138b)\n\nFile v1.3.24:SKILL.md\n\n---\nname: dlazy-picture-book\nversion: 1.3.5\ndescription: \"picture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a self-contained HTML book with image-left / text-right spreads, page turning, and background music. Defaults to 10 pages. Use when the user wants a picture book / storybook / children's book / bedtime story, or says 'make me a picture book about ...'.\"\nmetadata:\n  {\n    'clawdbot':\n      {\n        'emoji': '📖',\n        'requires': { 'bins': ['npm', 'npx', 'python3', 'curl'] },\n        'install': 'npm install -g @dlazy/cli@1.2.3',\n        'installAlternative': 'npx @dlazy/cli@1.2.3',\n        'homepage': 'https://github.com/dlazy-ai/cli',\n        'source': 'https://github.com/dlazy-ai/cli',\n        'author': 'dlazyai',\n        'license': 'see-repo',\n        'npm': 'https://www.npmjs.com/package/@dlazy/cli',\n        'configLocation': '~/.dlazy/config.json',\n        'apiEndpoints': ['api.dlazy.com', 'files.dlazy.com'],\n      },\n    'openclaw':\n      {\n        'systemPrompt': \"When making a picture book, follow this skill's workflow strictly: first confirm the theme and paged story, then generate illustrations page by page with dlazy gpt-image-2 (the first page establishes the character and art style; later pages pass the first page as a reference image via --images to stay consistent), generate background music with dlazy elevenlabs-music, and finally assemble book.json into index.html with this skill's scripts/build_book.py. Note: Windows PowerShell forbids `&` / `&&` to chain commands — run them one at a time; never batch-generate all images at once.\",\n      },\n  }\n---\n\n# 绘本生成 Picture Book\n\n[English](./SKILL.md) · [中文](./SKILL-cn.md)\n\npicture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a **self-contained HTML book with image-left / text-right spreads, page turning, and background music**. Defaults to 10 pages.\n\n## Trigger Keywords\n\n- picture book / storybook\n- children's book / illustrated story\n- bedtime story / story book\n- 绘本 / 图画书\n- make me a picture book about ...\n\n## Authentication\n\nAll dlazy requests require a dLazy API key. The recommended way to authenticate is:\n\n```bash\ndlazy login\n```\n\nThis runs a device-code flow (also works in remote shells) and **automatically saves your API key** to the local CLI config — no manual copy/paste required.\n\n### Alternative: Set the Key Manually\n\n```bash\ndlazy auth set YOUR_API_KEY\n```\n\nThe CLI saves the key in your user config directory (`~/.dlazy/config.json` on macOS/Linux, `%USERPROFILE%\\.dlazy\\config.json` on Windows), with file permissions restricted to your OS user account. You can also supply the key per-invocation via the `DLAZY_API_KEY` environment variable.\n\n### Getting Your API Key Manually\n\n1. Sign in or create an account at [dlazy.com](https://dlazy.com)\n2. Go to [dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key)\n3. Copy the key shown in the API Key section\n\nEach key is scoped to your dLazy organization and can be **rotated or revoked at any time** from the same dashboard.\n\n## About & Provenance\n\n- **CLI source code**: [github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli)\n- **Maintainer**: dlazyai\n- **npm package**: `@dlazy/cli`\n- **Homepage**: [dlazy.com](https://dlazy.com)\n\nRun on demand without a global install:\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>\n```\n\nReview the GitHub source before installing.\n\n## How It Works\n\nIllustrations are generated by `dlazy gpt-image-2` and background music by `dlazy elevenlabs-music`; both are thin clients over the dLazy hosted API:\n\n- Prompts and parameters are sent to the dLazy API (`api.dlazy.com`) for inference.\n- Local reference images are uploaded to dLazy media storage (`files.dlazy.com`); result URLs are also hosted there.\n\nThe **story text, page composition, and HTML assembly** happen locally — you (the agent) write the story and call this skill's `scripts/build_book.py` to inject the content into `assets/template.html`, producing a self-contained HTML. Standard SaaS pattern; the skill does not access network or filesystem beyond what the dLazy CLI handles.\n\n---\n\n## What the output looks like\n\nA folder you can open directly; `index.html` is the book:\n\n```\n<book-title>/\n├── index.html        ← the finished book (image-left/text-right, page turning, BGM)\n├── book.json         ← content data (title, per-page image+text, music)\n├── images/           ← cover.png, page-01.png … page-10.png\n└── music/            ← bgm.mp3\n```\n\nReading experience: **cover** (large image + title + \"Start reading\") → **spreads** (illustration on the left in 3:4, story text on the right; turn pages with arrow keys / click left-right / bottom dots) → **end page**. A background-music toggle sits top-right. On mobile it becomes image-top / text-bottom.\n\nImages and music are referenced by **relative paths**, so the whole folder is portable and works offline.\n\n---\n\n## Workflow\n\nA picture book is story + image + sound as one whole; quality comes from keeping the three coordinated. Do the steps in order — each sets up the next.\n\n### Step 0: Confirm the brief\n\nBefore starting, align on these (fill sensible defaults for anything unstated and say so — don't interrogate the user):\n\n- **Theme / core**: what's the story, what does it convey (courage, sharing, friendship…)?\n- **Page count**: defaults to **10**; the user may specify otherwise.\n- **Audience age**: defaults to 3–6. Drives text difficulty and sentence length.\n- **Art style**: defaults to warm, healing watercolor children's-book style. Could also be flat illustration, crayon, Pixar-style 3D, etc.\n- **Protagonist**: give it a concrete look (e.g. \"a little fox in a red scarf\") — it must stay consistent on every page.\n\n### Step 1: Write the paged story into book.json\n\nWrite the **whole book's text first**, then generate images, so the visuals follow one narrative thread.\n\n- A full arc: **opening (introduce hero + world) → setting out / a wish → a problem → a turn → a warm ending.** Spread this across the 10 pages.\n- **1–3 sentences per page**, spoken and vivid, good to read aloud. Shorter for younger readers.\n- Also note a **visual description** for each page (what to draw) — you'll need it next.\n\nWrite `book.json` first (image/music paths as placeholders that will already be correct once generated):\n\n```json\n{\n  \"title\": \"The Little Fox's Star Lantern\",\n  \"subtitle\": \"A warm story about sharing\",\n  \"cover_image\": \"images/cover.png\",\n  \"music\": \"music/bgm.mp3\",\n  \"pages\": [\n    { \"image\": \"images/page-01.png\", \"text\": \"Deep in the forest lived a little fox in a red scarf…\" },\n    { \"image\": \"images/page-02.png\", \"text\": \"…\" }\n  ]\n}\n```\n\n### Step 2: Generate illustrations page by page (keep character + style consistent)\n\nConsistency is where picture books fail — the same fox can't look different on every page. Use the **first page as a style anchor**:\n\n1. **Generate page 1 first**, writing the character look, art style, palette, and composition in full detail. This sets the visual baseline for the whole book.\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --prompt \"Children's book illustration, warm watercolor style, 3:4 portrait. An orange little fox in a red scarf lies on a windowsill gazing at the round moon outside, nighttime, soft warm lamplight, healing childlike mood, clean negative space.\"\n   ```\n\n2. **Pass page 1 as the reference image** via `--images` on every later page so the hero and style carry over; only the scene changes:\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --images images/page-01.png \\\n     --prompt \"Same orange fox in a red scarf, same watercolor style and palette. This page: the fox shoulders a small backpack and walks into the forest under the moonlight. 3:4 portrait.\"\n   ```\n\n3. The result URL is at `result.outputs[0].url`. **Download it into `images/` with curl:**\n\n   ```bash\n   curl -L -o images/page-01.png \"<returned url>\"\n   ```\n\nOn parameters: `--quality low` is low quality (fast, cheap, plenty for small book art); `--size 1024x1536` is the closest small portrait to 3:4 (gpt-image-2 has no exact 3:4 tier; the template crops to 3:4 so it looks right).\n\n**Cover**: same idea — use page 1 as reference to generate a more atmospheric hero image into `images/cover.png`.\n\n> **Execution discipline (important)**: run one generation command at a time — wait for it to return and download before the next — don't fire all 10 image commands at once or chain them with `&`/`&&`. This is both because later pages need the previous image as a reference and because `&`/`&&` error out under Windows PowerShell.\n\n### Step 3: Generate background music\n\nWrite one music prompt from the story's mood; give it enough length to cover a read-through (60–90s for a bedtime story is fine, it loops):\n\n```bash\ndlazy elevenlabs-music --duration 75 \\\n  --prompt \"Gentle, soothing children's bedtime music, soft piano and music box, dreamy and warm, a background for reading a picture book aloud, no vocals.\"\n```\n\nDownload the result into `music/bgm.mp3` with `curl` the same way.\n\n### Step 4: Assemble the HTML\n\nMake sure the paths in `book.json` match the files you actually downloaded, then run this skill's build script:\n\n```bash\npython3 <this-skill-dir>/scripts/build_book.py book.json -o index.html\n```\n\nIt injects `book.json` into `assets/template.html` to produce a self-contained `index.html`. Keep `index.html` next to `images/` and `music/`.\n\n### Step 5: Deliver\n\nTell the user the output folder path, that double-clicking `index.html` opens the book, and that the top-right button toggles the music. Share the cover image URL for a quick preview.\n\n---\n\n## Command cheatsheet\n\n**Illustration · gpt-image-2** (full help: `dlazy gpt-image-2 -h`)\n\n| Flag | Picture-book usage |\n| --- | --- |\n| `--prompt` | Scene description (character + scene + style + \"3:4 portrait\") |\n| `--images` | Reference image (page-1 path) to keep character/style consistent, up to 5 |\n| `--quality` | `low` (small book art, fast and cheap) |\n| `--size` | `1024x1536` (closest small portrait to 3:4) |\n\n**Background music · elevenlabs-music** (full help: `dlazy elevenlabs-music -h`)\n\n| Flag | Picture-book usage |\n| --- | --- |\n| `--prompt` | Mood description (instruments, emotion, \"no vocals\", good for reading aloud) |\n| `--duration` | Seconds; 60–90 is fine for a bedtime story, it loops |\n\nResults are always at `result.outputs[0].url`; download with `curl -L -o <local path> \"<url>\"`.\n\n## Error Handling\n\n| Code | Error Type                         | Example Message                                                                                                          |\n| ---- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |\n| 401  | Unauthorized (No API Key)          | `ok: false, code: \"unauthorized\", message: \"API key is missing or invalid\"`                                              |\n| 501  | Missing required parameter         | `error: required option '--prompt <prompt>' not specified`                                                               |\n| 502  | Local file read error              | `Error: Image file not found: C:\\path\\to\\your\\file`                                                                      |\n| 503  | API request failed (no balance)    | `ok: false, code: \"insufficient_balance\"`                                                                                |\n| 503  | API request failed (server error)  | `HTTP status code error (500 server crash)`                                                                              |\n| 504  | Asynchronous task execution failed | `=== Generation Failed ===` / `{Specific error reason returned by backend, e.g. \"Prompt violates safety policy\"}`        |\n\n> **AGENT CRITICAL INSTRUCTION**:\n>\n> 1. If the result returns `code: \"insufficient_balance\"`, you MUST explicitly tell the user their credits are insufficient and guide them to recharge: [https://dlazy.com/dashboard/organization/settings?tab=credits](https://dlazy.com/dashboard/organization/settings?tab=credits)\n> 2. If the result returns `code: \"unauthorized\"` or indicates a missing API key, you MUST tell the user to get their API key from [https://dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key) and save it with `dlazy auth set <key>`, then resume.\n> 3. If one image is rejected for violating the safety policy, rewrite that page's prompt (drop sensitive/violent/photoreal-person content) and retry — don't abandon the whole book.\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.3.24:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"dlazy-picture-book\",\n  \"version\": \"1.3.24\",\n  \"publishedAt\": 1791076852011\n}\n\nFile v1.3.24:skill-card.md\n\n## Description:\n\nCreates illustrated picture books from a theme, pairing a paged story with consistent images and background music in a locally viewable HTML book.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dlazyai](https://clawhub.ai/user/dlazyai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nReaders, parents, educators, and creators use this skill to turn a story theme into a children's picture book with page-by-page illustrations and background music.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Installing a third-party CLI and supplying a dLazy API key exposes credentials to that service.\n\nMitigation: Review the CLI before installation and confirm the user is comfortable saving or supplying a dLazy API key.\n\nRisk: Image and music generation sends prompts and any reference images to hosted dLazy services and consumes credits.\n\nMitigation: Get explicit confirmation before generating, and avoid sending reference images the user does not want uploaded.\n\nRisk: The workflow creates a local folder containing story JSON, HTML, illustrations, and music.\n\nMitigation: Confirm the intended output location before creating files.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/dlazyai/skills/dlazy-picture-book)\n- [dLazy CLI source (linked in skill metadata)](https://github.com/dlazy-ai/cli)\n- [dLazy CLI npm package](https://www.npmjs.com/package/@dlazy/cli)\n\n## Skill Output:\n\n**Output Type(s):** [Text, HTML, JSON, Images, Audio]\n\n**Output Format:** [Local picture-book folder with index.html, book.json, illustrations, and background music]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [HTML references images and music by relative paths; the complete folder can be opened locally.]\n\n## Skill Version(s):\n\n1.3.24 (source: ClawHub release evidence; bundled skill frontmatter says 1.3.5)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.3.24:SKILL-cn.md\n\n---\nname: dlazy-picture-book\nversion: 1.3.5\ndescription: \"绘本生成、儿童绘本、图画书、睡前故事书、picture book、storybook——根据一个主题创作完整绘本：编写分页故事、用 dlazy gpt-image-2 逐页生成风格统一的插图、用 dlazy elevenlabs-music 生成匹配基调的背景音乐，最后组装成一个左图右文、可翻页、带背景音乐的独立 HTML 绘本。默认 10 页。当用户想做绘本 / 图画书 / 儿童故事书 / 睡前故事，或说“帮我做一本关于……的绘本”时使用。\"\nmetadata:\n  {\n    'clawdbot':\n      {\n        'emoji': '📖',\n        'requires': { 'bins': ['npm', 'npx', 'python3', 'curl'] },\n        'install': 'npm install -g @dlazy/cli@1.2.3',\n        'installAlternative': 'npx @dlazy/cli@1.2.3',\n        'homepage': 'https://github.com/dlazy-ai/cli',\n        'source': 'https://github.com/dlazy-ai/cli',\n        'author': 'dlazyai',\n        'license': 'see-repo',\n        'npm': 'https://www.npmjs.com/package/@dlazy/cli',\n        'configLocation': '~/.dlazy/config.json',\n        'apiEndpoints': ['api.dlazy.com', 'files.dlazy.com'],\n      },\n    'openclaw':\n      {\n        'systemPrompt': '当你需要制作绘本时，请严格遵循此技能的工作流：先确认主题与分页故事，再用 dlazy gpt-image-2 逐页生成插图（首页确立角色与画风，后续页用首页作参考图保持一致），用 dlazy elevenlabs-music 生成背景音乐，最后用本技能自带的 scripts/build_book.py 把 book.json 组装成 index.html。注意：Windows PowerShell 中不允许用 `&` 或 `&&` 串联命令，请逐条同步执行；不要一次性批量生成所有图片。',\n      },\n  }\n---\n\n# 绘本生成 Picture Book\n\n[English](./SKILL.md) · [中文](./SKILL-cn.md)\n\n绘本生成、儿童绘本、图画书、睡前故事书、picture book、storybook——根据一个主题创作完整绘本：编写分页故事、用 dlazy gpt-image-2 逐页生成风格统一的插图、用 dlazy elevenlabs-music 生成匹配的背景音乐，最后组装成一个**左图右文、可翻页、带背景音乐的独立 HTML 绘本**。默认 10 页。\n\n## 触发关键词\n\n- 绘本 / 绘本生成\n- 儿童绘本 / 图画书\n- 睡前故事 / 故事书\n- picture book / storybook\n- 帮我做一本关于……的绘本\n\n## 身份验证 (Authentication)\n\n所有 dlazy 请求都需要 dLazy API key。**推荐使用** `dlazy login` 完成登录：\n\n```bash\ndlazy login\n```\n\n该命令使用设备码流程（远程终端也可用），登录成功后 **自动把 API key 写入本地 CLI 配置**，无需手动复制粘贴。\n\n### 备选：手动设置 API Key\n\n如果你已有 API key，也可以直接保存：\n\n```bash\ndlazy auth set YOUR_API_KEY\n```\n\nCLI 会把 key 保存在你的用户配置目录（macOS/Linux 上为 `~/.dlazy/config.json`，Windows 上为 `%USERPROFILE%\\.dlazy\\config.json`），文件权限仅限当前操作系统用户访问。你也可以用 `DLAZY_API_KEY` 环境变量按次传入。\n\n### 手动获取 API Key\n\n1. 登录或在 [dlazy.com](https://dlazy.com) 创建账号\n2. 访问 [dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key)\n3. 复制 API Key 区域显示的密钥\n\n每个 key 都属于你自己的 dLazy 组织，可在同一控制面板**随时轮换或吊销**。\n\n## 关于与来源 (Provenance)\n\n- **CLI 源代码**: [github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli)\n- **维护者**: dlazyai\n- **npm 包名**: `@dlazy/cli`\n- **官网**: [dlazy.com](https://dlazy.com)\n\n如果你不希望在系统上长期保留一个全局 CLI，可以按需运行：\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>\n```\n\n安装前建议先到 GitHub 仓库审阅源码。\n\n## 工作原理 (How It Works)\n\n绘本的**插图**由 `dlazy gpt-image-2` 生成、**背景音乐**由 `dlazy elevenlabs-music` 生成，二者都是 dLazy 托管 API 的轻量封装：\n\n- 你提供的提示词与参数会发送到 dLazy API（`api.dlazy.com`）进行推理。\n- 传入的本地参考图会先上传到 dLazy 媒体存储（`files.dlazy.com`），生成结果 URL 也由 `files.dlazy.com` 托管。\n\n**故事文本、分页编排、HTML 组装**都在本地完成——由你（Agent）编写故事、调用本技能自带的 `scripts/build_book.py` 把内容注入 `assets/template.html` 模版，产出一个自包含的 HTML。这是标准的 SaaS 调用模式，技能本身不越权访问网络或文件系统。\n\n---\n\n## 成品长什么样\n\n一个可以直接双击打开的文件夹，`index.html` 就是绘本：\n\n```\n<绘本标题>/\n├── index.html        ← 最终绘本（左图右文、翻页、背景音乐）\n├── book.json         ← 内容数据（标题、每页图文、音乐）\n├── images/           ← cover.png, page-01.png … page-10.png\n└── music/            ← bgm.mp3\n```\n\n阅读体验：**封面**（大图 + 标题 + “开始阅读”）→ **内页**（左边 3:4 插图，右边故事文字，可用方向键 / 点击左右 / 底部圆点翻页）→ **尾页**。右上角有背景音乐开关。手机上自动变为上图下文。\n\n图片与音乐都用**相对路径**引用，所以整个文件夹拷走即可分享，无需联网。\n\n---\n\n## 工作流\n\n绘本是「故事 + 画面 + 声音」的整体，质量取决于三者是否协调。按下面的顺序做，每一步都为下一步打好基础。\n\n### 第 0 步：确认创作简报\n\n动手前先和用户对齐这几件事（用户没说的，用合理默认值并说明，不要追问到底）：\n\n- **主题 / 故事内核**：讲什么？想传递什么（勇气、分享、友谊…）？\n- **页数**：默认 **10 页**，用户可指定。\n- **受众年龄**：默认 3–6 岁。决定文字难度与句子长度。\n- **画风**：默认温暖治愈的水彩儿童绘本风。也可以是扁平插画、蜡笔、3D 皮克斯风等。\n- **主角**：外形要具体（如“一只戴红围巾的小狐狸”），因为它要在每一页保持一致。\n\n### 第 1 步：编写分页故事，落到 book.json\n\n先把**整本书的文字**写完，再去生成图。这样画面才有统一的叙事线索。\n\n- 一个完整的故事弧：**开场（介绍主角与世界）→ 出发 / 愿望 → 遇到困难 → 转折 → 温暖的结局**。10 页就按这个节奏铺开。\n- 每页 **1–3 句**，口语化、有画面感，适合朗读。低龄段句子更短。\n- 同时为每页想好**画面描述**（这一页画什么），下一步生成插图要用。\n\n把结果先写成 `book.json`（图片 / 音乐路径先占位，生成后已经是对的路径）：\n\n```json\n{\n  \"title\": \"小狐狸的星星灯\",\n  \"subtitle\": \"一个关于分享的温暖故事\",\n  \"cover_image\": \"images/cover.png\",\n  \"music\": \"music/bgm.mp3\",\n  \"pages\": [\n    { \"image\": \"images/page-01.png\", \"text\": \"森林深处住着一只戴红围巾的小狐狸……\" },\n    { \"image\": \"images/page-02.png\", \"text\": \"……\" }\n  ]\n}\n```\n\n### 第 2 步：逐页生成插图（保持角色与画风一致）\n\n一致性是绘本最容易翻车的地方——同一只小狐狸不能每页长得都不一样。做法是**用首页当“风格锚点”**：\n\n1. **先生成第 1 页**，提示词里把角色外形、画风、色调、构图都写足、写细。这张确立整本书的视觉基调。\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --prompt \"儿童绘本插画，温暖水彩风格，3:4 竖构图。一只戴红色围巾的橙色小狐狸趴在窗台上望着窗外圆圆的月亮，夜晚，柔和的暖色灯光，治愈童真的氛围，画面留白干净。\"\n   ```\n\n2. **后续每一页都把第 1 页作为参考图**传给 `--images`，让主角和画风延续，只改场景：\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --images images/page-01.png \\\n     --prompt \"同一只戴红围巾的橙色小狐狸，同样的水彩绘本画风与色调。这一页：小狐狸背起小背包，踏着月光走进森林。3:4 竖构图。\"\n   ```\n\n3. 命令返回后，结果 URL 在 `result.outputs[0].url`。**用 curl 下载到 `images/`**：\n\n   ```bash\n   curl -L -o images/page-01.png \"<返回的 url>\"\n   ```\n\n关于参数：`--quality low` 是低质量（快、省积分，绘本小图足够）；`--size 1024x1536` 是最接近 3:4 的小竖图（gpt-image-2 没有精确的 3:4 档，模版会按 3:4 裁切，视觉上正好）。\n\n**封面**同理：用第 1 页作参考图，生成一张更有氛围感的主视觉存到 `images/cover.png`。\n\n> **执行纪律（重要）**：一次只跑一个生成命令，等它返回、下载好，再跑下一个——不要一次性把 10 张图的命令一股脑并发或用 `&`/`&&` 串起来。这既是因为要拿上一张的结果当参考图，也因为在 Windows PowerShell 下 `&`/`&&` 会报错。\n\n### 第 3 步：生成背景音乐\n\n根据故事基调写一句音乐提示词，时长给足以覆盖阅读（睡前故事 60–90 秒即可，循环播放）：\n\n```bash\ndlazy elevenlabs-music --duration 75 \\\n  --prompt \"温柔舒缓的儿童睡前音乐，轻柔的钢琴与八音盒，梦幻温暖，适合绘本朗读的背景，无人声。\"\n```\n\n返回后同样 `curl` 下载到 `music/bgm.mp3`。\n\n### 第 4 步：组装成 HTML\n\n确认 `book.json` 里的路径和实际下载的文件对得上，然后运行本技能自带的构建脚本：\n\n```bash\npython3 <本技能目录>/scripts/build_book.py book.json -o index.html\n```\n\n脚本会把 `book.json` 注入 `assets/template.html`，生成自包含的 `index.html`。把 `index.html` 和 `images/`、`music/` 放在同一文件夹即可。\n\n### 第 5 步：交付\n\n告诉用户成品文件夹路径，说明双击 `index.html` 就能翻阅、右上角可开关背景音乐。附上封面图 URL 让用户先睹为快。\n\n---\n\n## 命令速查\n\n**插图 · gpt-image-2**（完整帮助：`dlazy gpt-image-2 -h`）\n\n| 参数 | 绘本用法 |\n| --- | --- |\n| `--prompt` | 画面描述（角色 + 场景 + 画风 + “3:4 竖构图”） |\n| `--images` | 参考图（首页图路径），用于保持角色/画风一致，最多 5 张 |\n| `--quality` | `low`（绘本小图够用，快且省积分） |\n| `--size` | `1024x1536`（最接近 3:4 的小竖图） |\n\n**背景音乐 · elevenlabs-music**（完整帮助：`dlazy elevenlabs-music -h`）\n\n| 参数 | 绘本用法 |\n| --- | --- |\n| `--prompt` | 音乐氛围描述（乐器、情绪、“无人声”、适合朗读） |\n| `--duration` | 时长（秒），睡前故事 60–90 即可，循环播放 |\n\n生成结果统一在 `result.outputs[0].url`，用 `curl -L -o <本地路径> \"<url>\"` 下载。\n\n## 错误处理\n\n| Code | 错误类型                         | 示例信息                                                                                             |\n| ---- | -------------------------------- | ---------------------------------------------------------------------------------------------------- |\n| 401  | 未授权 (API Key缺失或无效)       | `ok: false, code: \"unauthorized\", message: \"API key is missing or invalid\"`                          |\n| 501  | 缺少必填参数                     | `error: required option '--prompt <prompt>' not specified`                                            |\n| 502  | 本地文件读取失败                 | `Error: Image file not found: C:\\path\\to\\your\\file`                                                  |\n| 503  | API 请求失败（余额不足）         | `ok: false, code: \"insufficient_balance\"`                                                            |\n| 503  | API 请求失败（服务端错误）       | `HTTP status code error (500 server crash)`                                                          |\n| 504  | 异步任务执行失败                 | `=== Generation Failed ===` / `{后端返回的具体失败原因，如提示词违反安全策略}`                        |\n\n> **智能体关键指令**:\n> 1. 如果返回 `code: \"insufficient_balance\"`（余额不足），必须明确告知用户积分不足，并引导前往充值：[https://dlazy.com/dashboard/organization/settings?tab=credits](https://dlazy.com/dashboard/organization/settings?tab=credits)\n> 2. 如果返回 `code: \"unauthorized\"` 或提示缺少 API Key，必须告知用户前往 [https://dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key) 获取 API Key 并用 `dlazy auth set <key>` 保存，然后继续任务。\n> 3. 若某张图违反安全策略被拒，改写该页提示词（去掉敏感/暴力/写实人物等描述）后重试，不要中断整本书。\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nArchive v1.3.23: 6 files, 19066 bytes\n\nFiles: assets/template.html (14664b), scripts/build_book.py (2477b), skill-card.md (1805b), SKILL-cn.md (12769b), SKILL.md (13311b), _meta.json (138b)\n\nFile v1.3.23:SKILL.md\n\n---\nname: dlazy-picture-book\nversion: 1.3.5\ndescription: \"picture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a self-contained HTML book with image-left / text-right spreads, page turning, and background music. Defaults to 10 pages. Use when the user wants a picture book / storybook / children's book / bedtime story, or says 'make me a picture book about ...'.\"\nmetadata:\n  {\n    'clawdbot':\n      {\n        'emoji': '📖',\n        'requires': { 'bins': ['npm', 'npx', 'python3', 'curl'] },\n        'install': 'npm install -g @dlazy/cli@1.2.3',\n        'installAlternative': 'npx @dlazy/cli@1.2.3',\n        'homepage': 'https://github.com/dlazy-ai/cli',\n        'source': 'https://github.com/dlazy-ai/cli',\n        'author': 'dlazyai',\n        'license': 'see-repo',\n        'npm': 'https://www.npmjs.com/package/@dlazy/cli',\n        'configLocation': '~/.dlazy/config.json',\n        'apiEndpoints': ['api.dlazy.com', 'files.dlazy.com'],\n      },\n    'openclaw':\n      {\n        'systemPrompt': \"When making a picture book, follow this skill's workflow strictly: first confirm the theme and paged story, then generate illustrations page by page with dlazy gpt-image-2 (the first page establishes the character and art style; later pages pass the first page as a reference image via --images to stay consistent), generate background music with dlazy elevenlabs-music, and finally assemble book.json into index.html with this skill's scripts/build_book.py. Note: Windows PowerShell forbids `&` / `&&` to chain commands — run them one at a time; never batch-generate all images at once.\",\n      },\n  }\n---\n\n# 绘本生成 Picture Book\n\n[English](./SKILL.md) · [中文](./SKILL-cn.md)\n\npicture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a **self-contained HTML book with image-left / text-right spreads, page turning, and background music**. Defaults to 10 pages.\n\n## Trigger Keywords\n\n- picture book / storybook\n- children's book / illustrated story\n- bedtime story / story book\n- 绘本 / 图画书\n- make me a picture book about ...\n\n## Authentication\n\nAll dlazy requests require a dLazy API key. The recommended way to authenticate is:\n\n```bash\ndlazy login\n```\n\nThis runs a device-code flow (also works in remote shells) and **automatically saves your API key** to the local CLI config — no manual copy/paste required.\n\n### Alternative: Set the Key Manually\n\n```bash\ndlazy auth set YOUR_API_KEY\n```\n\nThe CLI saves the key in your user config directory (`~/.dlazy/config.json` on macOS/Linux, `%USERPROFILE%\\.dlazy\\config.json` on Windows), with file permissions restricted to your OS user account. You can also supply the key per-invocation via the `DLAZY_API_KEY` environment variable.\n\n### Getting Your API Key Manually\n\n1. Sign in or create an account at [dlazy.com](https://dlazy.com)\n2. Go to [dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key)\n3. Copy the key shown in the API Key section\n\nEach key is scoped to your dLazy organization and can be **rotated or revoked at any time** from the same dashboard.\n\n## About & Provenance\n\n- **CLI source code**: [github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli)\n- **Maintainer**: dlazyai\n- **npm package**: `@dlazy/cli`\n- **Homepage**: [dlazy.com](https://dlazy.com)\n\nRun on demand without a global install:\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>\n```\n\nReview the GitHub source before installing.\n\n## How It Works\n\nIllustrations are generated by `dlazy gpt-image-2` and background music by `dlazy elevenlabs-music`; both are thin clients over the dLazy hosted API:\n\n- Prompts and parameters are sent to the dLazy API (`api.dlazy.com`) for inference.\n- Local reference images are uploaded to dLazy media storage (`files.dlazy.com`); result URLs are also hosted there.\n\nThe **story text, page composition, and HTML assembly** happen locally — you (the agent) write the story and call this skill's `scripts/build_book.py` to inject the content into `assets/template.html`, producing a self-contained HTML. Standard SaaS pattern; the skill does not access network or filesystem beyond what the dLazy CLI handles.\n\n---\n\n## What the output looks like\n\nA folder you can open directly; `index.html` is the book:\n\n```\n<book-title>/\n├── index.html        ← the finished book (image-left/text-right, page turning, BGM)\n├── book.json         ← content data (title, per-page image+text, music)\n├── images/           ← cover.png, page-01.png … page-10.png\n└── music/            ← bgm.mp3\n```\n\nReading experience: **cover** (large image + title + \"Start reading\") → **spreads** (illustration on the left in 3:4, story text on the right; turn pages with arrow keys / click left-right / bottom dots) → **end page**. A background-music toggle sits top-right. On mobile it becomes image-top / text-bottom.\n\nImages and music are referenced by **relative paths**, so the whole folder is portable and works offline.\n\n---\n\n## Workflow\n\nA picture book is story + image + sound as one whole; quality comes from keeping the three coordinated. Do the steps in order — each sets up the next.\n\n### Step 0: Confirm the brief\n\nBefore starting, align on these (fill sensible defaults for anything unstated and say so — don't interrogate the user):\n\n- **Theme / core**: what's the story, what does it convey (courage, sharing, friendship…)?\n- **Page count**: defaults to **10**; the user may specify otherwise.\n- **Audience age**: defaults to 3–6. Drives text difficulty and sentence length.\n- **Art style**: defaults to warm, healing watercolor children's-book style. Could also be flat illustration, crayon, Pixar-style 3D, etc.\n- **Protagonist**: give it a concrete look (e.g. \"a little fox in a red scarf\") — it must stay consistent on every page.\n\n### Step 1: Write the paged story into book.json\n\nWrite the **whole book's text first**, then generate images, so the visuals follow one narrative thread.\n\n- A full arc: **opening (introduce hero + world) → setting out / a wish → a problem → a turn → a warm ending.** Spread this across the 10 pages.\n- **1–3 sentences per page**, spoken and vivid, good to read aloud. Shorter for younger readers.\n- Also note a **visual description** for each page (what to draw) — you'll need it next.\n\nWrite `book.json` first (image/music paths as placeholders that will already be correct once generated):\n\n```json\n{\n  \"title\": \"The Little Fox's Star Lantern\",\n  \"subtitle\": \"A warm story about sharing\",\n  \"cover_image\": \"images/cover.png\",\n  \"music\": \"music/bgm.mp3\",\n  \"pages\": [\n    { \"image\": \"images/page-01.png\", \"text\": \"Deep in the forest lived a little fox in a red scarf…\" },\n    { \"image\": \"images/page-02.png\", \"text\": \"…\" }\n  ]\n}\n```\n\n### Step 2: Generate illustrations page by page (keep character + style consistent)\n\nConsistency is where picture books fail — the same fox can't look different on every page. Use the **first page as a style anchor**:\n\n1. **Generate page 1 first**, writing the character look, art style, palette, and composition in full detail. This sets the visual baseline for the whole book.\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --prompt \"Children's book illustration, warm watercolor style, 3:4 portrait. An orange little fox in a red scarf lies on a windowsill gazing at the round moon outside, nighttime, soft warm lamplight, healing childlike mood, clean negative space.\"\n   ```\n\n2. **Pass page 1 as the reference image** via `--images` on every later page so the hero and style carry over; only the scene changes:\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --images images/page-01.png \\\n     --prompt \"Same orange fox in a red scarf, same watercolor style and palette. This page: the fox shoulders a small backpack and walks into the forest under the moonlight. 3:4 portrait.\"\n   ```\n\n3. The result URL is at `result.outputs[0].url`. **Download it into `images/` with curl:**\n\n   ```bash\n   curl -L -o images/page-01.png \"<returned url>\"\n   ```\n\nOn parameters: `--quality low` is low quality (fast, cheap, plenty for small book art); `--size 1024x1536` is the closest small portrait to 3:4 (gpt-image-2 has no exact 3:4 tier; the template crops to 3:4 so it looks right).\n\n**Cover**: same idea — use page 1 as reference to generate a more atmospheric hero image into `images/cover.png`.\n\n> **Execution discipline (important)**: run one generation command at a time — wait for it to return and download before the next — don't fire all 10 image commands at once or chain them with `&`/`&&`. This is both because later pages need the previous image as a reference and because `&`/`&&` error out under Windows PowerShell.\n\n### Step 3: Generate background music\n\nWrite one music prompt from the story's mood; give it enough length to cover a read-through (60–90s for a bedtime story is fine, it loops):\n\n```bash\ndlazy elevenlabs-music --duration 75 \\\n  --prompt \"Gentle, soothing children's bedtime music, soft piano and music box, dreamy and warm, a background for reading a picture book aloud, no vocals.\"\n```\n\nDownload the result into `music/bgm.mp3` with `curl` the same way.\n\n### Step 4: Assemble the HTML\n\nMake sure the paths in `book.json` match the files you actually downloaded, then run this skill's build script:\n\n```bash\npython3 <this-skill-dir>/scripts/build_book.py book.json -o index.html\n```\n\nIt injects `book.json` into `assets/template.html` to produce a self-contained `index.html`. Keep `index.html` next to `images/` and `music/`.\n\n### Step 5: Deliver\n\nTell the user the output folder path, that double-clicking `index.html` opens the book, and that the top-right button toggles the music. Share the cover image URL for a quick preview.\n\n---\n\n## Command cheatsheet\n\n**Illustration · gpt-image-2** (full help: `dlazy gpt-image-2 -h`)\n\n| Flag | Picture-book usage |\n| --- | --- |\n| `--prompt` | Scene description (character + scene + style + \"3:4 portrait\") |\n| `--images` | Reference image (page-1 path) to keep character/style consistent, up to 5 |\n| `--quality` | `low` (small book art, fast and cheap) |\n| `--size` | `1024x1536` (closest small portrait to 3:4) |\n\n**Background music · elevenlabs-music** (full help: `dlazy elevenlabs-music -h`)\n\n| Flag | Picture-book usage |\n| --- | --- |\n| `--prompt` | Mood description (instruments, emotion, \"no vocals\", good for reading aloud) |\n| `--duration` | Seconds; 60–90 is fine for a bedtime story, it loops |\n\nResults are always at `result.outputs[0].url`; download with `curl -L -o <local path> \"<url>\"`.\n\n## Error Handling\n\n| Code | Error Type                         | Example Message                                                                                                          |\n| ---- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |\n| 401  | Unauthorized (No API Key)          | `ok: false, code: \"unauthorized\", message: \"API key is missing or invalid\"`                                              |\n| 501  | Missing required parameter         | `error: required option '--prompt <prompt>' not specified`                                                               |\n| 502  | Local file read error              | `Error: Image file not found: C:\\path\\to\\your\\file`                                                                      |\n| 503  | API request failed (no balance)    | `ok: false, code: \"insufficient_balance\"`                                                                                |\n| 503  | API request failed (server error)  | `HTTP status code error (500 server crash)`                                                                              |\n| 504  | Asynchronous task execution failed | `=== Generation Failed ===` / `{Specific error reason returned by backend, e.g. \"Prompt violates safety policy\"}`        |\n\n> **AGENT CRITICAL INSTRUCTION**:\n>\n> 1. If the result returns `code: \"insufficient_balance\"`, you MUST explicitly tell the user their credits are insufficient and guide them to recharge: [https://dlazy.com/dashboard/organization/settings?tab=credits](https://dlazy.com/dashboard/organization/settings?tab=credits)\n> 2. If the result returns `code: \"unauthorized\"` or indicates a missing API key, you MUST tell the user to get their API key from [https://dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key) and save it with `dlazy auth set <key>`, then resume.\n> 3. If one image is rejected for violating the safety policy, rewrite that page's prompt (drop sensitive/violent/photoreal-person content) and retry — don't abandon the whole book.\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.3.23:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"dlazy-picture-book\",\n  \"version\": \"1.3.23\",\n  \"publishedAt\": 1790917294008\n}\n\nFile v1.3.23:skill-card.md\n\n## Description:\n\nCreates an illustrated picture book from a theme, pairing a paged story with consistent images and background music in a locally assembled HTML book.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dlazyai](https://clawhub.ai/user/dlazyai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nCreators and other external users can turn a theme into a children's picture book with short page-by-page text, illustrations, and background music.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Prompts and reference images are sent to third-party dLazy services.\n\nMitigation: Avoid private reference images unless you intend to upload them, and review content before sending.\n\nRisk: The dLazy CLI uses an API key stored locally.\n\nMitigation: Keep the key private and use a dedicated output folder for generated files.\n\n## Reference(s):\n\n- [ClawHub picture-book release](https://clawhub.ai/dlazyai/skills/dlazy-picture-book)\n- [dLazy CLI source (tool dependency)](https://github.com/dlazy-ai/cli)\n- [dLazy CLI npm package](https://www.npmjs.com/package/@dlazy/cli)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Code, Files, Images, Audio]\n\n**Output Format:** [JSON story and HTML book with local PNG illustrations and MP3 music]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Defaults to 10 pages; HTML references media using relative paths.]\n\n## Skill Version(s):\n\n1.3.23 (source: ClawHub release metadata; bundled skill frontmatter says 1.3.5)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.3.23:SKILL-cn.md\n\n---\nname: dlazy-picture-book\nversion: 1.3.5\ndescription: \"绘本生成、儿童绘本、图画书、睡前故事书、picture book、storybook——根据一个主题创作完整绘本：编写分页故事、用 dlazy gpt-image-2 逐页生成风格统一的插图、用 dlazy elevenlabs-music 生成匹配基调的背景音乐，最后组装成一个左图右文、可翻页、带背景音乐的独立 HTML 绘本。默认 10 页。当用户想做绘本 / 图画书 / 儿童故事书 / 睡前故事，或说“帮我做一本关于……的绘本”时使用。\"\nmetadata:\n  {\n    'clawdbot':\n      {\n        'emoji': '📖',\n        'requires': { 'bins': ['npm', 'npx', 'python3', 'curl'] },\n        'install': 'npm install -g @dlazy/cli@1.2.3',\n        'installAlternative': 'npx @dlazy/cli@1.2.3',\n        'homepage': 'https://github.com/dlazy-ai/cli',\n        'source': 'https://github.com/dlazy-ai/cli',\n        'author': 'dlazyai',\n        'license': 'see-repo',\n        'npm': 'https://www.npmjs.com/package/@dlazy/cli',\n        'configLocation': '~/.dlazy/config.json',\n        'apiEndpoints': ['api.dlazy.com', 'files.dlazy.com'],\n      },\n    'openclaw':\n      {\n        'systemPrompt': '当你需要制作绘本时，请严格遵循此技能的工作流：先确认主题与分页故事，再用 dlazy gpt-image-2 逐页生成插图（首页确立角色与画风，后续页用首页作参考图保持一致），用 dlazy elevenlabs-music 生成背景音乐，最后用本技能自带的 scripts/build_book.py 把 book.json 组装成 index.html。注意：Windows PowerShell 中不允许用 `&` 或 `&&` 串联命令，请逐条同步执行；不要一次性批量生成所有图片。',\n      },\n  }\n---\n\n# 绘本生成 Picture Book\n\n[English](./SKILL.md) · [中文](./SKILL-cn.md)\n\n绘本生成、儿童绘本、图画书、睡前故事书、picture book、storybook——根据一个主题创作完整绘本：编写分页故事、用 dlazy gpt-image-2 逐页生成风格统一的插图、用 dlazy elevenlabs-music 生成匹配的背景音乐，最后组装成一个**左图右文、可翻页、带背景音乐的独立 HTML 绘本**。默认 10 页。\n\n## 触发关键词\n\n- 绘本 / 绘本生成\n- 儿童绘本 / 图画书\n- 睡前故事 / 故事书\n- picture book / storybook\n- 帮我做一本关于……的绘本\n\n## 身份验证 (Authentication)\n\n所有 dlazy 请求都需要 dLazy API key。**推荐使用** `dlazy login` 完成登录：\n\n```bash\ndlazy login\n```\n\n该命令使用设备码流程（远程终端也可用），登录成功后 **自动把 API key 写入本地 CLI 配置**，无需手动复制粘贴。\n\n### 备选：手动设置 API Key\n\n如果你已有 API key，也可以直接保存：\n\n```bash\ndlazy auth set YOUR_API_KEY\n```\n\nCLI 会把 key 保存在你的用户配置目录（macOS/Linux 上为 `~/.dlazy/config.json`，Windows 上为 `%USERPROFILE%\\.dlazy\\config.json`），文件权限仅限当前操作系统用户访问。你也可以用 `DLAZY_API_KEY` 环境变量按次传入。\n\n### 手动获取 API Key\n\n1. 登录或在 [dlazy.com](https://dlazy.com) 创建账号\n2. 访问 [dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key)\n3. 复制 API Key 区域显示的密钥\n\n每个 key 都属于你自己的 dLazy 组织，可在同一控制面板**随时轮换或吊销**。\n\n## 关于与来源 (Provenance)\n\n- **CLI 源代码**: [github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli)\n- **维护者**: dlazyai\n- **npm 包名**: `@dlazy/cli`\n- **官网**: [dlazy.com](https://dlazy.com)\n\n如果你不希望在系统上长期保留一个全局 CLI，可以按需运行：\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>\n```\n\n安装前建议先到 GitHub 仓库审阅源码。\n\n## 工作原理 (How It Works)\n\n绘本的**插图**由 `dlazy gpt-image-2` 生成、**背景音乐**由 `dlazy elevenlabs-music` 生成，二者都是 dLazy 托管 API 的轻量封装：\n\n- 你提供的提示词与参数会发送到 dLazy API（`api.dlazy.com`）进行推理。\n- 传入的本地参考图会先上传到 dLazy 媒体存储（`files.dlazy.com`），生成结果 URL 也由 `files.dlazy.com` 托管。\n\n**故事文本、分页编排、HTML 组装**都在本地完成——由你（Agent）编写故事、调用本技能自带的 `scripts/build_book.py` 把内容注入 `assets/template.html` 模版，产出一个自包含的 HTML。这是标准的 SaaS 调用模式，技能本身不越权访问网络或文件系统。\n\n---\n\n## 成品长什么样\n\n一个可以直接双击打开的文件夹，`index.html` 就是绘本：\n\n```\n<绘本标题>/\n├── index.html        ← 最终绘本（左图右文、翻页、背景音乐）\n├── book.json         ← 内容数据（标题、每页图文、音乐）\n├── images/           ← cover.png, page-01.png … page-10.png\n└── music/            ← bgm.mp3\n```\n\n阅读体验：**封面**（大图 + 标题 + “开始阅读”）→ **内页**（左边 3:4 插图，右边故事文字，可用方向键 / 点击左右 / 底部圆点翻页）→ **尾页**。右上角有背景音乐开关。手机上自动变为上图下文。\n\n图片与音乐都用**相对路径**引用，所以整个文件夹拷走即可分享，无需联网。\n\n---\n\n## 工作流\n\n绘本是「故事 + 画面 + 声音」的整体，质量取决于三者是否协调。按下面的顺序做，每一步都为下一步打好基础。\n\n### 第 0 步：确认创作简报\n\n动手前先和用户对齐这几件事（用户没说的，用合理默认值并说明，不要追问到底）：\n\n- **主题 / 故事内核**：讲什么？想传递什么（勇气、分享、友谊…）？\n- **页数**：默认 **10 页**，用户可指定。\n- **受众年龄**：默认 3–6 岁。决定文字难度与句子长度。\n- **画风**：默认温暖治愈的水彩儿童绘本风。也可以是扁平插画、蜡笔、3D 皮克斯风等。\n- **主角**：外形要具体（如“一只戴红围巾的小狐狸”），因为它要在每一页保持一致。\n\n### 第 1 步：编写分页故事，落到 book.json\n\n先把**整本书的文字**写完，再去生成图。这样画面才有统一的叙事线索。\n\n- 一个完整的故事弧：**开场（介绍主角与世界）→ 出发 / 愿望 → 遇到困难 → 转折 → 温暖的结局**。10 页就按这个节奏铺开。\n- 每页 **1–3 句**，口语化、有画面感，适合朗读。低龄段句子更短。\n- 同时为每页想好**画面描述**（这一页画什么），下一步生成插图要用。\n\n把结果先写成 `book.json`（图片 / 音乐路径先占位，生成后已经是对的路径）：\n\n```json\n{\n  \"title\": \"小狐狸的星星灯\",\n  \"subtitle\": \"一个关于分享的温暖故事\",\n  \"cover_image\": \"images/cover.png\",\n  \"music\": \"music/bgm.mp3\",\n  \"pages\": [\n    { \"image\": \"images/page-01.png\", \"text\": \"森林深处住着一只戴红围巾的小狐狸……\" },\n    { \"image\": \"images/page-02.png\", \"text\": \"……\" }\n  ]\n}\n```\n\n### 第 2 步：逐页生成插图（保持角色与画风一致）\n\n一致性是绘本最容易翻车的地方——同一只小狐狸不能每页长得都不一样。做法是**用首页当“风格锚点”**：\n\n1. **先生成第 1 页**，提示词里把角色外形、画风、色调、构图都写足、写细。这张确立整本书的视觉基调。\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --prompt \"儿童绘本插画，温暖水彩风格，3:4 竖构图。一只戴红色围巾的橙色小狐狸趴在窗台上望着窗外圆圆的月亮，夜晚，柔和的暖色灯光，治愈童真的氛围，画面留白干净。\"\n   ```\n\n2. **后续每一页都把第 1 页作为参考图**传给 `--images`，让主角和画风延续，只改场景：\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --images images/page-01.png \\\n     --prompt \"同一只戴红围巾的橙色小狐狸，同样的水彩绘本画风与色调。这一页：小狐狸背起小背包，踏着月光走进森林。3:4 竖构图。\"\n   ```\n\n3. 命令返回后，结果 URL 在 `result.outputs[0].url`。**用 curl 下载到 `images/`**：\n\n   ```bash\n   curl -L -o images/page-01.png \"<返回的 url>\"\n   ```\n\n关于参数：`--quality low` 是低质量（快、省积分，绘本小图足够）；`--size 1024x1536` 是最接近 3:4 的小竖图（gpt-image-2 没有精确的 3:4 档，模版会按 3:4 裁切，视觉上正好）。\n\n**封面**同理：用第 1 页作参考图，生成一张更有氛围感的主视觉存到 `images/cover.png`。\n\n> **执行纪律（重要）**：一次只跑一个生成命令，等它返回、下载好，再跑下一个——不要一次性把 10 张图的命令一股脑并发或用 `&`/`&&` 串起来。这既是因为要拿上一张的结果当参考图，也因为在 Windows PowerShell 下 `&`/`&&` 会报错。\n\n### 第 3 步：生成背景音乐\n\n根据故事基调写一句音乐提示词，时长给足以覆盖阅读（睡前故事 60–90 秒即可，循环播放）：\n\n```bash\ndlazy elevenlabs-music --duration 75 \\\n  --prompt \"温柔舒缓的儿童睡前音乐，轻柔的钢琴与八音盒，梦幻温暖，适合绘本朗读的背景，无人声。\"\n```\n\n返回后同样 `curl` 下载到 `music/bgm.mp3`。\n\n### 第 4 步：组装成 HTML\n\n确认 `book.json` 里的路径和实际下载的文件对得上，然后运行本技能自带的构建脚本：\n\n```bash\npython3 <本技能目录>/scripts/build_book.py book.json -o index.html\n```\n\n脚本会把 `book.json` 注入 `assets/template.html`，生成自包含的 `index.html`。把 `index.html` 和 `images/`、`music/` 放在同一文件夹即可。\n\n### 第 5 步：交付\n\n告诉用户成品文件夹路径，说明双击 `index.html` 就能翻阅、右上角可开关背景音乐。附上封面图 URL 让用户先睹为快。\n\n---\n\n## 命令速查\n\n**插图 · gpt-image-2**（完整帮助：`dlazy gpt-image-2 -h`）\n\n| 参数 | 绘本用法 |\n| --- | --- |\n| `--prompt` | 画面描述（角色 + 场景 + 画风 + “3:4 竖构图”） |\n| `--images` | 参考图（首页图路径），用于保持角色/画风一致，最多 5 张 |\n| `--quality` | `low`（绘本小图够用，快且省积分） |\n| `--size` | `1024x1536`（最接近 3:4 的小竖图） |\n\n**背景音乐 · elevenlabs-music**（完整帮助：`dlazy elevenlabs-music -h`）\n\n| 参数 | 绘本用法 |\n| --- | --- |\n| `--prompt` | 音乐氛围描述（乐器、情绪、“无人声”、适合朗读） |\n| `--duration` | 时长（秒），睡前故事 60–90 即可，循环播放 |\n\n生成结果统一在 `result.outputs[0].url`，用 `curl -L -o <本地路径> \"<url>\"` 下载。\n\n## 错误处理\n\n| Code | 错误类型                         | 示例信息                                                                                             |\n| ---- | -------------------------------- | ---------------------------------------------------------------------------------------------------- |\n| 401  | 未授权 (API Key缺失或无效)       | `ok: false, code: \"unauthorized\", message: \"API key is missing or invalid\"`                          |\n| 501  | 缺少必填参数                     | `error: required option '--prompt <prompt>' not specified`                                            |\n| 502  | 本地文件读取失败                 | `Error: Image file not found: C:\\path\\to\\your\\file`                                                  |\n| 503  | API 请求失败（余额不足）         | `ok: false, code: \"insufficient_balance\"`                                                            |\n| 503  | API 请求失败（服务端错误）       | `HTTP status code error (500 server crash)`                                                          |\n| 504  | 异步任务执行失败                 | `=== Generation Failed ===` / `{后端返回的具体失败原因，如提示词违反安全策略}`                        |\n\n> **智能体关键指令**:\n> 1. 如果返回 `code: \"insufficient_balance\"`（余额不足），必须明确告知用户积分不足，并引导前往充值：[https://dlazy.com/dashboard/organization/settings?tab=credits](https://dlazy.com/dashboard/organization/settings?tab=credits)\n> 2. 如果返回 `code: \"unauthorized\"` 或提示缺少 API Key，必须告知用户前往 [https://dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key) 获取 API Key 并用 `dlazy auth set <key>` 保存，然后继续任务。\n> 3. 若某张图违反安全策略被拒，改写该页提示词（去掉敏感/暴力/写实人物等描述）后重试，不要中断整本书。\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nArchive v1.3.22: 6 files, 19137 bytes\n\nFiles: assets/template.html (14664b), scripts/build_book.py (2477b), skill-card.md (1915b), SKILL-cn.md (12769b), SKILL.md (13311b), _meta.json (138b)\n\nFile v1.3.22:SKILL.md\n\n---\nname: dlazy-picture-book\nversion: 1.3.5\ndescription: \"picture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a self-contained HTML book with image-left / text-right spreads, page turning, and background music. Defaults to 10 pages. Use when the user wants a picture book / storybook / children's book / bedtime story, or says 'make me a picture book about ...'.\"\nmetadata:\n  {\n    'clawdbot':\n      {\n        'emoji': '📖',\n        'requires': { 'bins': ['npm', 'npx', 'python3', 'curl'] },\n        'install': 'npm install -g @dlazy/cli@1.2.3',\n        'installAlternative': 'npx @dlazy/cli@1.2.3',\n        'homepage': 'https://github.com/dlazy-ai/cli',\n        'source': 'https://github.com/dlazy-ai/cli',\n        'author': 'dlazyai',\n        'license': 'see-repo',\n        'npm': 'https://www.npmjs.com/package/@dlazy/cli',\n        'configLocation': '~/.dlazy/config.json',\n        'apiEndpoints': ['api.dlazy.com', 'files.dlazy.com'],\n      },\n    'openclaw':\n      {\n        'systemPrompt': \"When making a picture book, follow this skill's workflow strictly: first confirm the theme and paged story, then generate illustrations page by page with dlazy gpt-image-2 (the first page establishes the character and art style; later pages pass the first page as a reference image via --images to stay consistent), generate background music with dlazy elevenlabs-music, and finally assemble book.json into index.html with this skill's scripts/build_book.py. Note: Windows PowerShell forbids `&` / `&&` to chain commands — run them one at a time; never batch-generate all images at once.\",\n      },\n  }\n---\n\n# 绘本生成 Picture Book\n\n[English](./SKILL.md) · [中文](./SKILL-cn.md)\n\npicture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a **self-contained HTML book with image-left / text-right spreads, page turning, and background music**. Defaults to 10 pages.\n\n## Trigger Keywords\n\n- picture book / storybook\n- children's book / illustrated story\n- bedtime story / story book\n- 绘本 / 图画书\n- make me a picture book about ...\n\n## Authentication\n\nAll dlazy requests require a dLazy API key. The recommended way to authenticate is:\n\n```bash\ndlazy login\n```\n\nThis runs a device-code flow (also works in remote shells) and **automatically saves your API key** to the local CLI config — no manual copy/paste required.\n\n### Alternative: Set the Key Manually\n\n```bash\ndlazy auth set YOUR_API_KEY\n```\n\nThe CLI saves the key in your user config directory (`~/.dlazy/config.json` on macOS/Linux, `%USERPROFILE%\\.dlazy\\config.json` on Windows), with file permissions restricted to your OS user account. You can also supply the key per-invocation via the `DLAZY_API_KEY` environment variable.\n\n### Getting Your API Key Manually\n\n1. Sign in or create an account at [dlazy.com](https://dlazy.com)\n2. Go to [dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key)\n3. Copy the key shown in the API Key section\n\nEach key is scoped to your dLazy organization and can be **rotated or revoked at any time** from the same dashboard.\n\n## About & Provenance\n\n- **CLI source code**: [github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli)\n- **Maintainer**: dlazyai\n- **npm package**: `@dlazy/cli`\n- **Homepage**: [dlazy.com](https://dlazy.com)\n\nRun on demand without a global install:\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>\n```\n\nReview the GitHub source before installing.\n\n## How It Works\n\nIllustrations are generated by `dlazy gpt-image-2` and background music by `dlazy elevenlabs-music`; both are thin clients over the dLazy hosted API:\n\n- Prompts and parameters are sent to the dLazy API (`api.dlazy.com`) for inference.\n- Local reference images are uploaded to dLazy media storage (`files.dlazy.com`); result URLs are also hosted there.\n\nThe **story text, page composition, and HTML assembly** happen locally — you (the agent) write the story and call this skill's `scripts/build_book.py` to inject the content into `assets/template.html`, producing a self-contained HTML. Standard SaaS pattern; the skill does not access network or filesystem beyond what the dLazy CLI handles.\n\n---\n\n## What the output looks like\n\nA folder you can open directly; `index.html` is the book:\n\n```\n<book-title>/\n├── index.html        ← the finished book (image-left/text-right, page turning, BGM)\n├── book.json         ← content data (title, per-page image+text, music)\n├── images/           ← cover.png, page-01.png … page-10.png\n└── music/            ← bgm.mp3\n```\n\nReading experience: **cover** (large image + title + \"Start reading\") → **spreads** (illustration on the left in 3:4, story text on the right; turn pages with arrow keys / click left-right / bottom dots) → **end page**. A background-music toggle sits top-right. On mobile it becomes image-top / text-bottom.\n\nImages and music are referenced by **relative paths**, so the whole folder is portable and works offline.\n\n---\n\n## Workflow\n\nA picture book is story + image + sound as one whole; quality comes from keeping the three coordinated. Do the steps in order — each sets up the next.\n\n### Step 0: Confirm the brief\n\nBefore starting, align on these (fill sensible defaults for anything unstated and say so — don't interrogate the user):\n\n- **Theme / core**: what's the story, what does it convey (courage, sharing, friendship…)?\n- **Page count**: defaults to **10**; the user may specify otherwise.\n- **Audience age**: defaults to 3–6. Drives text difficulty and sentence length.\n- **Art style**: defaults to warm, healing watercolor children's-book style. Could also be flat illustration, crayon, Pixar-style 3D, etc.\n- **Protagonist**: give it a concrete look (e.g. \"a little fox in a red scarf\") — it must stay consistent on every page.\n\n### Step 1: Write the paged story into book.json\n\nWrite the **whole book's text first**, then generate images, so the visuals follow one narrative thread.\n\n- A full arc: **opening (introduce hero + world) → setting out / a wish → a problem → a turn → a warm ending.** Spread this across the 10 pages.\n- **1–3 sentences per page**, spoken and vivid, good to read aloud. Shorter for younger readers.\n- Also note a **visual description** for each page (what to draw) — you'll need it next.\n\nWrite `book.json` first (image/music paths as placeholders that will already be correct once generated):\n\n```json\n{\n  \"title\": \"The Little Fox's Star Lantern\",\n  \"subtitle\": \"A warm story about sharing\",\n  \"cover_image\": \"images/cover.png\",\n  \"music\": \"music/bgm.mp3\",\n  \"pages\": [\n    { \"image\": \"images/page-01.png\", \"text\": \"Deep in the forest lived a little fox in a red scarf…\" },\n    { \"image\": \"images/page-02.png\", \"text\": \"…\" }\n  ]\n}\n```\n\n### Step 2: Generate illustrations page by page (keep character + style consistent)\n\nConsistency is where picture books fail — the same fox can't look different on every page. Use the **first page as a style anchor**:\n\n1. **Generate page 1 first**, writing the character look, art style, palette, and composition in full detail. This sets the visual baseline for the whole book.\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --prompt \"Children's book illustration, warm watercolor style, 3:4 portrait. An orange little fox in a red scarf lies on a windowsill gazing at the round moon outside, nighttime, soft warm lamplight, healing childlike mood, clean negative space.\"\n   ```\n\n2. **Pass page 1 as the reference image** via `--images` on every later page so the hero and style carry over; only the scene changes:\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --images images/page-01.png \\\n     --prompt \"Same orange fox in a red scarf, same watercolor style and palette. This page: the fox shoulders a small backpack and walks into the forest under the moonlight. 3:4 portrait.\"\n   ```\n\n3. The result URL is at `result.outputs[0].url`. **Download it into `images/` with curl:**\n\n   ```bash\n   curl -L -o images/page-01.png \"<returned url>\"\n   ```\n\nOn parameters: `--quality low` is low quality (fast, cheap, plenty for small book art); `--size 1024x1536` is the closest small portrait to 3:4 (gpt-image-2 has no exact 3:4 tier; the template crops to 3:4 so it looks right).\n\n**Cover**: same idea — use page 1 as reference to generate a more atmospheric hero image into `images/cover.png`.\n\n> **Execution discipline (important)**: run one generation command at a time — wait for it to return and download before the next — don't fire all 10 image commands at once or chain them with `&`/`&&`. This is both because later pages need the previous image as a reference and because `&`/`&&` error out under Windows PowerShell.\n\n### Step 3: Generate background music\n\nWrite one music prompt from the story's mood; give it enough length to cover a read-through (60–90s for a bedtime story is fine, it loops):\n\n```bash\ndlazy elevenlabs-music --duration 75 \\\n  --prompt \"Gentle, soothing children's bedtime music, soft piano and music box, dreamy and warm, a background for reading a picture book aloud, no vocals.\"\n```\n\nDownload the result into `music/bgm.mp3` with `curl` the same way.\n\n### Step 4: Assemble the HTML\n\nMake sure the paths in `book.json` match the files you actually downloaded, then run this skill's build script:\n\n```bash\npython3 <this-skill-dir>/scripts/build_book.py book.json -o index.html\n```\n\nIt injects `book.json` into `assets/template.html` to produce a self-contained `index.html`. Keep `index.html` next to `images/` and `music/`.\n\n### Step 5: Deliver\n\nTell the user the output folder path, that double-clicking `index.html` opens the book, and that the top-right button toggles the music. Share the cover image URL for a quick preview.\n\n---\n\n## Command cheatsheet\n\n**Illustration · gpt-image-2** (full help: `dlazy gpt-image-2 -h`)\n\n| Flag | Picture-book usage |\n| --- | --- |\n| `--prompt` | Scene description (character + scene + style + \"3:4 portrait\") |\n| `--images` | Reference image (page-1 path) to keep character/style consistent, up to 5 |\n| `--quality` | `low` (small book art, fast and cheap) |\n| `--size` | `1024x1536` (closest small portrait to 3:4) |\n\n**Background music · elevenlabs-music** (full help: `dlazy elevenlabs-music -h`)\n\n| Flag | Picture-book usage |\n| --- | --- |\n| `--prompt` | Mood description (instruments, emotion, \"no vocals\", good for reading aloud) |\n| `--duration` | Seconds; 60–90 is fine for a bedtime story, it loops |\n\nResults are always at `result.outputs[0].url`; download with `curl -L -o <local path> \"<url>\"`.\n\n## Error Handling\n\n| Code | Error Type                         | Example Message                                                                                                          |\n| ---- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |\n| 401  | Unauthorized (No API Key)          | `ok: false, code: \"unauthorized\", message: \"API key is missing or invalid\"`                                              |\n| 501  | Missing required parameter         | `error: required option '--prompt <prompt>' not specified`                                                               |\n| 502  | Local file read error              | `Error: Image file not found: C:\\path\\to\\your\\file`                                                                      |\n| 503  | API request failed (no balance)    | `ok: false, code: \"insufficient_balance\"`                                                                                |\n| 503  | API request failed (server error)  | `HTTP status code error (500 server crash)`                                                                              |\n| 504  | Asynchronous task execution failed | `=== Generation Failed ===` / `{Specific error reason returned by backend, e.g. \"Prompt violates safety policy\"}`        |\n\n> **AGENT CRITICAL INSTRUCTION**:\n>\n> 1. If the result returns `code: \"insufficient_balance\"`, you MUST explicitly tell the user their credits are insufficient and guide them to recharge: [https://dlazy.com/dashboard/organization/settings?tab=credits](https://dlazy.com/dashboard/organization/settings?tab=credits)\n> 2. If the result returns `code: \"unauthorized\"` or indicates a missing API key, you MUST tell the user to get their API key from [https://dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key) and save it with `dlazy auth set <key>`, then resume.\n> 3. If one image is rejected for violating the safety policy, rewrite that page's prompt (drop sensitive/violent/photoreal-person content) and retry — don't abandon the whole book.\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.3.22:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"dlazy-picture-book\",\n  \"version\": \"1.3.22\",\n  \"publishedAt\": 1790731180049\n}\n\nFile v1.3.22:skill-card.md\n\n## Description:\n\nCreates a paged picture book from a theme, with a narrated story, consistent illustrations, background music, and a portable HTML reading experience.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dlazyai](https://clawhub.ai/user/dlazyai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nReaders, educators, and creators use this skill to turn a story idea into an illustrated children's book with optional background music and a browsable HTML edition.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The third-party CLI sends prompts and reference images to dLazy services and requires an API key.\n\nMitigation: Review the CLI package before installation, use only images you are comfortable uploading, and use DLAZY_API_KEY for temporary access instead of saving a key.\n\nRisk: Generated book files can overwrite existing files in the chosen output location.\n\nMitigation: Run the workflow in a dedicated output folder.\n\n## Reference(s):\n\n- [dLazy CLI repository (linked in package metadata; skill import provenance unavailable)](https://github.com/dlazy-ai/cli)\n- [dLazy CLI npm package](https://www.npmjs.com/package/@dlazy/cli)\n- [dLazy website](https://dlazy.com)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Code, Shell commands, Files]\n\n**Output Format:** [Paged story text and a portable HTML book with JSON content, PNG illustrations, and MP3 music]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Defaults to 10 pages; local media files are referenced by relative paths.]\n\n## Skill Version(s):\n\n1.3.22 (source: ClawHub release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.3.22:SKILL-cn.md\n\n---\nname: dlazy-picture-book\nversion: 1.3.5\ndescription: \"绘本生成、儿童绘本、图画书、睡前故事书、picture book、storybook——根据一个主题创作完整绘本：编写分页故事、用 dlazy gpt-image-2 逐页生成风格统一的插图、用 dlazy elevenlabs-music 生成匹配基调的背景音乐，最后组装成一个左图右文、可翻页、带背景音乐的独立 HTML 绘本。默认 10 页。当用户想做绘本 / 图画书 / 儿童故事书 / 睡前故事，或说“帮我做一本关于……的绘本”时使用。\"\nmetadata:\n  {\n    'clawdbot':\n      {\n        'emoji': '📖',\n        'requires': { 'bins': ['npm', 'npx', 'python3', 'curl'] },\n        'install': 'npm install -g @dlazy/cli@1.2.3',\n        'installAlternative': 'npx @dlazy/cli@1.2.3',\n        'homepage': 'https://github.com/dlazy-ai/cli',\n        'source': 'https://github.com/dlazy-ai/cli',\n        'author': 'dlazyai',\n        'license': 'see-repo',\n        'npm': 'https://www.npmjs.com/package/@dlazy/cli',\n        'configLocation': '~/.dlazy/config.json',\n        'apiEndpoints': ['api.dlazy.com', 'files.dlazy.com'],\n      },\n    'openclaw':\n      {\n        'systemPrompt': '当你需要制作绘本时，请严格遵循此技能的工作流：先确认主题与分页故事，再用 dlazy gpt-image-2 逐页生成插图（首页确立角色与画风，后续页用首页作参考图保持一致），用 dlazy elevenlabs-music 生成背景音乐，最后用本技能自带的 scripts/build_book.py 把 book.json 组装成 index.html。注意：Windows PowerShell 中不允许用 `&` 或 `&&` 串联命令，请逐条同步执行；不要一次性批量生成所有图片。',\n      },\n  }\n---\n\n# 绘本生成 Picture Book\n\n[English](./SKILL.md) · [中文](./SKILL-cn.md)\n\n绘本生成、儿童绘本、图画书、睡前故事书、picture book、storybook——根据一个主题创作完整绘本：编写分页故事、用 dlazy gpt-image-2 逐页生成风格统一的插图、用 dlazy elevenlabs-music 生成匹配的背景音乐，最后组装成一个**左图右文、可翻页、带背景音乐的独立 HTML 绘本**。默认 10 页。\n\n## 触发关键词\n\n- 绘本 / 绘本生成\n- 儿童绘本 / 图画书\n- 睡前故事 / 故事书\n- picture book / storybook\n- 帮我做一本关于……的绘本\n\n## 身份验证 (Authentication)\n\n所有 dlazy 请求都需要 dLazy API key。**推荐使用** `dlazy login` 完成登录：\n\n```bash\ndlazy login\n```\n\n该命令使用设备码流程（远程终端也可用），登录成功后 **自动把 API key 写入本地 CLI 配置**，无需手动复制粘贴。\n\n### 备选：手动设置 API Key\n\n如果你已有 API key，也可以直接保存：\n\n```bash\ndlazy auth set YOUR_API_KEY\n```\n\nCLI 会把 key 保存在你的用户配置目录（macOS/Linux 上为 `~/.dlazy/config.json`，Windows 上为 `%USERPROFILE%\\.dlazy\\config.json`），文件权限仅限当前操作系统用户访问。你也可以用 `DLAZY_API_KEY` 环境变量按次传入。\n\n### 手动获取 API Key\n\n1. 登录或在 [dlazy.com](https://dlazy.com) 创建账号\n2. 访问 [dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key)\n3. 复制 API Key 区域显示的密钥\n\n每个 key 都属于你自己的 dLazy 组织，可在同一控制面板**随时轮换或吊销**。\n\n## 关于与来源 (Provenance)\n\n- **CLI 源代码**: [github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli)\n- **维护者**: dlazyai\n- **npm 包名**: `@dlazy/cli`\n- **官网**: [dlazy.com](https://dlazy.com)\n\n如果你不希望在系统上长期保留一个全局 CLI，可以按需运行：\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>\n```\n\n安装前建议先到 GitHub 仓库审阅源码。\n\n## 工作原理 (How It Works)\n\n绘本的**插图**由 `dlazy gpt-image-2` 生成、**背景音乐**由 `dlazy elevenlabs-music` 生成，二者都是 dLazy 托管 API 的轻量封装：\n\n- 你提供的提示词与参数会发送到 dLazy API（`api.dlazy.com`）进行推理。\n- 传入的本地参考图会先上传到 dLazy 媒体存储（`files.dlazy.com`），生成结果 URL 也由 `files.dlazy.com` 托管。\n\n**故事文本、分页编排、HTML 组装**都在本地完成——由你（Agent）编写故事、调用本技能自带的 `scripts/build_book.py` 把内容注入 `assets/template.html` 模版，产出一个自包含的 HTML。这是标准的 SaaS 调用模式，技能本身不越权访问网络或文件系统。\n\n---\n\n## 成品长什么样\n\n一个可以直接双击打开的文件夹，`index.html` 就是绘本：\n\n```\n<绘本标题>/\n├── index.html        ← 最终绘本（左图右文、翻页、背景音乐）\n├── book.json         ← 内容数据（标题、每页图文、音乐）\n├── images/           ← cover.png, page-01.png … page-10.png\n└── music/            ← bgm.mp3\n```\n\n阅读体验：**封面**（大图 + 标题 + “开始阅读”）→ **内页**（左边 3:4 插图，右边故事文字，可用方向键 / 点击左右 / 底部圆点翻页）→ **尾页**。右上角有背景音乐开关。手机上自动变为上图下文。\n\n图片与音乐都用**相对路径**引用，所以整个文件夹拷走即可分享，无需联网。\n\n---\n\n## 工作流\n\n绘本是「故事 + 画面 + 声音」的整体，质量取决于三者是否协调。按下面的顺序做，每一步都为下一步打好基础。\n\n### 第 0 步：确认创作简报\n\n动手前先和用户对齐这几件事（用户没说的，用合理默认值并说明，不要追问到底）：\n\n- **主题 / 故事内核**：讲什么？想传递什么（勇气、分享、友谊…）？\n- **页数**：默认 **10 页**，用户可指定。\n- **受众年龄**：默认 3–6 岁。决定文字难度与句子长度。\n- **画风**：默认温暖治愈的水彩儿童绘本风。也可以是扁平插画、蜡笔、3D 皮克斯风等。\n- **主角**：外形要具体（如“一只戴红围巾的小狐狸”），因为它要在每一页保持一致。\n\n### 第 1 步：编写分页故事，落到 book.json\n\n先把**整本书的文字**写完，再去生成图。这样画面才有统一的叙事线索。\n\n- 一个完整的故事弧：**开场（介绍主角与世界）→ 出发 / 愿望 → 遇到困难 → 转折 → 温暖的结局**。10 页就按这个节奏铺开。\n- 每页 **1–3 句**，口语化、有画面感，适合朗读。低龄段句子更短。\n- 同时为每页想好**画面描述**（这一页画什么），下一步生成插图要用。\n\n把结果先写成 `book.json`（图片 / 音乐路径先占位，生成后已经是对的路径）：\n\n```json\n{\n  \"title\": \"小狐狸的星星灯\",\n  \"subtitle\": \"一个关于分享的温暖故事\",\n  \"cover_image\": \"images/cover.png\",\n  \"music\": \"music/bgm.mp3\",\n  \"pages\": [\n    { \"image\": \"images/page-01.png\", \"text\": \"森林深处住着一只戴红围巾的小狐狸……\" },\n    { \"image\": \"images/page-02.png\", \"text\": \"……\" }\n  ]\n}\n```\n\n### 第 2 步：逐页生成插图（保持角色与画风一致）\n\n一致性是绘本最容易翻车的地方——同一只小狐狸不能每页长得都不一样。做法是**用首页当“风格锚点”**：\n\n1. **先生成第 1 页**，提示词里把角色外形、画风、色调、构图都写足、写细。这张确立整本书的视觉基调。\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --prompt \"儿童绘本插画，温暖水彩风格，3:4 竖构图。一只戴红色围巾的橙色小狐狸趴在窗台上望着窗外圆圆的月亮，夜晚，柔和的暖色灯光，治愈童真的氛围，画面留白干净。\"\n   ```\n\n2. **后续每一页都把第 1 页作为参考图**传给 `--images`，让主角和画风延续，只改场景：\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --images images/page-01.png \\\n     --prompt \"同一只戴红围巾的橙色小狐狸，同样的水彩绘本画风与色调。这一页：小狐狸背起小背包，踏着月光走进森林。3:4 竖构图。\"\n   ```\n\n3. 命令返回后，结果 URL 在 `result.outputs[0].url`。**用 curl 下载到 `images/`**：\n\n   ```bash\n   curl -L -o images/page-01.png \"<返回的 url>\"\n   ```\n\n关于参数：`--quality low` 是低质量（快、省积分，绘本小图足够）；`--size 1024x1536` 是最接近 3:4 的小竖图（gpt-image-2 没有精确的 3:4 档，模版会按 3:4 裁切，视觉上正好）。\n\n**封面**同理：用第 1 页作参考图，生成一张更有氛围感的主视觉存到 `images/cover.png`。\n\n> **执行纪律（重要）**：一次只跑一个生成命令，等它返回、下载好，再跑下一个——不要一次性把 10 张图的命令一股脑并发或用 `&`/`&&` 串起来。这既是因为要拿上一张的结果当参考图，也因为在 Windows PowerShell 下 `&`/`&&` 会报错。\n\n### 第 3 步：生成背景音乐\n\n根据故事基调写一句音乐提示词，时长给足以覆盖阅读（睡前故事 60–90 秒即可，循环播放）：\n\n```bash\ndlazy elevenlabs-music --duration 75 \\\n  --prompt \"温柔舒缓的儿童睡前音乐，轻柔的钢琴与八音盒，梦幻温暖，适合绘本朗读的背景，无人声。\"\n```\n\n返回后同样 `curl` 下载到 `music/bgm.mp3`。\n\n### 第 4 步：组装成 HTML\n\n确认 `book.json` 里的路径和实际下载的文件对得上，然后运行本技能自带的构建脚本：\n\n```bash\npython3 <本技能目录>/scripts/build_book.py book.json -o index.html\n```\n\n脚本会把 `book.json` 注入 `assets/template.html`，生成自包含的 `index.html`。把 `index.html` 和 `images/`、`music/` 放在同一文件夹即可。\n\n### 第 5 步：交付\n\n告诉用户成品文件夹路径，说明双击 `index.html` 就能翻阅、右上角可开关背景音乐。附上封面图 URL 让用户先睹为快。\n\n---\n\n## 命令速查\n\n**插图 · gpt-image-2**（完整帮助：`dlazy gpt-image-2 -h`）\n\n| 参数 | 绘本用法 |\n| --- | --- |\n| `--prompt` | 画面描述（角色 + 场景 + 画风 + “3:4 竖构图”） |\n| `--images` | 参考图（首页图路径），用于保持角色/画风一致，最多 5 张 |\n| `--quality` | `low`（绘本小图够用，快且省积分） |\n| `--size` | `1024x1536`（最接近 3:4 的小竖图） |\n\n**背景音乐 · elevenlabs-music**（完整帮助：`dlazy elevenlabs-music -h`）\n\n| 参数 | 绘本用法 |\n| --- | --- |\n| `--prompt` | 音乐氛围描述（乐器、情绪、“无人声”、适合朗读） |\n| `--duration` | 时长（秒），睡前故事 60–90 即可，循环播放 |\n\n生成结果统一在 `result.outputs[0].url`，用 `curl -L -o <本地路径> \"<url>\"` 下载。\n\n## 错误处理\n\n| Code | 错误类型                         | 示例信息                                                                                             |\n| ---- | -------------------------------- | ---------------------------------------------------------------------------------------------------- |\n| 401  | 未授权 (API Key缺失或无效)       | `ok: false, code: \"unauthorized\", message: \"API key is missing or invalid\"`                          |\n| 501  | 缺少必填参数                     | `error: required option '--prompt <prompt>' not specified`                                            |\n| 502  | 本地文件读取失败                 | `Error: Image file not found: C:\\path\\to\\your\\file`                                                  |\n| 503  | API 请求失败（余额不足）         | `ok: false, code: \"insufficient_balance\"`                                                            |\n| 503  | API 请求失败（服务端错误）       | `HTTP status code error (500 server crash)`                                                          |\n| 504  | 异步任务执行失败                 | `=== Generation Failed ===` / `{后端返回的具体失败原因，如提示词违反安全策略}`                        |\n\n> **智能体关键指令**:\n> 1. 如果返回 `code: \"insufficient_balance\"`（余额不足），必须明确告知用户积分不足，并引导前往充值：[https://dlazy.com/dashboard/organization/settings?tab=credits](https://dlazy.com/dashboard/organization/settings?tab=credits)\n> 2. 如果返回 `code: \"unauthorized\"` 或提示缺少 API Key，必须告知用户前往 [https://dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key) 获取 API Key 并用 `dlazy auth set <key>` 保存，然后继续任务。\n> 3. 若某张图违反安全策略被拒，改写该页提示词（去掉敏感/暴力/写实人物等描述）后重试，不要中断整本书。\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nArchive v1.3.21: 6 files, 19130 bytes\n\nFiles: assets/template.html (14664b), scripts/build_book.py (2477b), skill-card.md (1978b), SKILL-cn.md (12769b), SKILL.md (13311b), _meta.json (138b)\n\nFile v1.3.21:SKILL.md\n\n---\nname: dlazy-picture-book\nversion: 1.3.5\ndescription: \"picture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a self-contained HTML book with image-left / text-right spreads, page turning, and background music. Defaults to 10 pages. Use when the user wants a picture book / storybook / children's book / bedtime story, or says 'make me a picture book about ...'.\"\nmetadata:\n  {\n    'clawdbot':\n      {\n        'emoji': '📖',\n        'requires': { 'bins': ['npm', 'npx', 'python3', 'curl'] },\n        'install': 'npm install -g @dlazy/cli@1.2.3',\n        'installAlternative': 'npx @dlazy/cli@1.2.3',\n        'homepage': 'https://github.com/dlazy-ai/cli',\n        'source': 'https://github.com/dlazy-ai/cli',\n        'author': 'dlazyai',\n        'license': 'see-repo',\n        'npm': 'https://www.npmjs.com/package/@dlazy/cli',\n        'configLocation': '~/.dlazy/config.json',\n        'apiEndpoints': ['api.dlazy.com', 'files.dlazy.com'],\n      },\n    'openclaw':\n      {\n        'systemPrompt': \"When making a picture book, follow this skill's workflow strictly: first confirm the theme and paged story, then generate illustrations page by page with dlazy gpt-image-2 (the first page establishes the character and art style; later pages pass the first page as a reference image via --images to stay consistent), generate background music with dlazy elevenlabs-music, and finally assemble book.json into index.html with this skill's scripts/build_book.py. Note: Windows PowerShell forbids `&` / `&&` to chain commands — run them one at a time; never batch-generate all images at once.\",\n      },\n  }\n---\n\n# 绘本生成 Picture Book\n\n[English](./SKILL.md) · [中文](./SKILL-cn.md)\n\npicture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a **self-contained HTML book with image-left / text-right spreads, page turning, and background music**. Defaults to 10 pages.\n\n## Trigger Keywords\n\n- picture book / storybook\n- children's book / illustrated story\n- bedtime story / story book\n- 绘本 / 图画书\n- make me a picture book about ...\n\n## Authentication\n\nAll dlazy requests require a dLazy API key. The recommended way to authenticate is:\n\n```bash\ndlazy login\n```\n\nThis runs a device-code flow (also works in remote shells) and **automatically saves your API key** to the local CLI config — no manual copy/paste required.\n\n### Alternative: Set the Key Manually\n\n```bash\ndlazy auth set YOUR_API_KEY\n```\n\nThe CLI saves the key in your user config directory (`~/.dlazy/config.json` on macOS/Linux, `%USERPROFILE%\\.dlazy\\config.json` on Windows), with file permissions restricted to your OS user account. You can also supply the key per-invocation via the `DLAZY_API_KEY` environment variable.\n\n### Getting Your API Key Manually\n\n1. Sign in or create an account at [dlazy.com](https://dlazy.com)\n2. Go to [dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key)\n3. Copy the key shown in the API Key section\n\nEach key is scoped to your dLazy organization and can be **rotated or revoked at any time** from the same dashboard.\n\n## About & Provenance\n\n- **CLI source code**: [github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli)\n- **Maintainer**: dlazyai\n- **npm package**: `@dlazy/cli`\n- **Homepage**: [dlazy.com](https://dlazy.com)\n\nRun on demand without a global install:\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>\n```\n\nReview the GitHub source before installing.\n\n## How It Works\n\nIllustrations are generated by `dlazy gpt-image-2` and background music by `dlazy elevenlabs-music`; both are thin clients over the dLazy hosted API:\n\n- Prompts and parameters are sent to the dLazy API (`api.dlazy.com`) for inference.\n- Local reference images are uploaded to dLazy media storage (`files.dlazy.com`); result URLs are also hosted there.\n\nThe **story text, page composition, and HTML assembly** happen locally — you (the agent) write the story and call this skill's `scripts/build_book.py` to inject the content into `assets/template.html`, producing a self-contained HTML. Standard SaaS pattern; the skill does not access network or filesystem beyond what the dLazy CLI handles.\n\n---\n\n## What the output looks like\n\nA folder you can open directly; `index.html` is the book:\n\n```\n<book-title>/\n├── index.html        ← the finished book (image-left/text-right, page turning, BGM)\n├── book.json         ← content data (title, per-page image+text, music)\n├── images/           ← cover.png, page-01.png … page-10.png\n└── music/            ← bgm.mp3\n```\n\nReading experience: **cover** (large image + title + \"Start reading\") → **spreads** (illustration on the left in 3:4, story text on the right; turn pages with arrow keys / click left-right / bottom dots) → **end page**. A background-music toggle sits top-right. On mobile it becomes image-top / text-bottom.\n\nImages and music are referenced by **relative paths**, so the whole folder is portable and works offline.\n\n---\n\n## Workflow\n\nA picture book is story + image + sound as one whole; quality comes from keeping the three coordinated. Do the steps in order — each sets up the next.\n\n### Step 0: Confirm the brief\n\nBefore starting, align on these (fill sensible defaults for anything unstated and say so — don't interrogate the user):\n\n- **Theme / core**: what's the story, what does it convey (courage, sharing, friendship…)?\n- **Page count**: defaults to **10**; the user may specify otherwise.\n- **Audience age**: defaults to 3–6. Drives text difficulty and sentence length.\n- **Art style**: defaults to warm, healing watercolor children's-book style. Could also be flat illustration, crayon, Pixar-style 3D, etc.\n- **Protagonist**: give it a concrete look (e.g. \"a little fox in a red scarf\") — it must stay consistent on every page.\n\n### Step 1: Write the paged story into book.json\n\nWrite the **whole book's text first**, then generate images, so the visuals follow one narrative thread.\n\n- A full arc: **opening (introduce hero + world) → setting out / a wish → a problem → a turn → a warm ending.** Spread this across the 10 pages.\n- **1–3 sentences per page**, spoken and vivid, good to read aloud. Shorter for younger readers.\n- Also note a **visual description** for each page (what to draw) — you'll need it next.\n\nWrite `book.json` first (image/music paths as placeholders that will already be correct once generated):\n\n```json\n{\n  \"title\": \"The Little Fox's Star Lantern\",\n  \"subtitle\": \"A warm story about sharing\",\n  \"cover_image\": \"images/cover.png\",\n  \"music\": \"music/bgm.mp3\",\n  \"pages\": [\n    { \"image\": \"images/page-01.png\", \"text\": \"Deep in the forest lived a little fox in a red scarf…\" },\n    { \"image\": \"images/page-02.png\", \"text\": \"…\" }\n  ]\n}\n```\n\n### Step 2: Generate illustrations page by page (keep character + style consistent)\n\nConsistency is where picture books fail — the same fox can't look different on every page. Use the **first page as a style anchor**:\n\n1. **Generate page 1 first**, writing the character look, art style, palette, and composition in full detail. This sets the visual baseline for the whole book.\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --prompt \"Children's book illustration, warm watercolor style, 3:4 portrait. An orange little fox in a red scarf lies on a windowsill gazing at the round moon outside, nighttime, soft warm lamplight, healing childlike mood, clean negative space.\"\n   ```\n\n2. **Pass page 1 as the reference image** via `--images` on every later page so the hero and style carry over; only the scene changes:\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --images images/page-01.png \\\n     --prompt \"Same orange fox in a red scarf, same watercolor style and palette. This page: the fox shoulders a small backpack and walks into the forest under the moonlight. 3:4 portrait.\"\n   ```\n\n3. The result URL is at `result.outputs[0].url`. **Download it into `images/` with curl:**\n\n   ```bash\n   curl -L -o images/page-01.png \"<returned url>\"\n   ```\n\nOn parameters: `--quality low` is low quality (fast, cheap, plenty for small book art); `--size 1024x1536` is the closest small portrait to 3:4 (gpt-image-2 has no exact 3:4 tier; the template crops to 3:4 so it looks right).\n\n**Cover**: same idea — use page 1 as reference to generate a more atmospheric hero image into `images/cover.png`.\n\n> **Execution discipline (important)**: run one generation command at a time — wait for it to return and download before the next — don't fire all 10 image commands at once or chain them with `&`/`&&`. This is both because later pages need the previous image as a reference and because `&`/`&&` error out under Windows PowerShell.\n\n### Step 3: Generate background music\n\nWrite one music prompt from the story's mood; give it enough length to cover a read-through (60–90s for a bedtime story is fine, it loops):\n\n```bash\ndlazy elevenlabs-music --duration 75 \\\n  --prompt \"Gentle, soothing children's bedtime music, soft piano and music box, dreamy and warm, a background for reading a picture book aloud, no vocals.\"\n```\n\nDownload the result into `music/bgm.mp3` with `curl` the same way.\n\n### Step 4: Assemble the HTML\n\nMake sure the paths in `book.json` match the files you actually downloaded, then run this skill's build script:\n\n```bash\npython3 <this-skill-dir>/scripts/build_book.py book.json -o index.html\n```\n\nIt injects `book.json` into `assets/template.html` to produce a self-contained `index.html`. Keep `index.html` next to `images/` and `music/`.\n\n### Step 5: Deliver\n\nTell the user the output folder path, that double-clicking `index.html` opens the book, and that the top-right button toggles the music. Share the cover image URL for a quick preview.\n\n---\n\n## Command cheatsheet\n\n**Illustration · gpt-image-2** (full help: `dlazy gpt-image-2 -h`)\n\n| Flag | Picture-book usage |\n| --- | --- |\n| `--prompt` | Scene description (character + scene + style + \"3:4 portrait\") |\n| `--images` | Reference image (page-1 path) to keep character/style consistent, up to 5 |\n| `--quality` | `low` (small book art, fast and cheap) |\n| `--size` | `1024x1536` (closest small portrait to 3:4) |\n\n**Background music · elevenlabs-music** (full help: `dlazy elevenlabs-music -h`)\n\n| Flag | Picture-book usage |\n| --- | --- |\n| `--prompt` | Mood description (instruments, emotion, \"no vocals\", good for reading aloud) |\n| `--duration` | Seconds; 60–90 is fine for a bedtime story, it loops |\n\nResults are always at `result.outputs[0].url`; download with `curl -L -o <local path> \"<url>\"`.\n\n## Error Handling\n\n| Code | Error Type                         | Example Message                                                                                                          |\n| ---- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |\n| 401  | Unauthorized (No API Key)          | `ok: false, code: \"unauthorized\", message: \"API key is missing or invalid\"`                                              |\n| 501  | Missing required parameter         | `error: required option '--prompt <prompt>' not specified`                                                               |\n| 502  | Local file read error              | `Error: Image file not found: C:\\path\\to\\your\\file`                                                                      |\n| 503  | API request failed (no balance)    | `ok: false, code: \"insufficient_balance\"`                                                                                |\n| 503  | API request failed (server error)  | `HTTP status code error (500 server crash)`                                                                              |\n| 504  | Asynchronous task execution failed | `=== Generation Failed ===` / `{Specific error reason returned by backend, e.g. \"Prompt violates safety policy\"}`        |\n\n> **AGENT CRITICAL INSTRUCTION**:\n>\n> 1. If the result returns `code: \"insufficient_balance\"`, you MUST explicitly tell the user their credits are insufficient and guide them to recharge: [https://dlazy.com/dashboard/organization/settings?tab=credits](https://dlazy.com/dashboard/organization/settings?tab=credits)\n> 2. If the result returns `code: \"unauthorized\"` or indicates a missing API key, you MUST tell the user to get their API key from [https://dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key) and save it with `dlazy auth set <key>`, then resume.\n> 3. If one image is rejected for violating the safety policy, rewrite that page's prompt (drop sensitive/violent/photoreal-person content) and retry — don't abandon the whole book.\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.3.21:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"dlazy-picture-book\",\n  \"version\": \"1.3.21\",\n  \"publishedAt\": 1790561846772\n}\n\nFile v1.3.21:skill-card.md\n\n## Description:\n\nCreates illustrated picture books from a theme by writing a paged story, generating coordinated illustrations and background music through dLazy, and assembling an HTML reading experience.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dlazyai](https://clawhub.ai/user/dlazyai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nCreators, educators, and families use this skill to turn a theme into a paged children's story with consistent illustrations, background music, and a locally viewable picture book.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Story prompts and reference images are sent to a third-party service.\n\nMitigation: Confirm before sending content and avoid sharing sensitive prompts or images.\n\nRisk: A dLazy API key is required and may be stored locally.\n\nMitigation: Protect the key, and prefer DLAZY_API_KEY on shared machines.\n\nRisk: Image and music generation may consume account credits.\n\nMitigation: Confirm the planned generation scope with the user before running it.\n\n## Reference(s):\n\n- [Picture Book skill on ClawHub](https://clawhub.ai/dlazyai/skills/dlazy-picture-book)\n- [dLazy CLI source](https://github.com/dlazy-ai/cli)\n- [dLazy CLI npm package](https://www.npmjs.com/package/@dlazy/cli)\n- [dLazy service](https://dlazy.com)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Shell commands, Files]\n\n**Output Format:** [JSON story data, HTML, PNG illustrations, and MP3 audio]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Defaults to 10 pages; the HTML references local images and music by relative path.]\n\n## Skill Version(s):\n\n1.3.21 (source: ClawHub release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.3.21:SKILL-cn.md\n\n---\nname: dlazy-picture-book\nversion: 1.3.5\ndescription: \"绘本生成、儿童绘本、图画书、睡前故事书、picture book、storybook——根据一个主题创作完整绘本：编写分页故事、用 dlazy gpt-image-2 逐页生成风格统一的插图、用 dlazy elevenlabs-music 生成匹配基调的背景音乐，最后组装成一个左图右文、可翻页、带背景音乐的独立 HTML 绘本。默认 10 页。当用户想做绘本 / 图画书 / 儿童故事书 / 睡前故事，或说“帮我做一本关于……的绘本”时使用。\"\nmetadata:\n  {\n    'clawdbot':\n      {\n        'emoji': '📖',\n        'requires': { 'bins': ['npm', 'npx', 'python3', 'curl'] },\n        'install': 'npm install -g @dlazy/cli@1.2.3',\n        'installAlternative': 'npx @dlazy/cli@1.2.3',\n        'homepage': 'https://github.com/dlazy-ai/cli',\n        'source': 'https://github.com/dlazy-ai/cli',\n        'author': 'dlazyai',\n        'license': 'see-repo',\n        'npm': 'https://www.npmjs.com/package/@dlazy/cli',\n        'configLocation': '~/.dlazy/config.json',\n        'apiEndpoints': ['api.dlazy.com', 'files.dlazy.com'],\n      },\n    'openclaw':\n      {\n        'systemPrompt': '当你需要制作绘本时，请严格遵循此技能的工作流：先确认主题与分页故事，再用 dlazy gpt-image-2 逐页生成插图（首页确立角色与画风，后续页用首页作参考图保持一致），用 dlazy elevenlabs-music 生成背景音乐，最后用本技能自带的 scripts/build_book.py 把 book.json 组装成 index.html。注意：Windows PowerShell 中不允许用 `&` 或 `&&` 串联命令，请逐条同步执行；不要一次性批量生成所有图片。',\n      },\n  }\n---\n\n# 绘本生成 Picture Book\n\n[English](./SKILL.md) · [中文](./SKILL-cn.md)\n\n绘本生成、儿童绘本、图画书、睡前故事书、picture book、storybook——根据一个主题创作完整绘本：编写分页故事、用 dlazy gpt-image-2 逐页生成风格统一的插图、用 dlazy elevenlabs-music 生成匹配的背景音乐，最后组装成一个**左图右文、可翻页、带背景音乐的独立 HTML 绘本**。默认 10 页。\n\n## 触发关键词\n\n- 绘本 / 绘本生成\n- 儿童绘本 / 图画书\n- 睡前故事 / 故事书\n- picture book / storybook\n- 帮我做一本关于……的绘本\n\n## 身份验证 (Authentication)\n\n所有 dlazy 请求都需要 dLazy API key。**推荐使用** `dlazy login` 完成登录：\n\n```bash\ndlazy login\n```\n\n该命令使用设备码流程（远程终端也可用），登录成功后 **自动把 API key 写入本地 CLI 配置**，无需手动复制粘贴。\n\n### 备选：手动设置 API Key\n\n如果你已有 API key，也可以直接保存：\n\n```bash\ndlazy auth set YOUR_API_KEY\n```\n\nCLI 会把 key 保存在你的用户配置目录（macOS/Linux 上为 `~/.dlazy/config.json`，Windows 上为 `%USERPROFILE%\\.dlazy\\config.json`），文件权限仅限当前操作系统用户访问。你也可以用 `DLAZY_API_KEY` 环境变量按次传入。\n\n### 手动获取 API Key\n\n1. 登录或在 [dlazy.com](https://dlazy.com) 创建账号\n2. 访问 [dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key)\n3. 复制 API Key 区域显示的密钥\n\n每个 key 都属于你自己的 dLazy 组织，可在同一控制面板**随时轮换或吊销**。\n\n## 关于与来源 (Provenance)\n\n- **CLI 源代码**: [github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli)\n- **维护者**: dlazyai\n- **npm 包名**: `@dlazy/cli`\n- **官网**: [dlazy.com](https://dlazy.com)\n\n如果你不希望在系统上长期保留一个全局 CLI，可以按需运行：\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>\n```\n\n安装前建议先到 GitHub 仓库审阅源码。\n\n## 工作原理 (How It Works)\n\n绘本的**插图**由 `dlazy gpt-image-2` 生成、**背景音乐**由 `dlazy elevenlabs-music` 生成，二者都是 dLazy 托管 API 的轻量封装：\n\n- 你提供的提示词与参数会发送到 dLazy API（`api.dlazy.com`）进行推理。\n- 传入的本地参考图会先上传到 dLazy 媒体存储（`files.dlazy.com`），生成结果 URL 也由 `files.dlazy.com` 托管。\n\n**故事文本、分页编排、HTML 组装**都在本地完成——由你（Agent）编写故事、调用本技能自带的 `scripts/build_book.py` 把内容注入 `assets/template.html` 模版，产出一个自包含的 HTML。这是标准的 SaaS 调用模式，技能本身不越权访问网络或文件系统。\n\n---\n\n## 成品长什么样\n\n一个可以直接双击打开的文件夹，`index.html` 就是绘本：\n\n```\n<绘本标题>/\n├── index.html        ← 最终绘本（左图右文、翻页、背景音乐）\n├── book.json         ← 内容数据（标题、每页图文、音乐）\n├── images/           ← cover.png, page-01.png … page-10.png\n└── music/            ← bgm.mp3\n```\n\n阅读体验：**封面**（大图 + 标题 + “开始阅读”）→ **内页**（左边 3:4 插图，右边故事文字，可用方向键 / 点击左右 / 底部圆点翻页）→ **尾页**。右上角有背景音乐开关。手机上自动变为上图下文。\n\n图片与音乐都用**相对路径**引用，所以整个文件夹拷走即可分享，无需联网。\n\n---\n\n## 工作流\n\n绘本是「故事 + 画面 + 声音」的整体，质量取决于三者是否协调。按下面的顺序做，每一步都为下一步打好基础。\n\n### 第 0 步：确认创作简报\n\n动手前先和用户对齐这几件事（用户没说的，用合理默认值并说明，不要追问到底）：\n\n- **主题 / 故事内核**：讲什么？想传递什么（勇气、分享、友谊…）？\n- **页数**：默认 **10 页**，用户可指定。\n- **受众年龄**：默认 3–6 岁。决定文字难度与句子长度。\n- **画风**：默认温暖治愈的水彩儿童绘本风。也可以是扁平插画、蜡笔、3D 皮克斯风等。\n- **主角**：外形要具体（如“一只戴红围巾的小狐狸”），因为它要在每一页保持一致。\n\n### 第 1 步：编写分页故事，落到 book.json\n\n先把**整本书的文字**写完，再去生成图。这样画面才有统一的叙事线索。\n\n- 一个完整的故事弧：**开场（介绍主角与世界）→ 出发 / 愿望 → 遇到困难 → 转折 → 温暖的结局**。10 页就按这个节奏铺开。\n- 每页 **1–3 句**，口语化、有画面感，适合朗读。低龄段句子更短。\n- 同时为每页想好**画面描述**（这一页画什么），下一步生成插图要用。\n\n把结果先写成 `book.json`（图片 / 音乐路径先占位，生成后已经是对的路径）：\n\n```json\n{\n  \"title\": \"小狐狸的星星灯\",\n  \"subtitle\": \"一个关于分享的温暖故事\",\n  \"cover_image\": \"images/cover.png\",\n  \"music\": \"music/bgm.mp3\",\n  \"pages\": [\n    { \"image\": \"images/page-01.png\", \"text\": \"森林深处住着一只戴红围巾的小狐狸……\" },\n    { \"image\": \"images/page-02.png\", \"text\": \"……\" }\n  ]\n}\n```\n\n### 第 2 步：逐页生成插图（保持角色与画风一致）\n\n一致性是绘本最容易翻车的地方——同一只小狐狸不能每页长得都不一样。做法是**用首页当“风格锚点”**：\n\n1. **先生成第 1 页**，提示词里把角色外形、画风、色调、构图都写足、写细。这张确立整本书的视觉基调。\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --prompt \"儿童绘本插画，温暖水彩风格，3:4 竖构图。一只戴红色围巾的橙色小狐狸趴在窗台上望着窗外圆圆的月亮，夜晚，柔和的暖色灯光，治愈童真的氛围，画面留白干净。\"\n   ```\n\n2. **后续每一页都把第 1 页作为参考图**传给 `--images`，让主角和画风延续，只改场景：\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --images images/page-01.png \\\n     --prompt \"同一只戴红围巾的橙色小狐狸，同样的水彩绘本画风与色调。这一页：小狐狸背起小背包，踏着月光走进森林。3:4 竖构图。\"\n   ```\n\n3. 命令返回后，结果 URL 在 `result.outputs[0].url`。**用 curl 下载到 `images/`**：\n\n   ```bash\n   curl -L -o images/page-01.png \"<返回的 url>\"\n   ```\n\n关于参数：`--quality low` 是低质量（快、省积分，绘本小图足够）；`--size 1024x1536` 是最接近 3:4 的小竖图（gpt-image-2 没有精确的 3:4 档，模版会按 3:4 裁切，视觉上正好）。\n\n**封面**同理：用第 1 页作参考图，生成一张更有氛围感的主视觉存到 `images/cover.png`。\n\n> **执行纪律（重要）**：一次只跑一个生成命令，等它返回、下载好，再跑下一个——不要一次性把 10 张图的命令一股脑并发或用 `&`/`&&` 串起来。这既是因为要拿上一张的结果当参考图，也因为在 Windows PowerShell 下 `&`/`&&` 会报错。\n\n### 第 3 步：生成背景音乐\n\n根据故事基调写一句音乐提示词，时长给足以覆盖阅读（睡前故事 60–90 秒即可，循环播放）：\n\n```bash\ndlazy elevenlabs-music --duration 75 \\\n  --prompt \"温柔舒缓的儿童睡前音乐，轻柔的钢琴与八音盒，梦幻温暖，适合绘本朗读的背景，无人声。\"\n```\n\n返回后同样 `curl` 下载到 `music/bgm.mp3`。\n\n### 第 4 步：组装成 HTML\n\n确认 `book.json` 里的路径和实际下载的文件对得上，然后运行本技能自带的构建脚本：\n\n```bash\npython3 <本技能目录>/scripts/build_book.py book.json -o index.html\n```\n\n脚本会把 `book.json` 注入 `assets/template.html`，生成自包含的 `index.html`。把 `index.html` 和 `images/`、`music/` 放在同一文件夹即可。\n\n### 第 5 步：交付\n\n告诉用户成品文件夹路径，说明双击 `index.html` 就能翻阅、右上角可开关背景音乐。附上封面图 URL 让用户先睹为快。\n\n---\n\n## 命令速查\n\n**插图 · gpt-image-2**（完整帮助：`dlazy gpt-image-2 -h`）\n\n| 参数 | 绘本用法 |\n| --- | --- |\n| `--prompt` | 画面描述（角色 + 场景 + 画风 + “3:4 竖构图”） |\n| `--images` | 参考图（首页图路径），用于保持角色/画风一致，最多 5 张 |\n| `--quality` | `low`（绘本小图够用，快且省积分） |\n| `--size` | `1024x1536`（最接近 3:4 的小竖图） |\n\n**背景音乐 · elevenlabs-music**（完整帮助：`dlazy elevenlabs-music -h`）\n\n| 参数 | 绘本用法 |\n| --- | --- |\n| `--prompt` | 音乐氛围描述（乐器、情绪、“无人声”、适合朗读） |\n| `--duration` | 时长（秒），睡前故事 60–90 即可，循环播放 |\n\n生成结果统一在 `result.outputs[0].url`，用 `curl -L -o <本地路径> \"<url>\"` 下载。\n\n## 错误处理\n\n| Code | 错误类型                         | 示例信息                                                                                             |\n| ---- | -------------------------------- | ---------------------------------------------------------------------------------------------------- |\n| 401  | 未授权 (API Key缺失或无效)       | `ok: false, code: \"unauthorized\", message: \"API key is missing or invalid\"`                          |\n| 501  | 缺少必填参数                     | `error: required option '--prompt <prompt>' not specified`                                            |\n| 502  | 本地文件读取失败                 | `Error: Image file not found: C:\\path\\to\\your\\file`                                                  |\n| 503  | API 请求失败（余额不足）         | `ok: false, code: \"insufficient_balance\"`                                                            |\n| 503  | API 请求失败（服务端错误）       | `HTTP status code error (500 server crash)`                                                          |\n| 504  | 异步任务执行失败                 | `=== Generation Failed ===` / `{后端返回的具体失败原因，如提示词违反安全策略}`                        |\n\n> **智能体关键指令**:\n> 1. 如果返回 `code: \"insufficient_balance\"`（余额不足），必须明确告知用户积分不足，并引导前往充值：[https://dlazy.com/dashboard/organization/settings?tab=credits](https://dlazy.com/dashboard/organization/settings?tab=credits)\n> 2. 如果返回 `code: \"unauthorized\"` 或提示缺少 API Key，必须告知用户前往 [https://dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key) 获取 API Key 并用 `dlazy auth set <key>` 保存，然后继续任务。\n> 3. 若某张图违反安全策略被拒，改写该页提示词（去掉敏感/暴力/写实人物等描述）后重试，不要中断整本书。\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nArchive v1.3.20: 6 files, 19151 bytes\n\nFiles: assets/template.html (14664b), scripts/build_book.py (2477b), skill-card.md (2003b), SKILL-cn.md (12769b), SKILL.md (13311b), _meta.json (138b)\n\nFile v1.3.20:SKILL.md\n\n---\nname: dlazy-picture-book\nversion: 1.3.5\ndescription: \"picture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a self-contained HTML book with image-left / text-right spreads, page turning, and background music. Defaults to 10 pages. Use when the user wants a picture book / storybook / children's book / bedtime story, or says 'make me a picture book about ...'.\"\nmetadata:\n  {\n    'clawdbot':\n      {\n        'emoji': '📖',\n        'requires': { 'bins': ['npm', 'npx', 'python3', 'curl'] },\n        'install': 'npm install -g @dlazy/cli@1.2.3',\n        'installAlternative': 'npx @dlazy/cli@1.2.3',\n        'homepage': 'https://github.com/dlazy-ai/cli',\n        'source': 'https://github.com/dlazy-ai/cli',\n        'author': 'dlazyai',\n        'license': 'see-repo',\n        'npm': 'https://www.npmjs.com/package/@dlazy/cli',\n        'configLocation': '~/.dlazy/config.json',\n        'apiEndpoints': ['api.dlazy.com', 'files.dlazy.com'],\n      },\n    'openclaw':\n      {\n        'systemPrompt': \"When making a picture book, follow this skill's workflow strictly: first confirm the theme and paged story, then generate illustrations page by page with dlazy gpt-image-2 (the first page establishes the character and art style; later pages pass the first page as a reference image via --images to stay consistent), generate background music with dlazy elevenlabs-music, and finally assemble book.json into index.html with this skill's scripts/build_book.py. Note: Windows PowerShell forbids `&` / `&&` to chain commands — run them one at a time; never batch-generate all images at once.\",\n      },\n  }\n---\n\n# 绘本生成 Picture Book\n\n[English](./SKILL.md) · [中文](./SKILL-cn.md)\n\npicture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a **self-contained HTML book with image-left / text-right spreads, page turning, and background music**. Defaults to 10 pages.\n\n## Trigger Keywords\n\n- picture book / storybook\n- children's book / illustrated story\n- bedtime story / story book\n- 绘本 / 图画书\n- make me a picture book about ...\n\n## Authentication\n\nAll dlazy requests require a dLazy API key. The recommended way to authenticate is:\n\n```bash\ndlazy login\n```\n\nThis runs a device-code flow (also works in remote shells) and **automatically saves your API key** to the local CLI config — no manual copy/paste required.\n\n### Alternative: Set the Key Manually\n\n```bash\ndlazy auth set YOUR_API_KEY\n```\n\nThe CLI saves the key in your user config directory (`~/.dlazy/config.json` on macOS/Linux, `%USERPROFILE%\\.dlazy\\config.json` on Windows), with file permissions restricted to your OS user account. You can also supply the key per-invocation via the `DLAZY_API_KEY` environment variable.\n\n### Getting Your API Key Manually\n\n1. Sign in or create an account at [dlazy.com](https://dlazy.com)\n2. Go to [dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key)\n3. Copy the key shown in the API Key section\n\nEach key is scoped to your dLazy organization and can be **rotated or revoked at any time** from the same dashboard.\n\n## About & Provenance\n\n- **CLI source code**: [github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli)\n- **Maintainer**: dlazyai\n- **npm package**: `@dlazy/cli`\n- **Homepage**: [dlazy.com](https://dlazy.com)\n\nRun on demand without a global install:\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>\n```\n\nReview the GitHub source before installing.\n\n## How It Works\n\nIllustrations are generated by `dlazy gpt-image-2` and background music by `dlazy elevenlabs-music`; both are thin clients over the dLazy hosted API:\n\n- Prompts and parameters are sent to the dLazy API (`api.dlazy.com`) for inference.\n- Local reference images are uploaded to dLazy media storage (`files.dlazy.com`); result URLs are also hosted there.\n\nThe **story text, page composition, and HTML assembly** happen locally — you (the agent) write the story and call this skill's `scripts/build_book.py` to inject the content into `assets/template.html`, producing a self-contained HTML. Standard SaaS pattern; the skill does not access network or filesystem beyond what the dLazy CLI handles.\n\n---\n\n## What the output looks like\n\nA folder you can open directly; `index.html` is the book:\n\n```\n<book-title>/\n├── index.html        ← the finished book (image-left/text-right, page turning, BGM)\n├── book.json         ← content data (title, per-page image+text, music)\n├── images/           ← cover.png, page-01.png … page-10.png\n└── music/            ← bgm.mp3\n```\n\nReading experience: **cover** (large image + title + \"Start reading\") → **spreads** (illustration on the left in 3:4, story text on the right; turn pages with arrow keys / click left-right / bottom dots) → **end page**. A background-music toggle sits top-right. On mobile it becomes image-top / text-bottom.\n\nImages and music are referenced by **relative paths**, so the whole folder is portable and works offline.\n\n---\n\n## Workflow\n\nA picture book is story + image + sound as one whole; quality comes from keeping the three coordinated. Do the steps in order — each sets up the next.\n\n### Step 0: Confirm the brief\n\nBefore starting, align on these (fill sensible defaults for anything unstated and say so — don't interrogate the user):\n\n- **Theme / core**: what's the story, what does it convey (courage, sharing, friendship…)?\n- **Page count**: defaults to **10**; the user may specify otherwise.\n- **Audience age**: defaults to 3–6. Drives text difficulty and sentence length.\n- **Art style**: defaults to warm, healing watercolor children's-book style. Could also be flat illustration, crayon, Pixar-style 3D, etc.\n- **Protagonist**: give it a concrete look (e.g. \"a little fox in a red scarf\") — it must stay consistent on every page.\n\n### Step 1: Write the paged story into book.json\n\nWrite the **whole book's text first**, then generate images, so the visuals follow one narrative thread.\n\n- A full arc: **opening (introduce hero + world) → setting out / a wish → a problem → a turn → a warm ending.** Spread this across the 10 pages.\n- **1–3 sentences per page**, spoken and vivid, good to read aloud. Shorter for younger readers.\n- Also note a **visual description** for each page (what to draw) — you'll need it next.\n\nWrite `book.json` first (image/music paths as placeholders that will already be correct once generated):\n\n```json\n{\n  \"title\": \"The Little Fox's Star Lantern\",\n  \"subtitle\": \"A warm story about sharing\",\n  \"cover_image\": \"images/cover.png\",\n  \"music\": \"music/bgm.mp3\",\n  \"pages\": [\n    { \"image\": \"images/page-01.png\", \"text\": \"Deep in the forest lived a little fox in a red scarf…\" },\n    { \"image\": \"images/page-02.png\", \"text\": \"…\" }\n  ]\n}\n```\n\n### Step 2: Generate illustrations page by page (keep character + style consistent)\n\nConsistency is where picture books fail — the same fox can't look different on every page. Use the **first page as a style anchor**:\n\n1. **Generate page 1 first**, writing the character look, art style, palette, and composition in full detail. This sets the visual baseline for the whole book.\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --prompt \"Children's book illustration, warm watercolor style, 3:4 portrait. An orange little fox in a red scarf lies on a windowsill gazing at the round moon outside, nighttime, soft warm lamplight, healing childlike mood, clean negative space.\"\n   ```\n\n2. **Pass page 1 as the reference image** via `--images` on every later page so the hero and style carry over; only the scene changes:\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --images images/page-01.png \\\n     --prompt \"Same orange fox in a red scarf, same watercolor style and palette. This page: the fox shoulders a small backpack and walks into the forest under the moonlight. 3:4 portrait.\"\n   ```\n\n3. The result URL is at `result.outputs[0].url`. **Download it into `images/` with curl:**\n\n   ```bash\n   curl -L -o images/page-01.png \"<returned url>\"\n   ```\n\nOn parameters: `--quality low` is low quality (fast, cheap, plenty for small book art); `--size 1024x1536` is the closest small portrait to 3:4 (gpt-image-2 has no exact 3:4 tier; the template crops to 3:4 so it looks right).\n\n**Cover**: same idea — use page 1 as reference to generate a more atmospheric hero image into `images/cover.png`.\n\n> **Execution discipline (important)**: run one generation command at a time — wait for it to return and download before the next — don't fire all 10 image commands at once or chain them with `&`/`&&`. This is both because later pages need the previous image as a reference and because `&`/`&&` error out under Windows PowerShell.\n\n### Step 3: Generate background music\n\nWrite one music prompt from the story's mood; give it enough length to cover a read-through (60–90s for a bedtime story is fine, it loops):\n\n```bash\ndlazy elevenlabs-music --duration 75 \\\n  --prompt \"Gentle, soothing children's bedtime music, soft piano and music box, dreamy and warm, a background for reading a picture book aloud, no vocals.\"\n```\n\nDownload the result into `music/bgm.mp3` with `curl` the same way.\n\n### Step 4: Assemble the HTML\n\nMake sure the paths in `book.json` match the files you actually downloaded, then run this skill's build script:\n\n```bash\npython3 <this-skill-dir>/scripts/build_book.py book.json -o index.html\n```\n\nIt injects `book.json` into `assets/template.html` to produce a self-contained `index.html`. Keep `index.html` next to `images/` and `music/`.\n\n### Step 5: Deliver\n\nTell the user the output folder path, that double-clicking `index.html` opens the book, and that the top-right button toggles the music. Share the cover image URL for a quick preview.\n\n---\n\n## Command cheatsheet\n\n**Illustration · gpt-image-2** (full help: `dlazy gpt-image-2 -h`)\n\n| Flag | Picture-book usage |\n| --- | --- |\n| `--prompt` | Scene description (character + scene + style + \"3:4 portrait\") |\n| `--images` | Reference image (page-1 path) to keep character/style consistent, up to 5 |\n| `--quality` | `low` (small book art, fast and cheap) |\n| `--size` | `1024x1536` (closest small portrait to 3:4) |\n\n**Background music · elevenlabs-music** (full help: `dlazy elevenlabs-music -h`)\n\n| Flag | Picture-book usage |\n| --- | --- |\n| `--prompt` | Mood description (instruments, emotion, \"no vocals\", good for reading aloud) |\n| `--duration` | Seconds; 60–90 is fine for a bedtime story, it loops |\n\nResults are always at `result.outputs[0].url`; download with `curl -L -o <local path> \"<url>\"`.\n\n## Error Handling\n\n| Code | Error Type                         | Example Message                                                                                                          |\n| ---- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |\n| 401  | Unauthorized (No API Key)          | `ok: false, code: \"unauthorized\", message: \"API key is missing or invalid\"`                                              |\n| 501  | Missing required parameter         | `error: required option '--prompt <prompt>' not specified`                                                               |\n| 502  | Local file read error              | `Error: Image file not found: C:\\path\\to\\your\\file`                                                                      |\n| 503  | API request failed (no balance)    | `ok: false, code: \"insufficient_balance\"`                                                                                |\n| 503  | API request failed (server error)  | `HTTP status code error (500 server crash)`                                                                              |\n| 504  | Asynchronous task execution failed | `=== Generation Failed ===` / `{Specific error reason returned by backend, e.g. \"Prompt violates safety policy\"}`        |\n\n> **AGENT CRITICAL INSTRUCTION**:\n>\n> 1. If the result returns `code: \"insufficient_balance\"`, you MUST explicitly tell the user their credits are insufficient and guide them to recharge: [https://dlazy.com/dashboard/organization/settings?tab=credits](https://dlazy.com/dashboard/organization/settings?tab=credits)\n> 2. If the result returns `code: \"unauthorized\"` or indicates a missing API key, you MUST tell the user to get their API key from [https://dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key) and save it with `dlazy auth set <key>`, then resume.\n> 3. If one image is rejected for violating the safety policy, rewrite that page's prompt (drop sensitive/violent/photoreal-person content) and retry — don't abandon the whole book.\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.3.20:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"dlazy-picture-book\",\n  \"version\": \"1.3.20\",\n  \"publishedAt\": 1790558390908\n}\n\nFile v1.3.20:skill-card.md\n\n## Description:\n\nCreates a paged children's story with consistent illustrations and background music, then assembles it into a browsable HTML picture book.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dlazyai](https://clawhub.ai/user/dlazyai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nReaders, educators, and creators use this skill to turn a story theme into an illustrated children's book with optional background music.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Story prompts and reference images may be sent to dLazy services.\n\nMitigation: Do not submit sensitive content or images without the user's approval.\n\nRisk: Generating illustrations and music may consume dLazy account credits.\n\nMitigation: Confirm the full generation workflow and expected credit use before starting.\n\nRisk: The dLazy API key may be saved in the user's local configuration.\n\nMitigation: Use DLAZY_API_KEY per run when persistent local key storage is not desired.\n\n## Reference(s):\n\n- [ClawHub picture-book skill](https://clawhub.ai/dlazyai/skills/dlazy-picture-book)\n- [dLazy CLI source code (not verified skill provenance)](https://github.com/dlazy-ai/cli)\n- [dLazy CLI npm package](https://www.npmjs.com/package/@dlazy/cli)\n- [dLazy homepage](https://dlazy.com)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands, Text, Files]\n\n**Output Format:** [Paged story text and commands; local JSON, HTML, images, and audio]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Defaults to 10 pages; the HTML book references local image and music files.]\n\n## Skill Version(s):\n\n1.3.20 (source: ClawHub release metadata; artifact frontmatter says 1.3.5)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.3.20:SKILL-cn.md\n\n---\nname: dlazy-picture-book\nversion: 1.3.5\ndescription: \"绘本生成、儿童绘本、图画书、睡前故事书、picture book、storybook——根据一个主题创作完整绘本：编写分页故事、用 dlazy gpt-image-2 逐页生成风格统一的插图、用 dlazy elevenlabs-music 生成匹配基调的背景音乐，最后组装成一个左图右文、可翻页、带背景音乐的独立 HTML 绘本。默认 10 页。当用户想做绘本 / 图画书 / 儿童故事书 / 睡前故事，或说“帮我做一本关于……的绘本”时使用。\"\nmetadata:\n  {\n    'clawdbot':\n      {\n        'emoji': '📖',\n        'requires': { 'bins': ['npm', 'npx', 'python3', 'curl'] },\n        'install': 'npm install -g @dlazy/cli@1.2.3',\n        'installAlternative': 'npx @dlazy/cli@1.2.3',\n        'homepage': 'https://github.com/dlazy-ai/cli',\n        'source': 'https://github.com/dlazy-ai/cli',\n        'author': 'dlazyai',\n        'license': 'see-repo',\n        'npm': 'https://www.npmjs.com/package/@dlazy/cli',\n        'configLocation': '~/.dlazy/config.json',\n        'apiEndpoints': ['api.dlazy.com', 'files.dlazy.com'],\n      },\n    'openclaw':\n      {\n        'systemPrompt': '当你需要制作绘本时，请严格遵循此技能的工作流：先确认主题与分页故事，再用 dlazy gpt-image-2 逐页生成插图（首页确立角色与画风，后续页用首页作参考图保持一致），用 dlazy elevenlabs-music 生成背景音乐，最后用本技能自带的 scripts/build_book.py 把 book.json 组装成 index.html。注意：Windows PowerShell 中不允许用 `&` 或 `&&` 串联命令，请逐条同步执行；不要一次性批量生成所有图片。',\n      },\n  }\n---\n\n# 绘本生成 Picture Book\n\n[English](./SKILL.md) · [中文](./SKILL-cn.md)\n\n绘本生成、儿童绘本、图画书、睡前故事书、picture book、storybook——根据一个主题创作完整绘本：编写分页故事、用 dlazy gpt-image-2 逐页生成风格统一的插图、用 dlazy elevenlabs-music 生成匹配的背景音乐，最后组装成一个**左图右文、可翻页、带背景音乐的独立 HTML 绘本**。默认 10 页。\n\n## 触发关键词\n\n- 绘本 / 绘本生成\n- 儿童绘本 / 图画书\n- 睡前故事 / 故事书\n- picture book / storybook\n- 帮我做一本关于……的绘本\n\n## 身份验证 (Authentication)\n\n所有 dlazy 请求都需要 dLazy API key。**推荐使用** `dlazy login` 完成登录：\n\n```bash\ndlazy login\n```\n\n该命令使用设备码流程（远程终端也可用），登录成功后 **自动把 API key 写入本地 CLI 配置**，无需手动复制粘贴。\n\n### 备选：手动设置 API Key\n\n如果你已有 API key，也可以直接保存：\n\n```bash\ndlazy auth set YOUR_API_KEY\n```\n\nCLI 会把 key 保存在你的用户配置目录（macOS/Linux 上为 `~/.dlazy/config.json`，Windows 上为 `%USERPROFILE%\\.dlazy\\config.json`），文件权限仅限当前操作系统用户访问。你也可以用 `DLAZY_API_KEY` 环境变量按次传入。\n\n### 手动获取 API Key\n\n1. 登录或在 [dlazy.com](https://dlazy.com) 创建账号\n2. 访问 [dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key)\n3. 复制 API Key 区域显示的密钥\n\n每个 key 都属于你自己的 dLazy 组织，可在同一控制面板**随时轮换或吊销**。\n\n## 关于与来源 (Provenance)\n\n- **CLI 源代码**: [github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli)\n- **维护者**: dlazyai\n- **npm 包名**: `@dlazy/cli`\n- **官网**: [dlazy.com](https://dlazy.com)\n\n如果你不希望在系统上长期保留一个全局 CLI，可以按需运行：\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>\n```\n\n安装前建议先到 GitHub 仓库审阅源码。\n\n## 工作原理 (How It Works)\n\n绘本的**插图**由 `dlazy gpt-image-2` 生成、**背景音乐**由 `dlazy elevenlabs-music` 生成，二者都是 dLazy 托管 API 的轻量封装：\n\n- 你提供的提示词与参数会发送到 dLazy API（`api.dlazy.com`）进行推理。\n- 传入的本地参考图会先上传到 dLazy 媒体存储（`files.dlazy.com`），生成结果 URL 也由 `files.dlazy.com` 托管。\n\n**故事文本、分页编排、HTML 组装**都在本地完成——由你（Agent）编写故事、调用本技能自带的 `scripts/build_book.py` 把内容注入 `assets/template.html` 模版，产出一个自包含的 HTML。这是标准的 SaaS 调用模式，技能本身不越权访问网络或文件系统。\n\n---\n\n## 成品长什么样\n\n一个可以直接双击打开的文件夹，`index.html` 就是绘本：\n\n```\n<绘本标题>/\n├── index.html        ← 最终绘本（左图右文、翻页、背景音乐）\n├── book.json         ← 内容数据（标题、每页图文、音乐）\n├── images/           ← cover.png, page-01.png … page-10.png\n└── music/            ← bgm.mp3\n```\n\n阅读体验：**封面**（大图 + 标题 + “开始阅读”）→ **内页**（左边 3:4 插图，右边故事文字，可用方向键 / 点击左右 / 底部圆点翻页）→ **尾页**。右上角有背景音乐开关。手机上自动变为上图下文。\n\n图片与音乐都用**相对路径**引用，所以整个文件夹拷走即可分享，无需联网。\n\n---\n\n## 工作流\n\n绘本是「故事 + 画面 + 声音」的整体，质量取决于三者是否协调。按下面的顺序做，每一步都为下一步打好基础。\n\n### 第 0 步：确认创作简报\n\n动手前先和用户对齐这几件事（用户没说的，用合理默认值并说明，不要追问到底）：\n\n- **主题 / 故事内核**：讲什么？想传递什么（勇气、分享、友谊…）？\n- **页数**：默认 **10 页**，用户可指定。\n- **受众年龄**：默认 3–6 岁。决定文字难度与句子长度。\n- **画风**：默认温暖治愈的水彩儿童绘本风。也可以是扁平插画、蜡笔、3D 皮克斯风等。\n- **主角**：外形要具体（如“一只戴红围巾的小狐狸”），因为它要在每一页保持一致。\n\n### 第 1 步：编写分页故事，落到 book.json\n\n先把**整本书的文字**写完，再去生成图。这样画面才有统一的叙事线索。\n\n- 一个完整的故事弧：**开场（介绍主角与世界）→ 出发 / 愿望 → 遇到困难 → 转折 → 温暖的结局**。10 页就按这个节奏铺开。\n- 每页 **1–3 句**，口语化、有画面感，适合朗读。低龄段句子更短。\n- 同时为每页想好**画面描述**（这一页画什么），下一步生成插图要用。\n\n把结果先写成 `book.json`（图片 / 音乐路径先占位，生成后已经是对的路径）：\n\n```json\n{\n  \"title\": \"小狐狸的星星灯\",\n  \"subtitle\": \"一个关于分享的温暖故事\",\n  \"cover_image\": \"images/cover.png\",\n  \"music\": \"music/bgm.mp3\",\n  \"pages\": [\n    { \"image\": \"images/page-01.png\", \"text\": \"森林深处住着一只戴红围巾的小狐狸……\" },\n    { \"image\": \"images/page-02.png\", \"text\": \"……\" }\n  ]\n}\n```\n\n### 第 2 步：逐页生成插图（保持角色与画风一致）\n\n一致性是绘本最容易翻车的地方——同一只小狐狸不能每页长得都不一样。做法是**用首页当“风格锚点”**：\n\n1. **先生成第 1 页**，提示词里把角色外形、画风、色调、构图都写足、写细。这张确立整本书的视觉基调。\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --prompt \"儿童绘本插画，温暖水彩风格，3:4 竖构图。一只戴红色围巾的橙色小狐狸趴在窗台上望着窗外圆圆的月亮，夜晚，柔和的暖色灯光，治愈童真的氛围，画面留白干净。\"\n   ```\n\n2. **后续每一页都把第 1 页作为参考图**传给 `--images`，让主角和画风延续，只改场景：\n\n   ```bash\n   dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --images images/page-01.png \\\n     --prompt \"同一只戴红围巾的橙色小狐狸，同样的水彩绘本画风与色调。这一页：小狐狸背起小背包，踏着月光走进森林。3:4 竖构图。\"\n   ```\n\n3. 命令返回后，结果 URL 在 `result.outputs[0].url`。**用 curl 下载到 `images/`**：\n\n   ```bash\n   curl -L -o images/page-01.png \"<返回的 url>\"\n   ```\n\n关于参数：`--quality low` 是低质量（快、省积分，绘本小图足够）；`--size 1024x1536` 是最接近 3:4 的小竖图（gpt-image-2 没有精确的 3:4 档，模版会按 3:4 裁切，视觉上正好）。\n\n**封面**同理：用第 1 页作参考图，生成一张更有氛围感的主视觉存到 `images/cover.png`。\n\n> **执行纪律（重要）**：一次只跑一个生成命令，等它返回、下载好，再跑下一个——不要一次性把 10 张图的命令一股脑并发或用 `&`/`&&` 串起来。这既是因为要拿上一张的结果当参考图，也因为在 Windows PowerShell 下 `&`/`&&` 会报错。\n\n### 第 3 步：生成背景音乐\n\n根据故事基调写一句音乐提示词，时长给足以覆盖阅读（睡前故事 60–90 秒即可，循环播放）：\n\n```bash\ndlazy elevenlabs-music --duration 75 \\\n  --prompt \"温柔舒缓的儿童睡前音乐，轻柔的钢琴与八音盒，梦幻温暖，适合绘本朗读的背景，无人声。\"\n```\n\n返回后同样 `curl` 下载到 `music/bgm.mp3`。\n\n### 第 4 步：组装成 HTML\n\n确认 `book.json` 里的路径和实际下载的文件对得上，然后运行本技能自带的构建脚本：\n\n```bash\npython3 <本技能目录>/scripts/build_book.py book.json -o index.html\n```\n\n脚本会把 `book.json` 注入 `assets/template.html`，生成自包含的 `index.html`。把 `index.html` 和 `images/`、`music/` 放在同一文件夹即可。\n\n### 第 5 步：交付\n\n告诉用户成品文件夹路径，说明双击 `index.html` 就能翻阅、右上角可开关背景音乐。附上封面图 URL 让用户先睹为快。\n\n---\n\n## 命令速查\n\n**插图 · gpt-image-2**（完整帮助：`dlazy gpt-image-2 -h`）\n\n| 参数 | 绘本用法 |\n| --- | --- |\n| `--prompt` | 画面描述（角色 + 场景 + 画风 + “3:4 竖构图”） |\n| `--images` | 参考图（首页图路径），用于保持角色/画风一致，最多 5 张 |\n| `--quality` | `low`（绘本小图够用，快且省积分） |\n| `--size` | `1024x1536`（最接近 3:4 的小竖图） |\n\n**背景音乐 · elevenlabs-music**（完整帮助：`dlazy elevenlabs-music -h`）\n\n| 参数 | 绘本用法 |\n| --- | --- |\n| `--prompt` | 音乐氛围描述（乐器、情绪、“无人声”、适合朗读） |\n| `--duration` | 时长（秒），睡前故事 60–90 即可，循环播放 |\n\n生成结果统一在 `result.outputs[0].url`，用 `curl -L -o <本地路径> \"<url>\"` 下载。\n\n## 错误处理\n\n| Code | 错误类型                         | 示例信息                                                                                             |\n| ---- | -------------------------------- | ---------------------------------------------------------------------------------------------------- |\n| 401  | 未授权 (API Key缺失或无效)       | `ok: false, code: \"unauthorized\", message: \"API key is missing or invalid\"`                          |\n| 501  | 缺少必填参数                     | `error: required option '--prompt <prompt>' not specified`                                            |\n| 502  | 本地文件读取失败                 | `Error: Image file not found: C:\\path\\to\\your\\file`                                                  |\n| 503  | API 请求失败（余额不足）         | `ok: false, code: \"insufficient_balance\"`                                                            |\n| 503  | API 请求失败（服务端错误）       | `HTTP status code error (500 server crash)`                                                          |\n| 504  | 异步任务执行失败                 | `=== Generation Failed ===` / `{后端返回的具体失败原因，如提示词违反安全策略}`                        |\n\n> **智能体关键指令**:\n> 1. 如果返回 `code: \"insufficient_balance\"`（余额不足），必须明确告知用户积分不足，并引导前往充值：[https://dlazy.com/dashboard/organization/settings?tab=credits](https://dlazy.com/dashboard/organization/settings?tab=credits)\n> 2. 如果返回 `code: \"unauthorized\"` 或提示缺少 API Key，必须告知用户前往 [https://dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key) 获取 API Key 并用 `dlazy auth set <key>` 保存，然后继续任务。\n> 3. 若某张图违反安全策略被拒，改写该页提示词（去掉敏感/暴力/写实人物等描述）后重试，不要中断整本书。\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nArchive v1.3.19: 6 files, 19297 bytes\n\nFiles: assets/template.html (14664b), scripts/build_book.py (2477b), skill-card.md (2384b), SKILL-cn.md (12769b), SKILL.md (13311b), _meta.json (138b)\n\nFile v1.3.19:SKILL.md\n\n---\nname: dlazy-picture-book\nversion: 1.3.5\ndescription: \"picture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a self-contained HTML book with image-left / text-right spreads, page turning, and background music. Defaults to 10 pages. Use when the user wants a picture book / storybook / children's book / bedtime story, or says 'make me a picture book about ...'.\"\nmetadata:\n  {\n    'clawdbot':\n      {\n        'emoji': '📖',\n        'requires': { 'bins': ['npm', 'npx', 'python3', 'curl'] },\n        'install': 'npm install -g @dlazy/cli@1.2.3',\n        'installAlternative': 'npx @dlazy/cli@1.2.3',\n        'homepage': 'https://github.com/dlazy-ai/cli',\n        'source': 'https://github.com/dlazy-ai/cli',\n        'author': 'dlazyai',\n        'license': 'see-repo',\n        'npm': 'https://www.npmjs.com/package/@dlazy/cli',\n        'configLocation': '~/.dlazy/config.json',\n        'apiEndpoints': ['api.dlazy.com', 'files.dlazy.com'],\n      },\n    'openclaw':\n      {\n        'systemPrompt': \"When making a picture book, follow this skill's workflow strictly: first confirm the theme and paged story, then generate illustrations page by page with dlazy gpt-image-2 (the first page establishes the character and art style; later pages pass the first page as a reference image\n\nArchive v1.3.18: 6 files, 19411 bytes\n\nFiles: assets/template.html (14664b), scripts/build_book.py (2477b), skill-card.md (2688b), SKILL-cn.md (12769b), SKILL.md (13311b), _meta.json (138b)\n\nArchive v1.3.17: 6 files, 19303 bytes\n\nFiles: assets/template.html (14664b), scripts/build_book.py (2477b), skill-card.md (2421b), SKILL-cn.md (12769b), SKILL.md (13311b), _meta.json (138b)\n\nArchive v1.3.16: 6 files, 19365 bytes\n\nFiles: assets/template.html (14664b), scripts/build_book.py (2477b), skill-card.md (2463b), SKILL-cn.md (12769b), SKILL.md (13311b), _meta.json (138b)","readmeExcerpt":"Skill: 绘本生成 Picture Book Owner: dlazyai Summary: picture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a self-contained HTML book with image-left / text-right spreads","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"dlazy login"},{"language":"bash","snippet":"dlazy auth set YOUR_API_KEY"},{"language":"bash","snippet":"npx @dlazy/cli@1.2.3 <command>"},{"language":"text","snippet":"<book-title>/\n├── index.html        ← the finished book (image-left/text-right, page turning, BGM)\n├── book.json         ← content data (title, per-page image+text, music)\n├── images/           ← cover.png, page-01.png … page-10.png\n└── music/            ← bgm.mp3"},{"language":"json","snippet":"{\n  \"title\": \"The Little Fox's Star Lantern\",\n  \"subtitle\": \"A warm story about sharing\",\n  \"cover_image\": \"images/cover.png\",\n  \"music\": \"music/bgm.mp3\",\n  \"pages\": [\n    { \"image\": \"images/page-01.png\", \"text\": \"Deep in the forest lived a little fox in a red scarf…\" },\n    { \"image\": \"images/page-02.png\", \"text\": \"…\" }\n  ]\n}"},{"language":"bash","snippet":"dlazy gpt-image-2 --quality low --size 1024x1536 \\\n     --prompt \"Children's book illustration, warm watercolor style, 3:4 portrait. An orange little fox in a red scarf lies on a windowsill gazing at the round moon outside, nighttime, soft warm lamplight, healing childlike mood, clean negative space.\""}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: dlazy-picture-book\nversion: 1.3.5\ndescription: \"picture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a self-contained HTML book with image-left / text-right spreads, page turning, and background music. Defaults to 10 pages. Use when the user wants a picture book / storybook / children's book / bedtime story, or says 'make me a picture book about ...'.\"\nmetadata:\n  {\n    'clawdbot':\n      {\n        'emoji': '📖',\n        'requires': { 'bins': ['npm', 'npx', 'python3', 'curl'] },\n        'install': 'npm install -g @dlazy/cli@1.2.3',\n        'installAlternative': 'npx @dlazy/cli@1.2.3',\n        'homepage': 'https://github.com/dlazy-ai/cli',\n        'source': 'https://github.com/dlazy-ai/cli',\n        'author': 'dlazyai',\n        'license': 'see-repo',\n        'npm': 'https://www.npmjs.com/package/@dlazy/cli',\n        'configLocation': '~/.dlazy/config.json',\n        'apiEndpoints': ['api.dlazy.com', 'files.dlazy.com'],\n      },\n    'openclaw':\n      {\n        'systemPrompt': \"When making a picture book, follow this skill's workflow strictly: first confirm the theme and paged story, then generate illustrations page by page with dlazy gpt-image-2 (the first page establishes the character and art style; later pages pass the first page as a reference image via --images to stay consistent), generate background music with dlazy elevenlabs-music, and finally assemble book.json into index.html with this skill's scripts/build_book.py. Note: Windows PowerShell forbids `&` / `&&` to chain commands — run them one at a time; never batch-generate all images at once.\",\n      },\n  }\n---\n\n# 绘本生成 Picture Book\n\n[English](./SKILL.md) · [中文](./SKILL-cn.md)\n\npicture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a **self-contained HTML book with image-left / text-right spreads, page turning, and background music**. Defaults to 10 pages.\n\n## Trigger Keywords\n\n- picture book / storybook\n- children's book / illustrated story\n- bedtime story / story book\n- 绘本 / 图画书\n- make me a picture book about ...\n\n## Authentication\n\nAll dlazy requests require a dLazy API key. The recommended way to authenticate is:\n\n```bash\ndlazy login\n```\n\nThis runs a device-code flow (also works in remote shells) and **automatically saves your API key** to the local CLI config — no manual copy/paste required.\n\n### Alternative: Set the Key Manually\n\n```bash\ndlazy auth set YOUR_API_KEY\n```\n\nThe CLI saves the key in your user config directory (`~/.dlazy/config.json` on macOS/Linux, `%USERPROFILE%\\."},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"dlazy-picture-book\",\n  \"version\": \"1.3.25\",\n  \"publishedAt\": 1791422496464\n}"},{"path":"skill-card.md","content":"## Description:\n\nCreates a paged children's picture book from a theme, with consistent illustrations, background music, and a portable HTML reading experience.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dlazyai](https://clawhub.ai/user/dlazyai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nCreators, educators, and families use this skill to turn a theme into an illustrated, read-aloud children's story with optional background music.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Prompts and reference images are sent to dLazy's hosted service.\n\nMitigation: Use the service only for material you are comfortable sharing with dLazy.\n\nRisk: Authentication may store an API key locally on shared machines.\n\nMitigation: Prefer per-invocation environment credentials or npx on shared machines, and protect the key.\n\nRisk: Illustration, music, and book files are downloaded and written locally.\n\nMitigation: Keep generated files in a dedicated output folder.\n\n## Reference(s):\n\n- [ClawHub picture-book skill](https://clawhub.ai/dlazyai/skills/dlazy-picture-book)\n- [dLazy CLI source (linked in skill metadata; not verified release provenance)](https://github.com/dlazy-ai/cli)\n- [dLazy CLI npm package](https://www.npmjs.com/package/@dlazy/cli)\n\n## Skill Output:\n\n**Output Type(s):** [Text, JSON, HTML, Images, Audio, Shell commands]\n\n**Output Format:** [Paged story and book.json, with an HTML book referencing PNG illustrations and MP3 music]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Defaults to 10 pages; generated files are kept together in a portable folder.]\n\n## Skill Version(s):\n\n1.3.25 (source: ClawHub release; artifact frontmatter lists 1.3.5)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."},{"path":"SKILL-cn.md","content":"---\nname: dlazy-picture-book\nversion: 1.3.5\ndescription: \"绘本生成、儿童绘本、图画书、睡前故事书、picture book、storybook——根据一个主题创作完整绘本：编写分页故事、用 dlazy gpt-image-2 逐页生成风格统一的插图、用 dlazy elevenlabs-music 生成匹配基调的背景音乐，最后组装成一个左图右文、可翻页、带背景音乐的独立 HTML 绘本。默认 10 页。当用户想做绘本 / 图画书 / 儿童故事书 / 睡前故事，或说“帮我做一本关于……的绘本”时使用。\"\nmetadata:\n  {\n    'clawdbot':\n      {\n        'emoji': '📖',\n        'requires': { 'bins': ['npm', 'npx', 'python3', 'curl'] },\n        'install': 'npm install -g @dlazy/cli@1.2.3',\n        'installAlternative': 'npx @dlazy/cli@1.2.3',\n        'homepage': 'https://github.com/dlazy-ai/cli',\n        'source': 'https://github.com/dlazy-ai/cli',\n        'author': 'dlazyai',\n        'license': 'see-repo',\n        'npm': 'https://www.npmjs.com/package/@dlazy/cli',\n        'configLocation': '~/.dlazy/config.json',\n        'apiEndpoints': ['api.dlazy.com', 'files.dlazy.com'],\n      },\n    'openclaw':\n      {\n        'systemPrompt': '当你需要制作绘本时，请严格遵循此技能的工作流：先确认主题与分页故事，再用 dlazy gpt-image-2 逐页生成插图（首页确立角色与画风，后续页用首页作参考图保持一致），用 dlazy elevenlabs-music 生成背景音乐，最后用本技能自带的 scripts/build_book.py 把 book.json 组装成 index.html。注意：Windows PowerShell 中不允许用 `&` 或 `&&` 串联命令，请逐条同步执行；不要一次性批量生成所有图片。',\n      },\n  }\n---\n\n# 绘本生成 Picture Book\n\n[English](./SKILL.md) · [中文](./SKILL-cn.md)\n\n绘本生成、儿童绘本、图画书、睡前故事书、picture book、storybook——根据一个主题创作完整绘本：编写分页故事、用 dlazy gpt-image-2 逐页生成风格统一的插图、用 dlazy elevenlabs-music 生成匹配的背景音乐，最后组装成一个**左图右文、可翻页、带背景音乐的独立 HTML 绘本**。默认 10 页。\n\n## 触发关键词\n\n- 绘本 / 绘本生成\n- 儿童绘本 / 图画书\n- 睡前故事 / 故事书\n- picture book / storybook\n- 帮我做一本关于……的绘本\n\n## 身份验证 (Authentication)\n\n所有 dlazy 请求都需要 dLazy API key。**推荐使用** `dlazy login` 完成登录：\n\n```bash\ndlazy login\n```\n\n该命令使用设备码流程（远程终端也可用），登录成功后 **自动把 API key 写入本地 CLI 配置**，无需手动复制粘贴。\n\n### 备选：手动设置 API Key\n\n如果你已有 API key，也可以直接保存：\n\n```bash\ndlazy auth set YOUR_API_KEY\n```\n\nCLI 会把 key 保存在你的用户配置目录（macOS/Linux 上为 `~/.dlazy/config.json`，Windows 上为 `%USERPROFILE%\\.dlazy\\config.json`），文件权限仅限当前操作系统用户访问。你也可以用 `DLAZY_API_KEY` 环境变量按次传入。\n\n### 手动获取 API Key\n\n1. 登录或在 [dlazy.com](https://dlazy.com) 创建账号\n2. 访问 [dlazy.com/dashboard/organization/api-key](https://dlazy.com/dashboard/organization/api-key)\n3. 复制 API Key 区域显示的密钥\n\n每个 key 都属于你自己的 dLazy 组织，可在同一控制面板**随时轮换或吊销**。\n\n## 关于与来源 (Provenance)\n\n- **CLI 源代码**: [github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli)\n- **维护者**: dlazyai\n- **npm 包名**: `@dlazy/cli`\n- **官网**: [dlazy.com](https://dlazy.com)\n\n如果你不希望在系统上长期保留一个全局 CLI，可以按需运行：\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>\n```\n\n安装前建议先到 GitHub 仓库审阅源码。\n\n## 工作原理 (How It Works)\n\n绘本的**插图**由 `dlazy gpt-image-2` 生成、**背景音乐**由 `dlazy elevenlabs-music` 生成，二者都是 dLazy 托管 API 的轻量封装：\n\n- 你提供的提示词与参数会发送到 dLazy API（`api.dlazy.com`）进行推理。\n- 传入的本地参考图会先上传到 dLazy 媒体存储（`files.dlazy.com`），生成结果 URL 也由 `files.dlazy.com` 托管。\n\n**故事文本、分页编排、HTML 组装**都在本地完成——由你（Agent）编写故事、调用本技能自带的 `scripts/build_book.py` 把内容注入 `assets/template.html` 模版，产出一个自包含的 HTML。这是标准的 SaaS 调用模式，技能本身不越权访问网络或文件系统。\n\n---\n\n## 成品长什么样\n\n一个可以直接双击打开的文件夹，`index.html` 就是绘本：\n\n```\n<绘本标题>/\n├── index.html        ← 最终绘本（左图右文、翻页、背景音乐）\n├── book.json         ← 内容数据（标题、每页"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1319,"uniquenessScore":39,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T12:34:11.347Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T12:34:11.347Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T23:47:32.879Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}