$npx -y skills add hiyeshu/codeck --skill codeck-speechInternal speech module for /codeck. Reads deck content, asks about style and duration only when missing, generates a verbatim speech transcript with stage directions. Outputs $DECK_DIR/speech.md.
| 1 | <!-- |
| 2 | [INPUT]: Depends on deck content, HTML notes, MEMORY.md, tasks/tasks.md, and threads/threads.md. |
| 3 | [OUTPUT]: Provides speech.md and fragment-synced HTML data-notes. |
| 4 | [POS]: skills/codeck-speech lane; turns the deck into a presenter-ready talk track. |
| 5 | [PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md |
| 6 | --> |
| 7 | |
| 8 | # codeck speech — @speech lane |
| 9 | |
| 10 | `@speech` owns the talk track, presenter rhythm, and fragment-synced notes. |
| 11 | |
| 12 | Write boundaries: |
| 13 | |
| 14 | - May write `$DECK_DIR/speech.md` |
| 15 | - May update HTML `data-notes` in `$DECK_DIR/slides.html` |
| 16 | - May update `$DECK_DIR/roles/speech.md`, `$DECK_DIR/tasks/tasks.md`, and `$DECK_DIR/channel/YYYY-MM-DD.md` |
| 17 | - Must not rewrite `deck.md`, `DESIGN.md`, `custom.css`, `review.md`, or export files |
| 18 | - Content conflicts become proposals in `$DECK_DIR/threads/threads.md` |
| 19 | |
| 20 | ## Role activation |
| 21 | |
| 22 | Read `$DECK_DIR/diagnosis.md`. If a speech role is recommended, use it. Otherwise, pick a coach based on domain and audience: |
| 23 | |
| 24 | > Technical → Feynman: simplify the complex, bridge with analogy |
| 25 | > |
| 26 | > Business → Jobs: build anticipation, one "one more thing" |
| 27 | > |
| 28 | > Academic → Hans Rosling: let data tell the story |
| 29 | |
| 30 | ## Setup |
| 31 | |
| 32 | ```bash |
| 33 | DECK_DIR="$HOME/.codeck/projects/$(basename "$(pwd)")" |
| 34 | CODECK_SKILL_DIR="${CODECK_SKILL_DIR:-}" |
| 35 | if [ -z "$CODECK_SKILL_DIR" ]; then |
| 36 | for d in "$HOME/.agents/skills/codeck" "$HOME/.codex/skills/codeck" "$HOME/.claude/skills/codeck"; do |
| 37 | if [ -d "$d/scripts" ]; then CODECK_SKILL_DIR="$d"; break; fi |
| 38 | done |
| 39 | fi |
| 40 | [ -n "$CODECK_SKILL_DIR" ] || { echo "codeck skill scripts not found" >&2; exit 1; } |
| 41 | mkdir -p "$DECK_DIR" |
| 42 | mkdir -p "$DECK_DIR/channel" "$DECK_DIR/tasks" "$DECK_DIR/threads" "$DECK_DIR/roles" |
| 43 | bash "$CODECK_SKILL_DIR/scripts/init-room.sh" "$DECK_DIR" |
| 44 | bash "$CODECK_SKILL_DIR/scripts/status.sh" "$DECK_DIR" |
| 45 | ``` |
| 46 | |
| 47 | Read: |
| 48 | - **MEMORY.md** — known style, duration, language, defaults, open threads |
| 49 | - **tasks/tasks.md / threads/threads.md** — active tickets and open decisions only |
| 50 | - **HTML** (latest `*-r*.html`) — actual slide content |
| 51 | - **deck.md** — structure, arc, user intent; ignore legacy `outline.md` |
| 52 | - **DESIGN.md / roles/design.md** — visual intent and selected skeleton (speech rhythm should match visual rhythm) |
| 53 | |
| 54 | If no HTML and no `deck.md`, run `/codeck` to build the missing deck state first. |
| 55 | |
| 56 | If only `deck.md` exists, write based on `deck.md` — note that the script is based on structure, not final visuals. |
| 57 | |
| 58 | Do not read `channel/YYYY-MM-DD.md` unless debugging history. |
| 59 | |
| 60 | **Smart skip:** skip Decision Ask if the user's instruction, `MEMORY.md`, open `threads/threads.md` rows, `deck.md`, or existing `speech.md` already specifies style and duration. |
| 61 | |
| 62 | Before writing, claim the work ticket: |
| 63 | |
| 64 | ```markdown |
| 65 | @orchestrator |
| 66 | Owner: @speech. Task: create presenter script and sync data-notes. |
| 67 | |
| 68 | @speech |
| 69 | I claim the speech pass. I will write `speech.md`, sync fragment notes, and leave source conflicts in threads. |
| 70 | ``` |
| 71 | |
| 72 | Append the exchange to today's channel file and update `tasks/tasks.md`. |
| 73 | |
| 74 | ## Questions |
| 75 | |
| 76 | Speech Style is one allowed Decision Ask moment under `/codeck`. |
| 77 | |
| 78 | Use the shared `/codeck` Decision Ask Policy. Create one `D-YYYYMMDD-NN` decision only when style or duration is missing. Bundle both into one choice so the user is deciding the speech shape, not filling a form. |
| 79 | |
| 80 | ```text |
| 81 | codeck needs the speech shape. |
| 82 | |
| 83 | Current read: {deck audience and rhythm}. |
| 84 | |
| 85 | I suggest {recommended package} because {reason}. |
| 86 | |
| 87 | A) {style + duration package} (recommended) |
| 88 | B) {contrasting style + duration package} |
| 89 | C) {deeper/shorter package} |
| 90 | ``` |
| 91 | |
| 92 | Use these defaults when the deck gives no signal: |
| 93 | |
| 94 | - A) TED — conversational, story-driven, breathing room |
| 95 | - B) Formal — structured, precise language |
| 96 | - C) Casual — natural, humor ok |
| 97 | |
| 98 | - A) 5 min — lightning, ~1000 words |
| 99 | - B) 15 min — standard, ~3000 words |
| 100 | - C) 30+ min — deep dive, ~6000 words |
| 101 | |
| 102 | If the decision is non-blocking and the user does not answer, use the recommended package and write `assumed default` to `MEMORY.md`. If the speech commitment is blocking and no structured AskUser UI is available, leave it open in `threads/threads.md` and stop before writing `speech.md`. |
| 103 | |
| 104 | Record the final style and duration in `speech.md` front matter and `MEMORY.md`. |
| 105 | |
| 106 | ## Generate |
| 107 | |
| 108 | **Before writing, build a fragment map.** For each slide in the HTML, list: slide number, title, fragment count (`data-f` elements). This map determines the speech structure — slides with fragments get `### [on enter]` + `### [fragment N]` sections, slides without get a single block. Do not skip this step. |
| 109 | |
| 110 | Write a complete, readable-aloud transcript. Page by page. |
| 111 | |
| 112 | ### Rules |
| 113 | |
| 114 | 1. **One section per slide** — matches the deck |
| 115 | 2. **Transitions** — natural bridges between pages |
| 116 | 3. **Stage directions** — write stage directions in the same language as the transcript. For English, use `[ |