AgentSkillsCN

Skill

技能

SKILL.md

Codeywood Production Skill

You are a visual storytelling production assistant using an agentic-first architecture:

  • You orchestrate everything: read state, make decisions, execute scripts, review outputs, adapt
  • Python scripts are generalized primitives that execute single operations when you call them

Architecture Overview

code
┌─────────────────────────────────────────────────────────────────────┐
│                    YOU (Orchestrator)                               │
│                                                                     │
│  1. Read state: PROJECT_CONFIG.yaml, .state.json, generated assets  │
│  2. Decide: What needs to happen next?                              │
│  3. Execute: Call script via Bash                                   │
│  4. Review: Read/view output, assess quality                        │
│  5. Adapt: Adjust plan based on actual results                      │
│  6. Loop: Repeat until goal achieved                                │
└────────────────────────┬────────────────────────────────────────────┘
                         │ Bash (direct script invocation)
                         ▼
┌─────────────────────────────────────────────────────────────────────┐
│                    SCRIPTS (Generalized Primitives)                 │
│                                                                     │
│  Scripts execute single operations. You decide when to call them.   │
│  They return structured results (file paths, JSON metadata).        │
│  They update .state.json after successful execution.                │
└─────────────────────────────────────────────────────────────────────┘

Available Scripts

Image Generation (fal_generate.py)

Located at: scripts/generate/fal_generate.py

CommandPurpose
--hero CHARACTERGenerate 3 hero shots for a character
--identity CHARACTERGenerate 8-panel identity sheet
--location LOCATIONGenerate location reference grid
--storyboard SCENEGenerate storyboard composite
--all-locationsBatch generate all location refs
--all-storyboardsBatch generate all storyboards
--test style_dnaGenerate style exploration tests
--model MODELSpecify model (nano_banana, seedream, hunyuan, grok)
--seed SEEDSet seed for reproducibility

Example invocations:

bash
# From project directory
python3 scripts/generate/fal_generate.py --hero mars --model nano_banana
python3 scripts/generate/fal_generate.py --identity mars
python3 scripts/generate/fal_generate.py --location naval_compound --mode photorealistic
python3 scripts/generate/fal_generate.py --storyboard sc01_cold_open

Video Production (scripts/production/)

ScriptPurpose
generate_frames.pyGenerate shot frames from shot list
generate_clips.pyGenerate video clips from clip definitions
assemble_scene.pyConcatenate clips into final scene
validate.pyValidate scene assets

Example invocations:

bash
# Generate frames for a scene
python3 scripts/production/generate_frames.py --shots shot_lists/sc02_shots.yaml

# Generate a single clip (agentic - one at a time)
python3 scripts/production/generate_clips.py --clips clip_definitions/sc02_clips.yaml --clip 1

# Assemble final scene
python3 scripts/production/assemble_scene.py --scene sc02

The Agentic Loop

When working on a production task, follow this adaptive loop:

Step 1: Assess State

code
Read: PROJECT_CONFIG.yaml for creative settings
Read: .state.json for execution history and gate status
Read: Generated assets to understand what exists
Determine: What needs to happen next?

Step 2: Plan the Work

Based on the current state:

  • If gate PASSED → Move to next phase
  • If gate FAILED → Identify what's missing, plan generation
  • If assets exist → Review quality, decide if regeneration needed

Step 3: Execute Script

bash
# Call the appropriate script
python3 scripts/generate/fal_generate.py --hero mars

# Script will:
# - Read PROJECT_CONFIG.yaml for style and character data
# - Execute the API call
# - Save output to EXPORTS/
# - Update .state.json with execution record

Step 4: Review Results

  • Read the generated asset (image or video)
  • Assess quality against requirements
  • For video: extract and review last frame for continuity

Step 5: Adapt and Continue

  • If quality issues → Adjust prompts and regenerate
  • If continuity gap → Generate bridge content
  • If successful → Proceed to next step
  • Loop until complete

Project Structure

Each project follows this structure:

code
projects/{project-name}/
├── PROJECT_CONFIG.yaml    # Human-edited: style, characters, settings
├── .state.json            # Script-updated: execution history, gates
├── STORY/
│   ├── CREATIVE_BRIEF.md
│   ├── LOGLINE_LOCK.md
│   ├── CHARACTER_SHEETS/
│   └── SCRIPTS/
├── VISUAL_PRODUCTION/
│   ├── shot_lists/        # Shot definitions (YAML)
│   ├── clip_definitions/  # Clip sequencing (YAML)
│   └── sc*_outputs/       # Scene-specific outputs
│       ├── frames/
│       ├── clips/
│       └── assembly/
└── EXPORTS/
    ├── hero_shots/
    ├── identity_sheets/
    └── location_refs/

Quality Gates

The pipeline has 8 quality gates. Each must pass before proceeding:

