@laitszkin/apollo-toolkit 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/AGENTS.md +62 -0
  2. package/CHANGELOG.md +100 -0
  3. package/LICENSE +21 -0
  4. package/README.md +144 -0
  5. package/align-project-documents/SKILL.md +94 -0
  6. package/align-project-documents/agents/openai.yaml +4 -0
  7. package/analyse-app-logs/LICENSE +21 -0
  8. package/analyse-app-logs/README.md +126 -0
  9. package/analyse-app-logs/SKILL.md +121 -0
  10. package/analyse-app-logs/agents/openai.yaml +4 -0
  11. package/analyse-app-logs/references/investigation-checklist.md +58 -0
  12. package/analyse-app-logs/references/log-signal-patterns.md +52 -0
  13. package/answering-questions-with-research/SKILL.md +46 -0
  14. package/answering-questions-with-research/agents/openai.yaml +4 -0
  15. package/bin/apollo-toolkit.js +7 -0
  16. package/commit-and-push/LICENSE +21 -0
  17. package/commit-and-push/README.md +26 -0
  18. package/commit-and-push/SKILL.md +70 -0
  19. package/commit-and-push/agents/openai.yaml +4 -0
  20. package/commit-and-push/references/branch-naming.md +15 -0
  21. package/commit-and-push/references/commit-messages.md +19 -0
  22. package/deep-research-topics/LICENSE +21 -0
  23. package/deep-research-topics/README.md +43 -0
  24. package/deep-research-topics/SKILL.md +84 -0
  25. package/deep-research-topics/agents/openai.yaml +4 -0
  26. package/develop-new-features/LICENSE +21 -0
  27. package/develop-new-features/README.md +52 -0
  28. package/develop-new-features/SKILL.md +105 -0
  29. package/develop-new-features/agents/openai.yaml +4 -0
  30. package/develop-new-features/references/testing-e2e.md +35 -0
  31. package/develop-new-features/references/testing-integration.md +42 -0
  32. package/develop-new-features/references/testing-property-based.md +44 -0
  33. package/develop-new-features/references/testing-unit.md +37 -0
  34. package/discover-edge-cases/CHANGELOG.md +19 -0
  35. package/discover-edge-cases/LICENSE +21 -0
  36. package/discover-edge-cases/README.md +87 -0
  37. package/discover-edge-cases/SKILL.md +124 -0
  38. package/discover-edge-cases/agents/openai.yaml +4 -0
  39. package/discover-edge-cases/references/architecture-edge-cases.md +41 -0
  40. package/discover-edge-cases/references/code-edge-cases.md +46 -0
  41. package/docs-to-voice/.env.example +106 -0
  42. package/docs-to-voice/CHANGELOG.md +71 -0
  43. package/docs-to-voice/LICENSE +21 -0
  44. package/docs-to-voice/README.md +118 -0
  45. package/docs-to-voice/SKILL.md +107 -0
  46. package/docs-to-voice/agents/openai.yaml +4 -0
  47. package/docs-to-voice/scripts/docs_to_voice.py +1385 -0
  48. package/docs-to-voice/scripts/docs_to_voice.sh +11 -0
  49. package/docs-to-voice/tests/test_docs_to_voice_api_max_chars.py +210 -0
  50. package/docs-to-voice/tests/test_docs_to_voice_sentence_timeline.py +115 -0
  51. package/docs-to-voice/tests/test_docs_to_voice_settings.py +43 -0
  52. package/docs-to-voice/tests/test_docs_to_voice_speech_rate.py +57 -0
  53. package/enhance-existing-features/CHANGELOG.md +35 -0
  54. package/enhance-existing-features/LICENSE +21 -0
  55. package/enhance-existing-features/README.md +54 -0
  56. package/enhance-existing-features/SKILL.md +120 -0
  57. package/enhance-existing-features/agents/openai.yaml +4 -0
  58. package/enhance-existing-features/references/e2e-tests.md +25 -0
  59. package/enhance-existing-features/references/integration-tests.md +30 -0
  60. package/enhance-existing-features/references/property-based-tests.md +33 -0
  61. package/enhance-existing-features/references/unit-tests.md +29 -0
  62. package/feature-propose/LICENSE +21 -0
  63. package/feature-propose/README.md +23 -0
  64. package/feature-propose/SKILL.md +107 -0
  65. package/feature-propose/agents/openai.yaml +4 -0
  66. package/feature-propose/references/enhancement-features.md +25 -0
  67. package/feature-propose/references/important-features.md +25 -0
  68. package/feature-propose/references/mvp-features.md +25 -0
  69. package/feature-propose/references/performance-features.md +25 -0
  70. package/financial-research/SKILL.md +208 -0
  71. package/financial-research/agents/openai.yaml +4 -0
  72. package/financial-research/assets/weekly_market_report_template.md +45 -0
  73. package/fix-github-issues/SKILL.md +98 -0
  74. package/fix-github-issues/agents/openai.yaml +4 -0
  75. package/fix-github-issues/scripts/list_issues.py +148 -0
  76. package/fix-github-issues/tests/test_list_issues.py +127 -0
  77. package/generate-spec/LICENSE +21 -0
  78. package/generate-spec/README.md +61 -0
  79. package/generate-spec/SKILL.md +96 -0
  80. package/generate-spec/agents/openai.yaml +4 -0
  81. package/generate-spec/references/templates/checklist.md +78 -0
  82. package/generate-spec/references/templates/spec.md +55 -0
  83. package/generate-spec/references/templates/tasks.md +35 -0
  84. package/generate-spec/scripts/create-specs +123 -0
  85. package/harden-app-security/CHANGELOG.md +27 -0
  86. package/harden-app-security/LICENSE +21 -0
  87. package/harden-app-security/README.md +46 -0
  88. package/harden-app-security/SKILL.md +127 -0
  89. package/harden-app-security/agents/openai.yaml +4 -0
  90. package/harden-app-security/references/agent-attack-catalog.md +117 -0
  91. package/harden-app-security/references/common-software-attack-catalog.md +168 -0
  92. package/harden-app-security/references/red-team-extreme-scenarios.md +81 -0
  93. package/harden-app-security/references/risk-checklist.md +78 -0
  94. package/harden-app-security/references/security-test-patterns-agent.md +101 -0
  95. package/harden-app-security/references/security-test-patterns-finance.md +88 -0
  96. package/harden-app-security/references/test-snippets.md +73 -0
  97. package/improve-observability/SKILL.md +114 -0
  98. package/improve-observability/agents/openai.yaml +4 -0
  99. package/learn-skill-from-conversations/CHANGELOG.md +15 -0
  100. package/learn-skill-from-conversations/LICENSE +22 -0
  101. package/learn-skill-from-conversations/README.md +47 -0
  102. package/learn-skill-from-conversations/SKILL.md +85 -0
  103. package/learn-skill-from-conversations/agents/openai.yaml +4 -0
  104. package/learn-skill-from-conversations/scripts/extract_recent_conversations.py +369 -0
  105. package/learn-skill-from-conversations/tests/test_extract_recent_conversations.py +176 -0
  106. package/learning-error-book/SKILL.md +112 -0
  107. package/learning-error-book/agents/openai.yaml +4 -0
  108. package/learning-error-book/assets/error_book_template.md +66 -0
  109. package/learning-error-book/scripts/render_markdown_to_pdf.py +367 -0
  110. package/lib/cli.js +338 -0
  111. package/lib/installer.js +225 -0
  112. package/maintain-project-constraints/SKILL.md +109 -0
  113. package/maintain-project-constraints/agents/openai.yaml +4 -0
  114. package/maintain-skill-catalog/README.md +18 -0
  115. package/maintain-skill-catalog/SKILL.md +66 -0
  116. package/maintain-skill-catalog/agents/openai.yaml +4 -0
  117. package/novel-to-short-video/CHANGELOG.md +53 -0
  118. package/novel-to-short-video/LICENSE +21 -0
  119. package/novel-to-short-video/README.md +63 -0
  120. package/novel-to-short-video/SKILL.md +233 -0
  121. package/novel-to-short-video/agents/openai.yaml +4 -0
  122. package/novel-to-short-video/references/plan-template.md +71 -0
  123. package/novel-to-short-video/references/roles-json.md +41 -0
  124. package/open-github-issue/LICENSE +21 -0
  125. package/open-github-issue/README.md +97 -0
  126. package/open-github-issue/SKILL.md +119 -0
  127. package/open-github-issue/agents/openai.yaml +4 -0
  128. package/open-github-issue/scripts/open_github_issue.py +380 -0
  129. package/open-github-issue/tests/test_open_github_issue.py +159 -0
  130. package/open-source-pr-workflow/CHANGELOG.md +32 -0
  131. package/open-source-pr-workflow/LICENSE +21 -0
  132. package/open-source-pr-workflow/README.md +23 -0
  133. package/open-source-pr-workflow/SKILL.md +123 -0
  134. package/open-source-pr-workflow/agents/openai.yaml +4 -0
  135. package/openai-text-to-image-storyboard/.env.example +10 -0
  136. package/openai-text-to-image-storyboard/CHANGELOG.md +49 -0
  137. package/openai-text-to-image-storyboard/LICENSE +21 -0
  138. package/openai-text-to-image-storyboard/README.md +99 -0
  139. package/openai-text-to-image-storyboard/SKILL.md +107 -0
  140. package/openai-text-to-image-storyboard/agents/openai.yaml +4 -0
  141. package/openai-text-to-image-storyboard/scripts/generate_storyboard_images.py +763 -0
  142. package/package.json +36 -0
  143. package/record-spending/SKILL.md +113 -0
  144. package/record-spending/agents/openai.yaml +4 -0
  145. package/record-spending/references/account-format.md +33 -0
  146. package/record-spending/references/workbook-layout.md +84 -0
  147. package/resolve-review-comments/SKILL.md +122 -0
  148. package/resolve-review-comments/agents/openai.yaml +4 -0
  149. package/resolve-review-comments/references/adoption-criteria.md +23 -0
  150. package/resolve-review-comments/scripts/review_threads.py +425 -0
  151. package/resolve-review-comments/tests/test_review_threads.py +74 -0
  152. package/review-change-set/LICENSE +21 -0
  153. package/review-change-set/README.md +55 -0
  154. package/review-change-set/SKILL.md +103 -0
  155. package/review-change-set/agents/openai.yaml +4 -0
  156. package/review-codebases/LICENSE +21 -0
  157. package/review-codebases/README.md +67 -0
  158. package/review-codebases/SKILL.md +109 -0
  159. package/review-codebases/agents/openai.yaml +4 -0
  160. package/scripts/install_skills.ps1 +283 -0
  161. package/scripts/install_skills.sh +262 -0
  162. package/scripts/validate_openai_agent_config.py +194 -0
  163. package/scripts/validate_skill_frontmatter.py +110 -0
  164. package/specs-to-project-docs/LICENSE +21 -0
  165. package/specs-to-project-docs/README.md +57 -0
  166. package/specs-to-project-docs/SKILL.md +111 -0
  167. package/specs-to-project-docs/agents/openai.yaml +4 -0
  168. package/specs-to-project-docs/references/templates/architecture.md +29 -0
  169. package/specs-to-project-docs/references/templates/configuration.md +29 -0
  170. package/specs-to-project-docs/references/templates/developer-guide.md +33 -0
  171. package/specs-to-project-docs/references/templates/docs-index.md +39 -0
  172. package/specs-to-project-docs/references/templates/features.md +25 -0
  173. package/specs-to-project-docs/references/templates/getting-started.md +38 -0
  174. package/specs-to-project-docs/references/templates/readme.md +49 -0
  175. package/systematic-debug/LICENSE +21 -0
  176. package/systematic-debug/README.md +81 -0
  177. package/systematic-debug/SKILL.md +59 -0
  178. package/systematic-debug/agents/openai.yaml +4 -0
  179. package/text-to-short-video/.env.example +36 -0
  180. package/text-to-short-video/LICENSE +21 -0
  181. package/text-to-short-video/README.md +82 -0
  182. package/text-to-short-video/SKILL.md +221 -0
  183. package/text-to-short-video/agents/openai.yaml +4 -0
  184. package/text-to-short-video/scripts/enforce_video_aspect_ratio.py +350 -0
  185. package/version-release/CHANGELOG.md +53 -0
  186. package/version-release/LICENSE +21 -0
  187. package/version-release/README.md +28 -0
  188. package/version-release/SKILL.md +94 -0
  189. package/version-release/agents/openai.yaml +4 -0
  190. package/version-release/references/branch-naming.md +15 -0
  191. package/version-release/references/changelog-writing.md +8 -0
  192. package/version-release/references/commit-messages.md +19 -0
  193. package/version-release/references/readme-writing.md +12 -0
  194. package/version-release/references/semantic-versioning.md +12 -0
  195. package/video-production/CHANGELOG.md +104 -0
  196. package/video-production/LICENSE +18 -0
  197. package/video-production/README.md +68 -0
  198. package/video-production/SKILL.md +213 -0
  199. package/video-production/agents/openai.yaml +4 -0
  200. package/video-production/references/plan-template.md +54 -0
  201. package/video-production/references/roles-json.md +41 -0
  202. package/weekly-financial-event-report/SKILL.md +195 -0
  203. package/weekly-financial-event-report/agents/openai.yaml +4 -0
  204. package/weekly-financial-event-report/assets/financial_event_report_template.md +53 -0
