Install
openclaw skills install story-pipelineStory generation pipeline skill. Supports multi-episode continuous generation, graph management, AI quality check + human confirmation dual control mechanism...
openclaw skills install story-pipelineThis skill implements a complete story generation pipeline:
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────────┐
│ Generate Ep N│ -> │ AI Review │ -> │ Graph Storage│ -> │ Wait Human Confirm│
└──────────────┘ └──────────────┘ └──────────────┘ └──────────────────┘
│ │ │ │
▼ ▼ ▼ ▼
Query Graph Pass/Retry Store Relations Continue/Modify/End
User: Start a new story pipeline, theme: Chinese girl comeback, target episodes: 10
User: Continue story pipeline [pipeline_id]
User: Approved, continue to next episode
User: Modify: [specific feedback]
User: Pause
User: End
After each episode is generated, AI automatically checks:
| Check Item | Description |
|---|---|
| Plot Coherence | Natural connection with previous episode |
| Character Consistency | Character behavior matches established traits |
| Hook Handling | Reasonable addition/closure of hooks |
| Pacing Control | Appropriate plot progression speed |
| Emotional Curve | Reasonable emotional ups and downs |
Scoring Standard: 0-10 points, below 7 triggers retry (max 3 times)
After AI review passes, display preview and wait for user confirmation:
📋 Episode N Preview
━━━━━━━━━━━━━━━━━━━━━━━━
【Plot Summary】
...
✅ AI Score: 8.5/10
✅ Hook Status: 1 new, 1 closed
Please select:
1️⃣ Approved, continue to next episode
2️⃣ Needs modification (please specify)
3️⃣ Pause
4️⃣ End
━━━━━━━━━━━━━━━━━━━━━━━━
Before generating episode N, query episode N-1's graph:
graph_manager.query_graph(pipeline_id, episode=N-1)
Returns:
After user confirmation, store current episode's complete content:
graph_manager.save_graph(pipeline_id, episode=N, content)
Stores: Complete generation result of the episode (not split into elements)
data/pipeline_state.json{
"pipelines": {
"pipeline_2026-03-05-001": {
"theme": "Chinese girl comeback",
"target_episodes": 10,
"current_episode": 3,
"status": "waiting_user_confirm",
"created_at": "2026-03-05T15:00:00",
"updated_at": "2026-03-05T15:30:00",
"ai_review": {
"score": 8.5,
"checks": {...}
},
"last_output": {
"episode": 3,
"summary": "...",
"content": "Complete content..."
}
}
}
}
| Status | Description |
|---|---|
generating | Currently generating |
ai_reviewing | AI review in progress |
waiting_user_confirm | Waiting for human confirmation |
paused | Paused |
completed | Completed |
error | Error state |
Query API:
{
"action": "query",
"pipeline_id": "pipeline_2026-03-05-001",
"episode": 2
}
Storage API:
{
"action": "save",
"pipeline_id": "pipeline_2026-03-05-001",
"episode": 3,
"content": "Complete generation content for episode 3..."
}
Based on user-provided theme and goals, generate:
Based on graph query results:
When target episodes reached or user requests end:
User: Start a new pipeline, theme: Cultivation boy, target 20 episodes
AI: OK, creating pipeline pipeline_20260305160000
Theme: Cultivation boy
Target: 20 episodes
Style: Realistic cinematic
Status: Initialized, ready to generate episode 1
AI calls start_generation(pipeline_id) to get generation prompt, then generates episode content based on the prompt.
AI calls submit_episode(pipeline_id, episode, content) to submit generated content, then executes AI review.
AI calls process_ai_review(pipeline_id, episode, ai_result, content) to process review results.
If review fails (score < 7), automatically retry (max 3 times).
After review passes, display preview and wait for user confirmation:
📋 Episode 1 Preview
━━━━━━━━━━━━━━━━━━━━━━━━
【Cultivation Journey Begins】
Young Li Yun discovers a mysterious jade pendant in the mountains,
从此踏上修仙之路...
✅ AI Score: 9.0/10
✅ New Hook: H-001 Origin of mysterious jade pendant
━━━━━━━━━━━━━━━━━━━━━━━━
Please select:
1️⃣ Approved, continue to next episode
2️⃣ Needs modification (please specify)
3️⃣ Pause
4️⃣ End
After user confirms, AI calls user_confirm(pipeline_id, action, note):
Repeat steps 2-6 until target episodes reached or user ends.
create_pipeline(theme: str, target_episodes: int, style: str = "realistic cinematic")
# Returns: {"success": True, "pipeline_id": "...", "message": "..."}
start_generation(pipeline_id: str)
# Returns: {"success": True, "episode": N, "prompt": "generation prompt"}
submit_episode(pipeline_id: str, episode: int, content: str)
# Returns: {"success": True, "review_prompt": "review prompt"}
process_ai_review(pipeline_id: str, episode: int, ai_result: str, content: str)
# Returns: {"success": True, "passed": True/False, ...}
user_confirm(pipeline_id: str, action: str, note: str = None)
# action: "approve" / "modify" / "pause" / "end"
# Returns: {"success": True, "status": "...", ...}
get_status(pipeline_id: str)
# Returns: Current pipeline status info
list_pipelines()
# Returns: List of all pipelines
resume_pipeline(pipeline_id: str)
# Returns: Resume result
User: Start a new pipeline, theme: Cultivation boy, target 20 episodes
AI: OK, creating pipeline pipeline_20260305160000
Generating episode 1...
📋 Episode 1 Preview
━━━━━━━━━━━━━━━━━━
【Cultivation Journey Begins】
Young Li Yun discovers a mysterious jade pendant in the mountains...
✅ AI Score: 9.0/10
✅ New Hook: H-001 Origin of mysterious jade pendant
Please confirm: Approve/Modify/Pause/End
User: Approved
AI: Storing graph...
Starting generation of episode 2...
data/pipeline_state.jsonresume_pipeline after pause