feat(skills): add workflow orchestration skills
This commit is contained in:
parent
ded5bfcc89
commit
cc9e1fd94e
@ -9,6 +9,7 @@
|
||||
- `skills/image-production/`:连续风格 PNG / 信息图素材生成。
|
||||
- `skills/audio-production/`:视频音效、BGM 和音频素材工作流。
|
||||
- `skills/animation/`:HyperFrames 动效、简笔画动画和 Anime.js 适配。
|
||||
- `skills/workflows/`:跨技能编排工作流,定义阶段、下游产物、验收门和交付合同。
|
||||
- `skills/workspace-core/`:从 OpenClaw/Codex runtime 同步回来的 workspace core skills。
|
||||
|
||||
其中 source-owned 内容生产技能基于 `HyperFrames` 工作流,目标是把“想法 -> 脚本 -> 画面 -> 音频 -> 成片”的流程沉淀成可复用方法。Workspace core skills 只作为 runtime 辅助技能归档,不与内容生产技能混放。
|
||||
@ -32,6 +33,10 @@
|
||||
| 视频音效工作流 | 音效搜索、下载与合成、时间线接入 | `skills/audio-production/sound-fx-for-video/SKILL.md` |
|
||||
| 简笔画动画视频 | 线稿风 + 短画面字;**主动网络搜参考图临摹**;逼真非抽象;GSAP 主时间线 + 可选 Anime.js;抽检闭环 | `skills/animation/sketch-animation-video/SKILL.md` |
|
||||
| Anime.js(HyperFrames) | seek 驱动适配、`window.__hfAnime` 注册、与 GSAP 分工 | `skills/animation/animejs/SKILL.md` |
|
||||
| 图文 PDF 工作流 | 主题拆章节、生成章节图、汇总排版为 PDF | `skills/workflows/content-pdf-with-images/SKILL.md` |
|
||||
| 文章转图片系列 | 将文章、提纲或主题序列转成 manifest-backed 多图系列 | `skills/workflows/article-to-image-series/SKILL.md` |
|
||||
| 图片系列转视频 | 从 PNG manifest 生成讲解视频并执行验收 | `skills/workflows/image-series-to-video/SKILL.md` |
|
||||
| 研究到幻灯片 | 将研究资料、来源和主题 brief 转成可验证 slide deck | `skills/workflows/research-to-slide-deck/SKILL.md` |
|
||||
|
||||
## Workspace Core Skills
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
| `image-production/` | 连续风格 PNG / 信息图素材 |
|
||||
| `audio-production/` | SFX、BGM、音频素材工作流 |
|
||||
| `animation/` | HyperFrames 动效、简笔画动画、Anime.js 适配 |
|
||||
| `workflows/` | 跨技能编排工作流、阶段验收、交付合同 |
|
||||
| `workspace-core/` | OpenClaw/Codex runtime core skills |
|
||||
|
||||
Source-owned 内容生产技能和 runtime 同步技能使用目录边界隔离,不再使用并列顶层 `workspace-core-skills/`。
|
||||
|
||||
73
skills/workflows/article-to-image-series/SKILL.md
Normal file
73
skills/workflows/article-to-image-series/SKILL.md
Normal file
@ -0,0 +1,73 @@
|
||||
---
|
||||
name: article-to-image-series
|
||||
description: "文章转图片系列工作流:将文章、提纲或主题序列转成风格一致的多图系列。Workflow skill for converting an article, outline, or topic sequence into a coherent multi-image series; use for one image per chapter, article illustrations, infographic series, Xiaohongshu-style cards, or manifest-backed image sets."
|
||||
---
|
||||
|
||||
# Article To Image Series Workflow
|
||||
|
||||
This workflow turns text structure into a validated image series. It is intentionally staged so the agent plans image count and prompts before generating assets.
|
||||
|
||||
## Output Contract
|
||||
|
||||
Final deliverables must stay inside the current task artifact scope:
|
||||
|
||||
- `workflow.plan.md`
|
||||
- `series.config.json`
|
||||
- `prompts/image-prompts.md`
|
||||
- `assets/images/*.png`
|
||||
- `assets/images/manifest.md`
|
||||
- `DELIVERY.md`
|
||||
|
||||
## Phase 1: Parse Source
|
||||
|
||||
Read the user input and identify:
|
||||
|
||||
- topic or article title
|
||||
- narrative line
|
||||
- target audience
|
||||
- chapter or card count
|
||||
- style requirements
|
||||
- any required reference images or source URLs
|
||||
|
||||
If no count is given, choose a compact 3-7 image series based on the narrative.
|
||||
|
||||
## Phase 2: Series Plan
|
||||
|
||||
Write `workflow.plan.md` and `series.config.json`.
|
||||
|
||||
Each image entry must define:
|
||||
|
||||
- `chapter_id`
|
||||
- `title`
|
||||
- `subtitle`
|
||||
- core message
|
||||
- visual metaphor
|
||||
- key labels
|
||||
- output path under `assets/images/`
|
||||
|
||||
Do not ask an image model for a batch collage. One entry means one standalone output file.
|
||||
|
||||
## Phase 3: Prompt Pack
|
||||
|
||||
Write `prompts/image-prompts.md` with one prompt per image.
|
||||
|
||||
Prompts must keep a consistent family style while preserving per-chapter meaning. Avoid generic cyberpunk, stock-style, and unreadable text-heavy visuals.
|
||||
|
||||
## Phase 4: Generate Images
|
||||
|
||||
Generate or edit images one by one. Save each final PNG under `assets/images/`.
|
||||
|
||||
If an image tool writes to a cache directory, copy the final image into the artifact scope. Do not leave final outputs in `Downloads`, model cache, `/tmp`, or global media folders.
|
||||
|
||||
## Phase 5: Manifest And Validation
|
||||
|
||||
Write `assets/images/manifest.md` with one row per image.
|
||||
|
||||
Required checks:
|
||||
|
||||
- PNG count equals manifest row count.
|
||||
- Every manifest `file` exists and is a real PNG.
|
||||
- No manifest file path points outside the artifact scope.
|
||||
- No generated image is a combined grid, contact sheet, or storyboard unless explicitly requested.
|
||||
|
||||
Stop on validation failure and report the missing or invalid image file.
|
||||
84
skills/workflows/content-pdf-with-images/SKILL.md
Normal file
84
skills/workflows/content-pdf-with-images/SKILL.md
Normal file
@ -0,0 +1,84 @@
|
||||
---
|
||||
name: content-pdf-with-images
|
||||
description: "图文 PDF 工作流:将主题或文章拆成章节,为每章生成配图,并汇总排版为真实 PDF。Workflow skill for turning a topic or article request into a chaptered PDF with one image per chapter; use for illustrated PDF reports, chapter images, and final PDFs assembled from text plus generated images."
|
||||
---
|
||||
|
||||
# Content PDF With Images Workflow
|
||||
|
||||
This is an orchestration skill. It does not replace planning, image, or PDF skills. It forces a staged handoff so the final artifact is a real PDF with real image inputs, not a placeholder file.
|
||||
|
||||
## Output Contract
|
||||
|
||||
Final deliverables must stay inside the current XWorkmate/OpenClaw task artifact scope:
|
||||
|
||||
- `workflow.plan.md`
|
||||
- `article.md`
|
||||
- `assets/images/*.png`
|
||||
- `assets/images/manifest.md`
|
||||
- `prompts/image-prompts.md`
|
||||
- `series.config.json`
|
||||
- `exports/final.pdf`
|
||||
- `DELIVERY.md`
|
||||
|
||||
## Phase 1: Plan
|
||||
|
||||
Create `workflow.plan.md` before writing final content. It must include:
|
||||
|
||||
- topic and audience
|
||||
- chapter list
|
||||
- target word or character count
|
||||
- one image concept per chapter
|
||||
- downstream skill sequence
|
||||
- final acceptance checklist
|
||||
|
||||
If the user gives an explicit chapter sequence, preserve it literally.
|
||||
|
||||
## Phase 2: Article
|
||||
|
||||
Write `article.md` with:
|
||||
|
||||
- title
|
||||
- one section per planned chapter
|
||||
- concise intro and closing summary
|
||||
- total length matching the user request
|
||||
|
||||
Do not claim completion after this phase.
|
||||
|
||||
## Phase 3: Images
|
||||
|
||||
Use the image-series skill path for one standalone PNG per chapter.
|
||||
|
||||
Required checks before continuing:
|
||||
|
||||
- PNG count equals chapter count.
|
||||
- Every `assets/images/*.png` is a real non-empty PNG.
|
||||
- `assets/images/manifest.md` exists and references only relative paths inside the artifact scope.
|
||||
- `prompts/image-prompts.md` and `series.config.json` exist.
|
||||
|
||||
If any check fails, stop and report the missing image artifact. Do not generate a placeholder PDF.
|
||||
|
||||
## Phase 4: PDF
|
||||
|
||||
Use the PDF creation path to assemble `article.md` plus image manifest into `exports/final.pdf`.
|
||||
|
||||
The PDF must contain:
|
||||
|
||||
- title page
|
||||
- chapter text
|
||||
- matching chapter image near each section
|
||||
- closing summary
|
||||
|
||||
Use a PDF library such as reportlab when available. The file must be large enough to plausibly contain text and images; a tiny one-page placeholder PDF is a failure.
|
||||
|
||||
## Phase 5: Delivery Check
|
||||
|
||||
Before final response, run equivalent checks:
|
||||
|
||||
```bash
|
||||
find . -maxdepth 4 -type f | sort
|
||||
file exports/final.pdf
|
||||
pdfinfo exports/final.pdf
|
||||
pdftotext exports/final.pdf - | head -40
|
||||
```
|
||||
|
||||
Only report success if `exports/final.pdf` exists and the expected source files are present.
|
||||
74
skills/workflows/image-series-to-video/SKILL.md
Normal file
74
skills/workflows/image-series-to-video/SKILL.md
Normal file
@ -0,0 +1,74 @@
|
||||
---
|
||||
name: image-series-to-video
|
||||
description: "图片系列转视频工作流:将带 manifest 的 PNG 图片系列转成带讲解、字幕和验收的 MP4 视频。Workflow skill for converting a manifest-backed image series into a narrated video; use when generated PNGs or an image manifest should become an MP4, long-image explanation video, chapter video, narrated walkthrough, or social video."
|
||||
---
|
||||
|
||||
# Image Series To Video Workflow
|
||||
|
||||
This workflow starts only after a real image series exists. It prevents the video stage from inventing fake screenshots, CSS cards, or placeholder images.
|
||||
|
||||
## Required Inputs
|
||||
|
||||
The current artifact scope must contain:
|
||||
|
||||
- `assets/images/*.png`
|
||||
- `assets/images/manifest.md`
|
||||
|
||||
The manifest must describe one row per image with title, file, usage, scan mode, and focus guidance.
|
||||
|
||||
## Output Contract
|
||||
|
||||
Final deliverables must stay inside the current task artifact scope:
|
||||
|
||||
- `video.config.json`
|
||||
- `index.html`
|
||||
- `assets/audio/*.mp3`
|
||||
- `assets/audio/bgm.wav`
|
||||
- `renders/*.mp4`
|
||||
- `ffprobe.json`
|
||||
- `DELIVERY.md`
|
||||
|
||||
## Phase 1: Input Gate
|
||||
|
||||
Validate before building video:
|
||||
|
||||
```bash
|
||||
find assets/images -maxdepth 1 -type f -name '*.png' | sort
|
||||
test -f assets/images/manifest.md
|
||||
```
|
||||
|
||||
Reject the task if images are missing, empty, non-PNG, or not referenced by manifest.
|
||||
|
||||
## Phase 2: Video Plan
|
||||
|
||||
Create or update `video.config.json` from the manifest:
|
||||
|
||||
- one scene per image or chapter
|
||||
- title and caption per scene
|
||||
- scan mode and safe focus from manifest
|
||||
- voiceover text
|
||||
- inspect timestamps
|
||||
- output file name
|
||||
|
||||
Do not hand-write fixed scene arrays unrelated to the manifest.
|
||||
|
||||
## Phase 3: Build
|
||||
|
||||
Use the repository video runner when available. Otherwise create the minimal equivalent pipeline:
|
||||
|
||||
- generate `index.html`
|
||||
- generate voiceover audio
|
||||
- run visual acceptance snapshots
|
||||
- render MP4
|
||||
- run ffprobe
|
||||
|
||||
## Phase 4: Acceptance
|
||||
|
||||
Only report completion if:
|
||||
|
||||
- `renders/*.mp4` exists and is non-empty.
|
||||
- `ffprobe.json` shows video and audio streams.
|
||||
- duration is plausible for the number of scenes.
|
||||
- sampled frames show real source images, visible captions, and no obvious overlap.
|
||||
|
||||
If any step fails, report the failing phase and keep partial artifacts for diagnosis.
|
||||
72
skills/workflows/research-to-slide-deck/SKILL.md
Normal file
72
skills/workflows/research-to-slide-deck/SKILL.md
Normal file
@ -0,0 +1,72 @@
|
||||
---
|
||||
name: research-to-slide-deck
|
||||
description: "研究到幻灯片工作流:将研究资料、来源和主题 brief 转成可验证的演示文稿。Workflow skill for turning research notes, sources, or a topic brief into a verified slide deck; use for PPT, PPTX, slides, research presentations, briefing decks, or source-backed presentations."
|
||||
---
|
||||
|
||||
# Research To Slide Deck Workflow
|
||||
|
||||
This workflow converts research into a presentation with explicit source, outline, slide, and verification phases.
|
||||
|
||||
## Output Contract
|
||||
|
||||
Final deliverables must stay inside the current task artifact scope:
|
||||
|
||||
- `research/sources.md`
|
||||
- `deck-outline.md`
|
||||
- `slides/slide-notes.md`
|
||||
- `exports/deck.pptx` or `exports/deck.pdf`
|
||||
- `DELIVERY.md`
|
||||
|
||||
When a PPTX writer is unavailable, produce a PDF deck and state that format clearly.
|
||||
|
||||
## Phase 1: Research
|
||||
|
||||
Gather or parse source material into `research/sources.md`.
|
||||
|
||||
Each source note should capture:
|
||||
|
||||
- title
|
||||
- URL or local path when available
|
||||
- date if relevant
|
||||
- key facts
|
||||
- how it supports the deck
|
||||
|
||||
For current facts, live sources, pricing, market data, product specs, or recent events, verify against live sources before writing the deck.
|
||||
|
||||
## Phase 2: Deck Outline
|
||||
|
||||
Write `deck-outline.md` before creating slides.
|
||||
|
||||
The outline must include:
|
||||
|
||||
- audience and purpose
|
||||
- 6-12 slide titles unless the user specifies otherwise
|
||||
- one message per slide
|
||||
- required charts, screenshots, tables, or diagrams
|
||||
- source mapping per slide
|
||||
|
||||
Do not begin slide generation until the outline is coherent.
|
||||
|
||||
## Phase 3: Slide Production
|
||||
|
||||
Create the deck from the outline:
|
||||
|
||||
- title slide
|
||||
- agenda or context slide when useful
|
||||
- evidence slides with concise headings
|
||||
- visual slides for comparisons, timelines, architecture, or workflow
|
||||
- closing recommendation or next steps
|
||||
|
||||
Use charts, tables, diagrams, or screenshots only when they support the message. Avoid decorative filler.
|
||||
|
||||
## Phase 4: Verification
|
||||
|
||||
Before final response:
|
||||
|
||||
- confirm `exports/` contains the final deck
|
||||
- render or inspect the deck when tooling is available
|
||||
- check slide count
|
||||
- check that source-backed claims map to `research/sources.md`
|
||||
- check text does not overflow obvious slide containers
|
||||
|
||||
If verification cannot run, report the missing verifier and keep the generated deck plus source files.
|
||||
Loading…
Reference in New Issue
Block a user