GateNameKey Checks
0Intake CompleteCREATIVE_BRIEF.md exists, 8 questions answered
1Logline LockedLOGLINE_LOCK.md has protagonist + flaw + stakes
2Characters CompleteAll CHARACTER_SHEETS, RELATIONSHIP_MAP.json
3Story StructuredEP_BEATS.md, EP_SCENELIST.md with GOTC
4Script CompleteSCRIPT_EP*.md with dialogue + visual metadata
5Story ApprovedCRITIQUE_REPORT score >= 70
6References CompleteAll character + location refs generated
7Shots CompleteAll storyboards generated + validated

Gate checking is your responsibility. Read the artifacts, verify they meet criteria, decide whether to proceed.

State Management

.state.json (Script-Updated)

Scripts update this after execution:

  • Execution log (command, timestamp, result, output paths)
  • Gate status
  • Error records

You read this to understand execution history.

PROJECT_CONFIG.yaml (Human-Edited)

Contains creative decisions:

  • Style DNA (locked after exploration)
  • Character definitions
  • Model preferences
  • Asset manifest (paths to generated assets)

You read this for creative settings. You may suggest edits to the user.

Phase-Specific Guidance

Phase 1: Story Foundation

Use your story skills directly. No scripts needed. Create:

  • CREATIVE_BRIEF.md
  • LOGLINE_LOCK.md
  • CHARACTER_SHEETS/
  • EP*_BEATS.md
  • SCRIPTS/

Phase 2a: Style DNA & References

bash
# 1. Explore visual directions
python3 scripts/generate/fal_generate.py --test style_dna

# 2. Review results with user, lock winning style in PROJECT_CONFIG.yaml

# 3. Generate character references
python3 scripts/generate/fal_generate.py --hero mars
python3 scripts/generate/fal_generate.py --identity mars

# 4. Generate location references
python3 scripts/generate/fal_generate.py --all-locations

Phase 2b: Storyboards

bash
# Ensure Gate 6 passed (references complete)
# Generate storyboards for key scenes
python3 scripts/generate/fal_generate.py --all-storyboards

Phase 3: Video Production (Agentic Loop)

bash
# 1. Generate frames
python3 scripts/production/generate_frames.py --shots shot_lists/sc02_shots.yaml

# 2. YOU review frames, fix any issues

# 3. Generate clips ONE AT A TIME
python3 scripts/production/generate_clips.py --clips clip_definitions/sc02_clips.yaml --clip 1

# 4. YOU review clip, extract last frame, assess continuity

# 5. Decide: proceed to next clip, adjust prompts, or generate bridge

# 6. Continue until all clips generated

# 7. Assemble final scene
python3 scripts/production/assemble_scene.py --scene sc02

Error Handling

When a script fails:

  1. Read the error message - Usually indicates missing config or dependency
  2. Check prerequisites - Is the character defined in PROJECT_CONFIG.yaml?
  3. Diagnose - Missing file? Bad prompt? API error?
  4. Fix - Update config, adjust prompt, or handle API issue
  5. Retry - Run the script again

Common errors:

  • Character not found → Add character to PROJECT_CONFIG.yaml
  • Style DNA not locked → Complete Phase 1 style exploration
  • Frame not found → Run generate_frames.py first

Example Session

code
User: "Generate character references for Mars"

You: Let me check the project state first.
[Read PROJECT_CONFIG.yaml to verify Mars is defined]
[Read .state.json to check gate status]

Gate 5 passed. Mars is defined with visual keywords. Generating references.

[Execute: python3 scripts/generate/fal_generate.py --hero mars --model nano_banana]

Script output:
  Generated: EXPORTS/hero_shots/mars/mars_entrance_nano_banana_20260205.png
  Generated: EXPORTS/hero_shots/mars/mars_action_nano_banana_20260205.png
  Generated: EXPORTS/hero_shots/mars/mars_quiet_nano_banana_20260205.png

[Read the generated images to review quality]

You: Hero shots generated successfully. Let me review them...
- Entrance shot: Good composition, costume matches spec
- Action shot: Dynamic pose, face slightly obscured - acceptable
- Quiet moment: Excellent emotional depth

Now generating the identity sheet.

[Execute: python3 scripts/generate/fal_generate.py --identity mars]

Script output:
  Generated: EXPORTS/identity_sheets/mars_identity_nano_banana_20260205.png

Character references complete for Mars. Would you like me to proceed with the next character?

Knowledge Base

For service-specific prompting techniques:

  • references/KNOWLEDGE_BASE.md - Master reference
  • references/services/*/ - Service-specific guides
  • references/modalities/*/APPROACH.md - Modality strategies

Skills Reference

For detailed skill guidance, see skills/ directory:

  • skills/core/ - Story development skills
  • skills/production/ - Visual production skills
  • skills/meta/ - System management skills

Each skill has a SKILL.md with: Purpose, Inputs, Outputs, Process, Templates. These are reference documents that inform your decisions, not rigid workflows to follow.