Shorts Builder

v1.0.1

Story generation pipeline skill. Supports multi-episode continuous generation, graph management, AI quality check + human confirmation dual control mechanism...

0· 290·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for hexidyg/shorts-builder.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Shorts Builder" (hexidyg/shorts-builder) from ClawHub.
Skill page: https://clawhub.ai/hexidyg/shorts-builder
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Canonical install target

openclaw skills install hexidyg/shorts-builder

ClawHub CLI

Package manager switcher

npx clawhub@latest install shorts-builder
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
high confidence
!
Purpose & Capability
The skill's declared name ('Shorts Builder') and the SKILL.md top-name ('story-pipeline') differ from the repository contents, which implement a story generation pipeline — this is probably just naming drift but is an inconsistency. SKILL.md and some documentation state the graph is accessed via a remote API, yet the included graph_manager implementation uses local JSON files under data/graphs. The registry says "instruction-only"/no install spec, but multiple Python modules are bundled. These mismatches are not clearly malicious but are incoherent and warrant scrutiny.
Instruction Scope
The runtime instructions and code are consistent about reading/writing pipeline_state.json and graph JSON files and about sending prompts to an LLM for generation and review. However, SKILL.md's prose claims an AI retry limit of 3 tries while the pipeline implementation allows unlimited AI retries; the SKILL.md also mentions "call remote API" for graph queries while the code is purely local. Important: the AI review prompts include full episode content and graph data, so story content is sent to whatever LLM/review system the agent uses — this may expose sensitive or private text.
Install Mechanism
No install spec is declared (lowest install risk), but executable Python modules are bundled with the skill. There are no downloads or external install steps in the manifest. Presence of code files without an install spec is unusual but not inherently dangerous; it means the agent will run local code shipped with the skill.
Credentials
The skill requests no environment variables or external credentials and the code does not read env vars. This is proportionate to a local story pipeline. One caveat: the skill will generate prompts that include story content and graph state which will be sent to the agent's LLM/AI provider — that is expected but may leak content to external model providers.
!
Persistence & Privilege
The code persistently writes and deletes files under data/ (pipeline_state.json and data/graphs/*.json). This is expected for a stateful pipeline, but it means generated content and any user-supplied text are stored on disk indefinitely unless deleted. The skill also supports delete_graph which removes files. While not excessive for this purpose, users should be aware of on-disk persistence and ensure storage location and retention are acceptable.
What to consider before installing
This package generally implements a local story-generation pipeline and is not obviously malicious, but there are several mismatches you should review before installing: - Naming and manifest mismatches: the registry name ('Shorts Builder') and the SKILL.md/internal module name differ; the registry says "instruction-only" but the package contains runnable Python code. Treat this as a signal to verify origin. - Docs vs code inconsistencies: SKILL.md mentions a remote Graph API and a 3-retry limit for AI review, but the code uses local JSON files for graph storage and allows unlimited AI retries. If you rely on the 3-retry limit or remote storage, update/verify the implementation. - Data persistence: generated content and all pipeline state are written to data/pipeline_state.json and data/graphs/*.json. These files may contain any text you or users include. If that is sensitive, run the skill in an isolated environment or configure storage/retention policies. - Exposure to LLM provider: the AI-review prompts include full episode content and graph data — the agent will send those to whichever LLM it uses. If you have confidentiality concerns, avoid sending private data or run using a private model. Recommendations before enabling/installing: - Inspect the code locally (you already have it) and search for any network calls (requests, socket, urllib, etc.). The provided files show no obvious remote HTTP calls, but double-check for dynamically imported modules or later changes. - Run the skill in a sandboxed agent or VM to observe file writes and outbound network activity. - If you need the 3-retry limit or remote graph storage, update the pipeline.py/graph_manager implementations accordingly. - If you are concerned about persistent storage of story content, either relocate data/ to an encrypted or temporary directory or add a data-retention/auto-delete feature. If you want, I can produce a short checklist or specific code edits to enforce a retry limit, disable disk persistence, or log all outbound requests for safer operation.

Like a lobster shell, security has layers — review code before you run it.

latestvk972bt7fe8xrsj57n14hemtg4982dkrh
290downloads
0stars
2versions
Updated 1mo ago
v1.0.1
MIT-0

Story Generation Pipeline Skill

Features

This skill implements a complete story generation pipeline:

  1. Continuous Episode Generation - Automatically generates next episode based on previous content
  2. Graph Management - Storage and querying of character, scene, and hook relationships
  3. Dual Confirmation Control - AI quality check followed by human confirmation
  4. State Persistence - Supports pause, resume, and multiple parallel stories

Core Workflow

┌──────────────┐    ┌──────────────┐    ┌──────────────┐    ┌──────────────────┐
│ Generate Ep N│ -> │ AI Review    │ -> │ Graph Storage│ -> │ Wait Human Confirm│
└──────────────┘    └──────────────┘    └──────────────┘    └──────────────────┘
       │                   │                   │                      │
       ▼                   ▼                   ▼                      ▼
  Query Graph         Pass/Retry        Store Relations        Continue/Modify/End

Usage

Start New Pipeline

User: Start a new story pipeline, theme: Chinese girl comeback, target episodes: 10

Continue Pipeline

User: Continue story pipeline [pipeline_id]

User Confirmation Actions

User: Approved, continue to next episode
User: Modify: [specific feedback]
User: Pause
User: End

Dual Confirmation Control Mechanism

Layer 1: AI Quality Check

After each episode is generated, AI automatically checks:

Check ItemDescription
Plot CoherenceNatural connection with previous episode
Character ConsistencyCharacter behavior matches established traits
Hook HandlingReasonable addition/closure of hooks
Pacing ControlAppropriate plot progression speed
Emotional CurveReasonable emotional ups and downs

Scoring Standard: 0-10 points, below 7 triggers retry (max 3 times)

Layer 2: Human Confirmation

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
━━━━━━━━━━━━━━━━━━━━━━━━

Graph Management

Graph Query

Before generating episode N, query episode N-1's graph:

graph_manager.query_graph(pipeline_id, episode=N-1)

Returns:

  • Complete content of previous episode
  • Character list and their statuses
  • Unclosed hooks
  • Key scenes
  • Relationship network

Graph Storage

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)


State Management

State File: 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 Types

StatusDescription
generatingCurrently generating
ai_reviewingAI review in progress
waiting_user_confirmWaiting for human confirmation
pausedPaused
completedCompleted
errorError state

Script Description

pipeline.py - Main Control Loop

  • Initialize pipeline
  • Coordinate modules
  • Handle user commands
  • Manage loop state

ai_reviewer.py - AI Quality Check

  • Execute quality scoring
  • Generate review report
  • Determine pass/fail

episode_generator.py - Episode Generation

  • Generate new episode based on graph context
  • Handle hook continuation and closure
  • Handle retry logic

graph_manager.py - Graph Management

  • Graph query (call remote API)
  • Graph storage (call remote API)
  • Local cache management

API Description

Graph API

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..."
}

Episode Generation Logic

First Episode Generation

Based on user-provided theme and goals, generate:

  • Main character settings
  • Initial scenes
  • Core conflict
  • Open hooks

Subsequent Episode Generation

Based on graph query results:

  1. Read previous episode content and unclosed hooks
  2. Continue main plot line
  3. Handle hooks (continue/close/add)
  4. Advance character growth arc
  5. Adjust emotional curve

Finale Generation

When target episodes reached or user requests end:

  • Close all remaining hooks
  • Complete character growth arcs
  • Generate conclusive ending

Important Notes

  1. Retry Mechanism - Max 3 retries when AI review fails
  2. Pause/Resume - Can resume via pipeline_id after pause
  3. Multiple Pipelines - Supports running multiple different-themed pipelines simultaneously
  4. Graph Consistency - Ensure correct character and hook relationships
  5. Hook Management - Track creation and closure status of each hook

Complete Workflow

Step 1: Create Pipeline

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

Step 2: Generate Episode

AI calls start_generation(pipeline_id) to get generation prompt, then generates episode content based on the prompt.

Step 3: Submit AI Review

AI calls submit_episode(pipeline_id, episode, content) to submit generated content, then executes AI review.

Step 4: Process Review Result

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).

Step 5: Wait User Confirmation

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

Step 6: Process User Confirmation

After user confirms, AI calls user_confirm(pipeline_id, action, note):

  • approve: Store graph, prepare next episode
  • modify: Regenerate based on feedback
  • pause: Pause pipeline
  • end: End pipeline

Step 7: Loop Generation

Repeat steps 2-6 until target episodes reached or user ends.


API Reference

Create Pipeline

create_pipeline(theme: str, target_episodes: int, style: str = "realistic cinematic")
# Returns: {"success": True, "pipeline_id": "...", "message": "..."}

Start Generation

start_generation(pipeline_id: str)
# Returns: {"success": True, "episode": N, "prompt": "generation prompt"}

Submit Episode

submit_episode(pipeline_id: str, episode: int, content: str)
# Returns: {"success": True, "review_prompt": "review prompt"}

Process AI Review

process_ai_review(pipeline_id: str, episode: int, ai_result: str, content: str)
# Returns: {"success": True, "passed": True/False, ...}

User Confirm

user_confirm(pipeline_id: str, action: str, note: str = None)
# action: "approve" / "modify" / "pause" / "end"
# Returns: {"success": True, "status": "...", ...}

Get Status

get_status(pipeline_id: str)
# Returns: Current pipeline status info

List Pipelines

list_pipelines()
# Returns: List of all pipelines

Resume Pipeline

resume_pipeline(pipeline_id: str)
# Returns: Resume result

Example Dialogue

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...

Important Notes

  1. Retry Mechanism: Max 3 retries when AI review fails
  2. State Persistence: All states saved in data/pipeline_state.json
  3. Graph Storage: Stored via remote API, requires network connection
  4. Pause/Resume: Can resume via resume_pipeline after pause
  5. Multiple Pipelines: Supports running multiple different-themed pipelines simultaneously

Comments

Loading comments...