Overview
This Skill is a general-purpose creative content generation engine that supports structured creative workflows across multiple domains. Through domain-specific guides, it can adapt to different types of creative content generation needs (novels, screenplays, plans, etc.).
Core Principles
- Domain-driven — Load the writing guide for the corresponding domain based on the project configuration
- Memory-driven — Inject extensive context to ensure content consistency
- Structured generation — Generate unit by unit according to the layers defined by the domain
- Human collaboration — Request manual review at key nodes
- Progressive output — A unified two-stage process of raw generation + polishing
Prerequisite Steps (Domain Loading)
1. Read the project configuration
Use Read to read .creative/config.yaml, and obtain:
domainvalue (for example: novel, screenplay, plan)- Basic project configuration (genre, style, target word count, etc.)
If the configuration does not exist:
錯誤:未找到 .creative/config.yaml
請先執行 /creative-init 初始化專案。
2. Compute the path
From the Skill header's Base directory , compute PLUGIN_ROOT:
- PLUGIN_ROOT = Base directory with the
/skills/creative-writepart removed - For example:
/path/to/project/skills/creative-write→/path/to/project
Set the path variables:
- DOMAIN_DIR =
$PLUGIN_ROOT/shared/domains/{domain}/ - PROJECT_ROOT = project root directory (where .creative/config.yaml is located)
3. Load the domain configuration
Use Read to read $DOMAIN_DIR/domain.yaml, and obtain:
layers— The layer definitions for content generation (for example L4: scene, L5: chapter)paths— Domain-specific file path mappingsword_count— The word count range for each unitcontext_sources— Context collection source configuration
Example domain.yaml structure:
domain: novel
layers:
L4:
name: scene
unit: 場景
word_range: [1500, 3000]
L5:
name: chapter
unit: 章節
aggregation: merge_and_polish
paths:
planning: planning/
drafts: drafts/
knowledge: knowledge/
memory: memory/
context_sources:
- type: planning
priority: 1
- type: memory
priority: 2
- type: knowledge
priority: 3
4. Load the writing guide
Use Read to read $DOMAIN_DIR/write-guide.md, and obtain:
- Context collection rules
- Unit generation standards
- Quality checklist
- Memory update format
Workflow
Step 1: Pre-check
- Confirm that the project configuration has been loaded (
.creative/config.yaml) - Confirm that the status file exists (
.creative/status.json) - According to the domain's
pathsconfiguration, confirm that the planning documents already exist:- Unit list (for example novel: scene list)
- Parent outline (for example novel: chapter outline)
Error handling:
- Missing configuration → Prompt to run
/creative-init - Missing planning → Prompt to run
/creative-plan
Step 2: Context collection (memory injection)
According to the context_sources in domain.yaml and the detailed rules in write-guide.md, collect context:
General context collection framework
Collect in order of priority:
-
Planning context(required reading)
- Read the planning document for the current unit
- Read the parent structure document
-
Style constraints(required reading)
- Read the style guide document
- Ensure style consistency
-
Short-term memory(required reading)
- Read the summary of the most recently generated unit
- Ensure coherence
-
Appearing elements(as needed)
- Based on the elements involved in the current unit (characters, scenes, etc.)
- Use Grep to search the knowledge base
- Read the matching knowledge files
-
Domain settings(as needed)
- Search for relevant domain-specific settings
- Read the relevant configuration files
-
Previous content(as needed)
- If it is not the first unit, read the end of the previous content
- Ensure a natural transition
-
Mid-term memory(required for long works)
- If the content scale exceeds the threshold, read the summary files
- Use Glob to find all summaries, and read the most recent summary
Context assembly
Assemble the collected context into a structured prompt according to the format defined in write-guide.md.
Step 3: Unit-by-unit generation (L4 level)
Generate content unit by unit according to the definition of layers.L4 in domain.yaml.
Generation process
For each unit in the planning list, execute in order:
- Confirm unit settings — Read all parameters of the current unit from the planning list
- Assemble unit context — Use the information collected in Step 2 + the end of the previous unit
- Generate unit text — Generate content according to the writing standards in write-guide.md
- Write unit file — Use Write to write the original file
Unit file format
According to the format defined in write-guide.md, include YAML frontmatter and the main text.
Human Gate framework
For key units (according to the conditions defined in write-guide.md), use AskUserQuestion to request review:
關鍵單元審核請求
單元:{unit_description}
類型:{critical_type}
字數:{word_count} 字
摘要:{brief_summary}
請審核以下要點:
{review_checklist from write-guide.md}
請回覆:
- "確認" 保留當前版本
- "修改 [具體說明]" 調整特定部分
- "重寫" 重新生成此單元
Step 4: Merge and polish (L5 level)
After all L4 units are generated, perform L5-level merging and polishing.
Merge process
- Use Glob to collect all L4 unit files
- Sort by unit number
- Read all unit content
Polishing work
Execute according to the L5-level polishing standards in write-guide.md:
- Optimize transitions between units
- Consistency check
- Pacing adjustment
- Strengthen the opening and ending
Output final draft
Use Write to write the final file, with the format defined according to write-guide.md.
Word count
Check whether the total word count is within the range defined in domain.yaml, and adjust if the deviation is too large.
Step 5: Memory update + status update
According to the memory update rules in write-guide.md:
Short-term memory update
Use Edit to update the short-term memory file and add a summary of the newly generated unit.
Knowledge base update (if there are changes)
If there are new elements or changes in element status in the generated content:
- Use Edit to update the corresponding knowledge base file
Status file update
Use Edit to update .creative/status.json, recording:
- Completed units/chapters
- Current progress
- Total word count
- Last updated time
Timeline update
Use Edit to update .creative/timeline.md, recording important events.
Trigger summary generation
If the summary generation threshold is reached, prompt the user to execute /creative-memory summarize。
Parameter handling
Basic invocation
/creative-write
Automatically write the next unfinished unit group (determined based on status.json).
Specify unit group
/creative-write {unit-group-id}
Write the specified unit group (for example novel: chapter-005). If it already exists, ask whether to overwrite.
Specify sub-unit
/creative-write {unit-group-id} {sub-unit-id}
Write only a specific sub-unit (for example novel: chapter-005 scene-003). Suitable for rewriting.
Continue writing mode
/creative-write --continue
If the last writing was interrupted, continue from the interruption point.
Automatic quality check
/creative-write {unit-group-id} --auto-check
Automatically trigger after writing is completed /creative-check {unit-group-id}。
Error handling
Planning file does not exist
錯誤:找不到 {unit-group-id} 的規劃文件。
請先執行 /creative-plan 生成規劃,或手動創建:
{expected_planning_path}
Previous unit not completed
If writing unit N is requested but unit N-1 has not yet been completed:
提醒:{previous_unit} 尚未完成(status: 未開始)
建議:
1. 先完成 {previous_unit} 以確保連貫性
2. 如果確定要跳過,請回覆 "跳過"(可能影響連貫性)
Writing interruption recovery
If it is detected that a partial unit has been generated but the final draft has not been completed:
檢測到 {unit-group-id} 寫作中斷。
已完成單元:{completed_list}(共 {total_count} 個單元)
未完成單元:{pending_list}
是否從 {next_unit} 繼續?
- "繼續" 從中斷處續寫
- "重新開始" 刪除已有單元,重新寫作
Abnormal word count
According to the word count range in domain.yaml, if the unit word count is abnormal:
- Over limit: consider splitting or condensing
- Insufficient: add details or expand the content
Output path
The output path is defined by the paths configuration in domain.yaml and write-guide.md; the framework itself does not hard-code paths.
General mode:
- L4 raw unit:
{paths.drafts}/{unit-group-id}/{sub-unit-id}-raw.md - L5 final draft:
{paths.drafts}/{unit-group-id}/{unit-group-id}-final.md - Short-term memory:
{paths.memory}/recent-{units}.md - Status file:
.creative/status.json - Timeline:
.creative/timeline.md
Example interaction flow
用戶: /creative-write chapter-003
Claude:
[載入 domain: novel]
[讀取 novel/domain.yaml 和 novel/write-guide.md]
開始寫作第 3 章。
[執行上下文收集]
[讀取場景列表、章節大綱、風格指南、短期記憶]
[搜索登場角色、世界觀設定]
第 3 章共 6 個場景,預計字數 12000-15000 字。
開始場景擴寫...
---
場景 1/6:{scene_title}(字數: 2100)✓
場景 2/6:{scene_title}(字數: 2400)✓
場景 3/6:{scene_title}(字數: 1800)✓
⚠️ 場景 4 為關鍵場景,請求審核...
[等待用戶確認]
用戶: 確認
場景 4/6:{scene_title}(字數: 2800)✓
場景 5/6:{scene_title}(字數: 1600)✓
場景 6/6:{scene_title}(字數: 1900)✓
開始章節潤色...
第 3 章寫作完成!
總字數:12,700 字
單元數:6 個
品質自檢:通過
已更新:
- {paths.drafts}/chapter-003/chapter-003-final.md
- {paths.memory}/recent-scenes.md
- .creative/status.json
- .creative/timeline.md
下一步建議:
- /creative-write chapter-004 繼續寫作
- /creative-check chapter-003 進行品質檢查
- /creative-status 查看整體進度
Final reminder: This Skill is a general framework; the actual writing standards and quality requirements are defined by the domain-specific write-guide.md. If insufficient planning is discovered during the writing process, writing should be paused and the planning supplemented, rather than improvising and deviating from the plan.