@@ -0,0 +1,233 @@
1
+ ---
2
+ name: novel-to-short-video
3
+ description: Convert novel text into a loopable short-form video by extracting the single most compelling story segment, generating images and voiceover, and assembling a Remotion render. Use when users ask to turn novels or chapters into a 50-60 second narrative short, teaser reel, or looping story clip that feels self-contained yet leaves strong lingering curiosity.
4
+ ---
5
+
6
+ # Novel to Short Video
7
+
8
+ ## Dependencies
9
+
10
+ - Required: `openai-text-to-image-storyboard`, `docs-to-voice`, and `remotion-best-practices` in that order.
11
+ - Conditional: none.
12
+ - Optional: none.
13
+ - Fallback: If any required video-production dependency is unavailable, stop and report the missing dependency instead of substituting another pipeline.
14
+
15
+ ## Standards
16
+
17
+ - Evidence: Choose exactly one self-contained highlight segment from the novel using explicit tension and standalone-story criteria.
18
+ - Execution: Create the plan file, obtain explicit approval, maintain `roles.json`, then generate images, narration, and the final render in sequence.
19
+ - Quality: Keep duration at 50-60 seconds, narration pacing at 3-4 CJK chars per second, and preserve loop closure plus role consistency.
20
+ - Output: Return the approved plan path, role and prompt files, pacing proof, retained Remotion workspace, and final rendered video path.
21
+
22
+ ## Required Inputs
23
+
24
+ Collect the minimum required inputs before execution:
25
+
26
+ - `project_dir` (absolute path)
27
+ - `content_name` (output folder/video name)
28
+ - novel content (raw text or file path)
29
+ - output orientation/resolution (default: vertical 1080x1920)
30
+ - narration language/voice preferences when provided
31
+
32
+ If critical inputs are missing, ask concise follow-up questions.
33
+
34
+ ## Workflow
35
+
36
+ ### 1) Extract one highlight segment
37
+
38
+ - Parse the novel and list candidate high-tension segments.
39
+ - Score each segment by conflict intensity, stakes, emotional swing, turning-point value, visual concreteness, standalone readability, and cliffhanger potential.
40
+ - Select exactly **1** segment with the strongest overall dramatic impact.
41
+ - Reject segments that cannot be understood without heavy external context from other chapters.
42
+ - Prefer segments that can deliver a complete mini-arc while still leaving one meaningful unresolved question.
43
+ - Keep a structured segment sheet:
44
+ - `title`
45
+ - `source_excerpt`
46
+ - `core_conflict`
47
+ - `tension_arc` (setup -> escalation -> climax -> aftershock)
48
+ - `standalone_story_basis`
49
+ - `lingering_question`
50
+ - `visual_beats`
51
+ - `narration_key_line`
52
+
53
+ ### 2) Generate a pre-production plan markdown (required)
54
+
55
+ - Before image/voice/video generation, create:
56
+ - `<project_dir>/docs/plans/`
57
+ - `<project_dir>/docs/plans/<YYYY-MM-DD>-<chapter_slug>.md`
58
+ - `chapter_slug` should come from the chapter name/number and be filesystem-safe.
59
+ - Build the plan content from template file:
60
+ - `references/plan-template.md`
61
+ - The plan markdown must include:
62
+ - selected highlight segment details,
63
+ - narration script and beat-level timing for the full video,
64
+ - narration pacing target (3-4 chars/second) and expected character count budget,
65
+ - standalone-story check and lingering-question design,
66
+ - image assets that will be generated for the segment,
67
+ - beat-level special-effect cues with intensity guardrails for audience focus.
68
+ - All template guidance/placeholders must be wrapped in square brackets (for example `[fill_this]`).
69
+ - After filling content, remove every placeholder/guidance marker from the final plan file.
70
+ - Enforce 1:1 mapping: one selected highlight segment must map to one full 50-60 second video.
71
+
72
+ ### 3) Request user approval before execution (required)
73
+
74
+ - Present the generated plan markdown to the user (path + concise summary).
75
+ - Ask for explicit approval.
76
+ - Do not start image/voice/render execution until user explicitly agrees.
77
+ - If user asks for edits, update the plan and request approval again.
78
+
79
+ ### 4) Build a loopable 50-60s script
80
+
81
+ - Produce one short video with total duration in **50-60 seconds**.
82
+ - Keep narration pacing in **3-4 CJK characters per second** (ignore spaces/punctuation in counting).
83
+ - For a 50-60 second output, keep narration around **150-240 CJK characters**.
84
+ - Build pacing within the same segment using beat progression (hook -> escalation -> climax -> loop closure).
85
+ - Make the segment self-contained as a mini-story:
86
+ - viewers can understand setup, conflict, turning point, and immediate outcome without prior chapter context,
87
+ - the narration provides enough context in-line rather than relying on outside exposition.
88
+ - Write narration so:
89
+ - first sentence is the hook,
90
+ - final sentence closes the loop by reusing or tightly paraphrasing the first sentence,
91
+ - ending still leaves one unresolved high-stakes question so viewers feel lingering curiosity.
92
+ - Ensure the final visual beat can cut/fade back to the opening frame naturally.
93
+ - Use the plan markdown as the source of truth and keep beat order aligned with it.
94
+
95
+ If producing multiple short videos in one request, enforce the same 50-60 second duration for each output.
96
+
97
+ ### 5) Create `roles.json` for recurring character prompts (required)
98
+
99
+ - Before creating/updating `roles.json`, read:
100
+ - `references/roles-json.md`
101
+ - Create directory if missing:
102
+ - `<project_dir>/roles/`
103
+ - Create `roles.json` under:
104
+ - `<project_dir>/roles/roles.json`
105
+ - If `roles.json` does not exist, create it first before any `prompts.json` planning or generation.
106
+ - If `roles.json` already exists, read existing role prompts first and reuse matching roles.
107
+ - If a required role is missing, append a new role prompt entry for that role (do not overwrite existing entries).
108
+ - Save recurring character prompt skeletons using the schema in `references/roles-json.md`.
109
+ - Treat this file as the shared role registry for both short-video and long-video workflows in the same project.
110
+ - If the selected segment has no recurring roles, still create `roles.json` with `{"characters": []}`.
111
+ - Keep role IDs stable and reuse them in every scene prompt.
112
+
113
+ ### 6) Generate storyboard images (`openai-text-to-image-storyboard`)
114
+
115
+ - Create `prompts.json` under:
116
+ - `<project_dir>/pictures/<content_name>/prompts.json`
117
+ - Use the structured JSON prompt format from `openai-text-to-image-storyboard`.
118
+ - Copy top-level `characters` from the final `roles.json` (reused + newly appended roles), then build beat-aligned `scenes` in narrative order.
119
+ - Ensure prompts match the image list defined in the plan markdown.
120
+ - Generate images with:
121
+
122
+ ```bash
123
+ python /Users/tszkinlai/.codex/skills/openai-text-to-image-storyboard/scripts/generate_storyboard_images.py \
124
+ --project-dir "<project_dir>" \
125
+ --env-file /Users/tszkinlai/.codex/skills/openai-text-to-image-storyboard/.env \
126
+ --content-name "<content_name>" \
127
+ --prompts-file "<project_dir>/pictures/<content_name>/prompts.json"
128
+ ```
129
+
130
+ ### 7) Generate narration and subtitles (`docs-to-voice`)
131
+
132
+ - Use the loop script text as narration input.
133
+ - Generate audio + timeline + SRT:
134
+
135
+ ```bash
136
+ python /Users/tszkinlai/.codex/skills/docs-to-voice/scripts/docs_to_voice.py \
137
+ --project-dir "<project_dir>" \
138
+ --project-name "<content_name>" \
139
+ --text "<loop_narration_script>"
140
+ ```
141
+
142
+ - Enforce pacing validation after each generation:
143
+ - Read `audio_duration_seconds` from generated `.timeline.json`.
144
+ - Compute `chars_per_second = cjk_char_count(loop_narration_script) / audio_duration_seconds`.
145
+ - Target range is **3.0-4.0 chars/second**.
146
+ - If out of range, regenerate with adjustment (max 3 attempts):
147
+ - `say` mode: tune `--rate` (increase when `<3.0`, decrease when `>4.0`).
148
+ - `api` mode: keep voice/model fixed and adjust script length to pull pacing back into range.
149
+ - Do not proceed to Remotion render until narration pacing is within target range.
150
+
151
+ ### 8) Compose and render (`remotion-best-practices`)
152
+
153
+ - Build or reuse Remotion workspace:
154
+ - `<project_dir>/video/<content_name>/remotion/`
155
+ - Load Remotion rules as needed (at minimum):
156
+ - `rules/compositions.md`
157
+ - `rules/audio.md`
158
+ - `rules/subtitles.md`
159
+ - `rules/transitions.md`
160
+ - `rules/animations.md`
161
+ - `rules/text-animations.md`
162
+ - `rules/light-leaks.md`
163
+ - Implement beat sequencing with subtitle sync from SRT.
164
+ - Keep one contiguous narrative segment so the plan's segment-to-video mapping remains valid.
165
+ - Apply attention-retention effects according to the approved beat plan:
166
+ - hook beat uses quick visual emphasis (for example punch-in, kinetic subtitle, or parallax),
167
+ - escalation/climax beats use one dominant impact effect each (for example shake, flash, light leak, or speed ramp),
168
+ - loop-closure beat reduces effect intensity and transitions cleanly back to the opening frame.
169
+ - Keep effect density controlled:
170
+ - do not stack multiple high-intensity effects at the same time,
171
+ - avoid aggressive flashing that harms subtitle readability.
172
+ - Add loop closure in the tail section:
173
+ - final 1-2 seconds visually connect back to opening shot,
174
+ - final spoken line closes back to opening hook.
175
+ - Render MP4 output to:
176
+ - `<project_dir>/video/<content_name>/renders/`
177
+
178
+ ### 9) Keep Remotion project and enforce `.gitignore`
179
+
180
+ Preserve Remotion project sources for user revisions. Do not delete project files after rendering.
181
+
182
+ Ensure `<project_dir>/video/<content_name>/remotion/.gitignore` includes at least:
183
+
184
+ ```gitignore
185
+ node_modules/
186
+ out/
187
+ dist/
188
+ .cache/
189
+ *.log
190
+ .DS_Store
191
+ ```
192
+
193
+ ## Output Contract
194
+
195
+ Return:
196
+
197
+ - selected highlight-segment summary (with why it was selected)
198
+ - proof note that the segment is self-contained and why the ending still leaves viewers wanting more
199
+ - plan markdown path (`<project_dir>/docs/plans/<YYYY-MM-DD>-<chapter_slug>.md`)
200
+ - explicit user approval confirmation (before asset generation)
201
+ - roles prompt file path (`<project_dir>/roles/roles.json`)
202
+ - prompts file path (`<project_dir>/pictures/<content_name>/prompts.json`)
203
+ - beat-level special-effects summary used in the final render
204
+ - generated image directory path
205
+ - narration audio path
206
+ - subtitle SRT path
207
+ - narration pacing proof (`char_count`, `audio_duration_seconds`, `chars_per_second`)
208
+ - final rendered video path
209
+ - Remotion project path (retained for adjustments)
210
+
211
+ ## Quality Gate Checklist
212
+
213
+ Before finishing, verify all conditions:
214
+
215
+ - exactly 1 highest-impact highlight segment selected
216
+ - selected segment is understandable as a standalone mini-story
217
+ - plan markdown exists in `docs/plans/` with date + chapter naming
218
+ - plan content starts from `references/plan-template.md`
219
+ - plan markdown includes the selected segment, beat/script details, standalone-story check, lingering-question design, and segment image generation list
220
+ - plan markdown includes a beat-level special-effects map plus intensity guardrails
221
+ - all bracketed placeholders/guidance are removed from the final filled plan
222
+ - user explicitly approved the plan before image/voice/render steps
223
+ - `roles.json` exists and follows `references/roles-json.md`
224
+ - existing role prompts are reused when available; new role prompts are added only when missing
225
+ - `prompts.json` uses structured mode and reuses role IDs from `roles.json`
226
+ - one selected segment maps to one full output video
227
+ - duration is within 50-60 seconds per output video
228
+ - narration pacing is within 3-4 CJK chars/second
229
+ - opening and ending lines form a narrative loop
230
+ - special effects strengthen hook/escalation/climax focus without breaking subtitle readability
231
+ - ending leaves one unresolved but compelling question
232
+ - images and voice assets are generated successfully
233
+ - Remotion project is preserved and `.gitignore` is configured
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Novel to Short Video"
3
+ short_description: "Turn the best novel segment into a looping 50-60s short video"
4
+ default_prompt: "Use $novel-to-short-video to extract the single most compelling segment from my novel, ensure it forms a self-contained mini-story while ending with lingering curiosity, create a plan markdown from references/plan-template.md under docs/plans with date+chapter naming, include beat-level audience-focus effects and a 3-4 chars/second narration pacing target in the plan, wait for my approval, then ensure <project_dir>/roles/roles.json exists first (create it if missing using references/roles-json.md), reuse existing role prompts, and only append missing roles before generating prompts/images, then generate storyboard images and voiceover, validate narration speed in 3-4 chars/second before render, and render a 50-60 second looping short video with controlled special effects while keeping the Remotion project editable."
@@ -0,0 +1,71 @@
1
+ # [chapter_title] Short Video Plan
2
+ [Instruction: Fill every bracketed placeholder in this template. After filling, remove all bracketed guidance/placeholders (including brackets) before submitting the final plan.]
3
+
4
+ - Date: [YYYY-MM-DD]
5
+ - Chapter: [chapter_name_or_number]
6
+ - Content Name: [content_name]
7
+ - Source: [novel_file_or_raw_input]
8
+ - Orientation: [1080x1920]
9
+ - Approval Status: [Pending User Approval]
10
+
11
+ ## Highlight Segment: [segment_title]
12
+ - Source Excerpt: [segment_excerpt]
13
+ - Selection Reason: [why_this_is_the_most_compelling_segment]
14
+ - Core Conflict: [segment_core_conflict]
15
+ - Tension Arc: [setup -> escalation -> climax -> aftershock]
16
+ - Standalone Story Basis: [how_viewers_can_understand_this_segment_without_prior_context]
17
+ - Lingering Question: [the_single_unresolved_question_left_at_the_end]
18
+
19
+ ### Narration Script (50-60s)
20
+ [full_narration_script_for_single_segment]
21
+
22
+ ### Beat Plan
23
+ 1. [beat_1_title]
24
+ - duration: [beat_1_seconds]
25
+ - purpose: [hook_or_setup]
26
+ - focus effect: [hook_effect_and_trigger]
27
+ 2. [beat_2_title]
28
+ - duration: [beat_2_seconds]
29
+ - purpose: [conflict_escalation]
30
+ - focus effect: [escalation_effect_and_trigger]
31
+ 3. [beat_3_title]
32
+ - duration: [beat_3_seconds]
33
+ - purpose: [climax]
34
+ - focus effect: [climax_effect_and_trigger]
35
+ 4. [beat_4_title]
36
+ - duration: [beat_4_seconds]
37
+ - purpose: [loop_closure]
38
+ - focus effect: [loop_closure_effect_and_trigger]
39
+
40
+ ### Images to Generate
41
+ - [segment_img01.png]: [image_prompt_or_intent_1]
42
+ - [segment_img02.png]: [image_prompt_or_intent_2]
43
+ - [segment_img03.png]: [image_prompt_or_intent_3]
44
+ - [segment_img04.png]: [image_prompt_or_intent_4]
45
+
46
+ ### Video Segment
47
+ - duration: [50-60 seconds]
48
+ - purpose: [how_this_single_segment_supports_the_full_video]
49
+
50
+ ### Audience Focus Effects
51
+ - Hook emphasis: [quick_attention_grabber_for_first_2_seconds]
52
+ - Escalation emphasis: [mid_video_attention_lift_effect]
53
+ - Climax emphasis: [peak_impact_effect]
54
+ - Loop-return treatment: [how_effects_taper_before_returning_to_opening_frame]
55
+ - Intensity guardrails: [limits_to_prevent_effect_overload_or_subtitle_obstruction]
56
+
57
+ ## Story Satisfaction Check
58
+ - Mini-story completeness: [setup_conflict_turning_point_immediate_outcome_are_all_clear]
59
+ - Why this still feels unresolved: [how_the_ending_creates_lingering_curiosity]
60
+ - Why viewers want one more replay: [loop_return_plus_new_question_design]
61
+
62
+ ## Loop Closure
63
+ - Opening hook line: [first_sentence_hook]
64
+ - Closing loop line: [final_sentence_that_returns_to_hook]
65
+
66
+ ## Timing Check
67
+ - Total duration target: [50-60 seconds]
68
+ - Narration pacing target: [3-4 chars/second]
69
+ - Narration char-count budget: [150-240 CJK chars]
70
+ - Pacing validation formula: [cjk_char_count / audio_duration_seconds]
71
+ - Beat transition notes: [beat_transition_plan]
@@ -0,0 +1,41 @@
1
+ # `roles.json` Definition
2
+
3
+ Use this schema when creating or updating:
4
+
5
+ - `<project_dir>/roles/roles.json`
6
+
7
+ ## JSON Shape
8
+
9
+ ```json
10
+ {
11
+ "characters": [
12
+ {
13
+ "id": "lin_xia",
14
+ "name": "Lin Xia",
15
+ "appearance": "short black hair, amber eyes, slim build",
16
+ "outfit": "dark trench coat, silver pendant, leather boots",
17
+ "description": "standing calmly, observant expression"
18
+ }
19
+ ]
20
+ }
21
+ ```
22
+
23
+ ## Rules
24
+
25
+ - Top-level key must be `characters` (array).
26
+ - If the file does not exist, create `roles.json` first with this schema before prompt generation.
27
+ - Each character entry must include:
28
+ - `id`
29
+ - `name`
30
+ - `appearance`
31
+ - `outfit`
32
+ - `description`
33
+ - Keep `id` stable across all scenes and future updates.
34
+ - Reuse existing character entries first; append only missing roles.
35
+ - If there are no recurring roles, still create:
36
+
37
+ ```json
38
+ {"characters": []}
39
+ ```
40
+
41
+ Use this shared file so short-video and long-video skills can reuse the same role definitions within one project.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tsz Kin Lai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,97 @@
1
+ # Open GitHub Issue
2
+
3
+ Structured GitHub issue and feature-proposal publishing with deterministic authentication fallback and repository-language-aware issue bodies.
4
+
5
+ This skill helps agents publish confirmed findings or accepted feature proposals as GitHub issues without embedding repository resolution, auth handling, and language detection logic into every other workflow.
6
+
7
+ ## What this skill provides
8
+
9
+ - Target repository resolution from `--repo` or current git `origin`.
10
+ - Strict auth fallback order: `gh` login -> `GITHUB_TOKEN`/`GH_TOKEN` -> draft only.
11
+ - Issue body language detection based on the target repository README.
12
+ - Consistent structured issue bodies for both problem issues and feature proposal issues.
13
+ - Machine-readable JSON output so parent skills can report publication status consistently.
14
+
15
+ ## Repository structure
16
+
17
+ - `SKILL.md`: Main skill definition and workflow.
18
+ - `agents/openai.yaml`: Agent interface metadata and default prompt.
19
+ - `scripts/open_github_issue.py`: Deterministic issue publisher.
20
+
21
+ ## Installation
22
+
23
+ 1. Clone this repository.
24
+ 2. Copy this folder to your Codex skills directory:
25
+
26
+ ```bash
27
+ mkdir -p "$CODEX_HOME/skills"
28
+ cp -R open-github-issue "$CODEX_HOME/skills/open-github-issue"
29
+ ```
30
+
31
+ ## Usage
32
+
33
+ Invoke the skill in your prompt:
34
+
35
+ ```text
36
+ Use $open-github-issue to publish this confirmed finding or accepted feature proposal to GitHub.
37
+ ```
38
+
39
+ The bundled script can also be called directly:
40
+
41
+ ```bash
42
+ python scripts/open_github_issue.py \
43
+ --issue-type problem \
44
+ --title "[Log] Payment timeout spike" \
45
+ --problem-description "Repeated timeout warnings escalated into request failures during the incident window." \
46
+ --suspected-cause "payment-api/handler.py:84 retries immediately against a slow upstream with no jitter; confidence high." \
47
+ --reproduction "Not yet reliably reproducible; more runtime evidence is required." \
48
+ --repo owner/repo
49
+ ```
50
+
51
+ ```bash
52
+ python scripts/open_github_issue.py \
53
+ --issue-type feature \
54
+ --title "[Feature] Add incident timeline export" \
55
+ --proposal "Allow users to export incident timelines as Markdown and CSV from the incident detail page." \
56
+ --reason "Support handoff to on-call engineers and postmortem writing without copy-paste." \
57
+ --suggested-architecture "Add an export action in the incident UI, reuse timeline query service, and centralize renderers in a shared export module." \
58
+ --repo owner/repo
59
+ ```
60
+
61
+ ## Publication behavior
62
+
63
+ For each issue:
64
+
65
+ 1. If `gh auth status` succeeds, publish with GitHub CLI.
66
+ 2. Otherwise, if `GITHUB_TOKEN` or `GH_TOKEN` exists, publish via GitHub REST API.
67
+ 3. Otherwise, return draft issue content without blocking the caller.
68
+
69
+ Problem issues always include exactly three sections:
70
+
71
+ - `Problem Description`
72
+ - `Suspected Cause`
73
+ - `Reproduction Conditions (if available)`
74
+
75
+ For Chinese-language repositories, use translated section titles with the same meaning.
76
+
77
+ Feature proposal issues always include:
78
+
79
+ - `Feature Proposal`
80
+ - `Why This Is Needed`
81
+ - `Suggested Architecture`
82
+
83
+ For Chinese-language repositories, use translated section titles with the same meaning.
84
+
85
+ ## Output
86
+
87
+ The script prints JSON including:
88
+
89
+ - publication mode,
90
+ - issue type,
91
+ - created issue URL when available,
92
+ - rendered issue body,
93
+ - and publish error details when fallback occurs.
94
+
95
+ ## License
96
+
97
+ MIT. See `LICENSE`.
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: open-github-issue
3
+ description: Publish structured GitHub issues and feature proposals with deterministic auth fallback, target-repo resolution, README-based language detection, and draft-only fallback when authentication is unavailable. Use when users ask to open GitHub issues from confirmed findings, accepted feature proposals, or prepared issue content.
4
+ ---
5
+
6
+ # Open GitHub Issue
7
+
8
+ ## Dependencies
9
+
10
+ - Required: none.
11
+ - Conditional: none.
12
+ - Optional: none.
13
+ - Fallback: If authenticated publishing is unavailable, fall back to draft-only output without blocking the caller.
14
+
15
+ ## Standards
16
+
17
+ - Evidence: Require structured issue inputs and detect repository language from the target README instead of guessing.
18
+ - Execution: Resolve the repo, normalize the issue body, publish with strict auth order, then return the publication result.
19
+ - Quality: Preserve upstream evidence, localize only the structural parts, and keep publication deterministic and reproducible.
20
+ - Output: Return publication mode, issue URL when created, rendered body, and any publish error in the standardized JSON contract.
21
+
22
+ ## Overview
23
+
24
+ Use this skill to publish a structured GitHub issue or feature proposal deterministically.
25
+
26
+ It is designed to be reusable by other skills that already know the issue title and evidence, but need a consistent way to:
27
+
28
+ - resolve the target repository,
29
+ - localize the issue body,
30
+ - publish with the preferred auth path,
31
+ - and fall back to draft-only output without blocking the main workflow.
32
+
33
+ ## Core principles
34
+
35
+ - Keep publishing deterministic and reproducible.
36
+ - Prefer authenticated `gh` CLI first, then GitHub token, then draft-only fallback.
37
+ - Detect repository issue language from the target remote README instead of guessing.
38
+ - Preserve upstream evidence content; only localize section headers and default fallback text.
39
+ - Make the issue type explicit: `problem` for defects/incidents, `feature` for proposals.
40
+
41
+ ## Workflow
42
+
43
+ 1. Resolve target repository
44
+ - Use `--repo owner/name` when provided.
45
+ - Otherwise resolve from current git `origin`.
46
+ 2. Normalize issue content
47
+ - Require one title and an explicit `issue-type`.
48
+ - For `problem` issues, require these structured sections:
49
+ - `problem-description`
50
+ - `suspected-cause`
51
+ - `reproduction` (optional)
52
+ - For `feature` issues, require these structured sections:
53
+ - `proposal` (optional; defaults to title when omitted)
54
+ - `reason`
55
+ - `suggested-architecture`
56
+ - If reproduction is missing for a `problem` issue, insert the default non-reproducible note in the target issue language.
57
+ 3. Detect issue language
58
+ - Read the target repository README from GitHub.
59
+ - If the README is Chinese, publish Chinese section titles; otherwise publish English section titles.
60
+ 4. Publish with strict auth order
61
+ - If `gh auth status` succeeds, use `gh issue create`.
62
+ - Otherwise, if `GITHUB_TOKEN` or `GH_TOKEN` exists, use GitHub REST API.
63
+ - Otherwise, return draft-only output and do not block the caller.
64
+ 5. Return publication result
65
+ - Always return publication mode, issue URL when created, rendered issue body, and any publish error.
66
+
67
+ ## Deterministic command
68
+
69
+ Use the bundled script.
70
+
71
+ Problem issue:
72
+
73
+ ```bash
74
+ python scripts/open_github_issue.py \
75
+ --issue-type problem \
76
+ --title "[Log] <short symptom>" \
77
+ --problem-description "<symptom + impact + key evidence>" \
78
+ --suspected-cause "<path:line + causal chain + confidence>" \
79
+ --reproduction "<steps/conditions or leave empty>" \
80
+ --repo <owner/repo>
81
+ ```
82
+
83
+ Feature proposal issue:
84
+
85
+ ```bash
86
+ python scripts/open_github_issue.py \
87
+ --issue-type feature \
88
+ --title "[Feature] <short proposal>" \
89
+ --proposal "<what should be added or changed>" \
90
+ --reason "<why this matters now, user value, constraints>" \
91
+ --suggested-architecture "<modules, boundaries, implementation direction>" \
92
+ --repo <owner/repo>
93
+ ```
94
+
95
+ ## Output contract
96
+
97
+ The script prints JSON with these fields:
98
+
99
+ - `repo`
100
+ - `issue_type`
101
+ - `language`
102
+ - `mode` (`gh-cli` / `github-token` / `draft-only` / `dry-run`)
103
+ - `issue_url`
104
+ - `issue_title`
105
+ - `issue_body`
106
+ - `publish_error`
107
+
108
+ ## Dependency usage guidance
109
+
110
+ When another skill depends on `open-github-issue`:
111
+
112
+ - Pass exactly one confirmed problem or one accepted feature proposal per invocation.
113
+ - Prepare evidence or proposal details before calling this skill; do not ask this skill to infer root cause or architecture.
114
+ - Reuse the returned `mode`, `issue_url`, and `publish_error` in the parent skill response.
115
+ - For accepted feature proposals, pass `--issue-type feature` plus `--proposal`, `--reason`, and `--suggested-architecture`.
116
+
117
+ ## Resources
118
+
119
+ - `scripts/open_github_issue.py`: Deterministic issue publishing helper with auth fallback and README language detection.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Open GitHub Issue"
3
+ short_description: "Publish structured issues and feature proposals"
4
+ default_prompt: "Use $open-github-issue to publish a structured GitHub issue or feature proposal from prepared content, resolve the target repo, detect README language for issue sections, and fall back deterministically from gh CLI to GitHub token to draft-only output."