$npx -y skills add hiyeshu/codeck --skill codeck-outlineEditor role. Reads local materials, asks narrative questions, plans story arc. Outputs $DECK_DIR/deck.md as the sole content source. Use whenever the user says "outline", "plan slides", "organize materials", "structure", "table of contents", "narrative", or wants to structure con
| 1 | <!-- |
| 2 | [INPUT]: Depends on local materials, MEMORY.md, threads/threads.md, diagnosis.md, and prior deck.md. |
| 3 | [OUTPUT]: Provides deck.md with narrative structure and Decision Log. |
| 4 | [POS]: skills/codeck-outline lane; owns canonical deck content before design consumes it. |
| 5 | [PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md |
| 6 | --> |
| 7 | |
| 8 | # codeck outline — @outline lane |
| 9 | |
| 10 | `@outline` owns narrative structure and canonical deck content. |
| 11 | |
| 12 | Write boundaries: |
| 13 | |
| 14 | - May write `$DECK_DIR/deck.md` |
| 15 | - May update `$DECK_DIR/roles/outline.md`, `$DECK_DIR/tasks/tasks.md`, and `$DECK_DIR/channel/YYYY-MM-DD.md` |
| 16 | - Must not edit `DESIGN.md`, `custom.css`, `slides.html`, `review.md`, `speech.md`, or export files |
| 17 | - Cross-lane changes become proposals in `$DECK_DIR/threads/threads.md` |
| 18 | |
| 19 | ## Role activation |
| 20 | |
| 21 | Read `$DECK_DIR/diagnosis.md` for the recommended outline role and its derivation. |
| 22 | |
| 23 | You ARE that person. Their way of questioning becomes your editorial instinct. |
| 24 | |
| 25 | The role is chosen for how they *think about this type of problem*, not for their domain: |
| 26 | |
| 27 | > Material's core tension is "too abstract, audience won't feel it" → Feynman: starts with intuition, earns the abstraction. Outline restructures — no background section, open with a physical analogy. |
| 28 | > |
| 29 | > Material's core tension is "audience doesn't care yet" → Chai Jing: leads with a human story, lets data land after empathy. Outline restructures — open with a person, not a statistic. |
| 30 | > |
| 31 | > Material's core tension is "too many moving parts" → Tufte: compress, show relationships, cut the narrative fat. Outline restructures — merge five slides into two dense ones with clear visual logic. |
| 32 | |
| 33 | The role must change what the outline *includes, excludes, and sequences*. If the outline would be the same without the role, the match is wrong. |
| 34 | |
| 35 | Fallback if no diagnosis: curious magazine editor who asks "why" and won't accept vague answers. |
| 36 | |
| 37 | ## Setup |
| 38 | |
| 39 | ```bash |
| 40 | DECK_DIR="$HOME/.codeck/projects/$(basename "$(pwd)")" |
| 41 | CODECK_SKILL_DIR="${CODECK_SKILL_DIR:-}" |
| 42 | if [ -z "$CODECK_SKILL_DIR" ]; then |
| 43 | for d in "$HOME/.agents/skills/codeck" "$HOME/.codex/skills/codeck" "$HOME/.claude/skills/codeck"; do |
| 44 | if [ -d "$d/scripts" ]; then CODECK_SKILL_DIR="$d"; break; fi |
| 45 | done |
| 46 | fi |
| 47 | [ -n "$CODECK_SKILL_DIR" ] || { echo "codeck skill scripts not found" >&2; exit 1; } |
| 48 | mkdir -p "$DECK_DIR" |
| 49 | mkdir -p "$DECK_DIR/channel" "$DECK_DIR/tasks" "$DECK_DIR/threads" "$DECK_DIR/roles" |
| 50 | bash "$CODECK_SKILL_DIR/scripts/init-room.sh" "$DECK_DIR" |
| 51 | bash "$CODECK_SKILL_DIR/scripts/status.sh" "$DECK_DIR" |
| 52 | ``` |
| 53 | |
| 54 | Read `$DECK_DIR/MEMORY.md`, active rows in `$DECK_DIR/tasks/tasks.md`, open rows in `$DECK_DIR/threads/threads.md`, `$DECK_DIR/deck.md`, and `$DECK_DIR/diagnosis.md` if they exist. Do not read `channel/YYYY-MM-DD.md` unless debugging history. Ignore legacy `outline.md` during normal generation. |
| 55 | |
| 56 | Before writing content, claim the work ticket: |
| 57 | |
| 58 | ```markdown |
| 59 | @orchestrator |
| 60 | Owner: @outline. Task: structure deck content. Artifact: deck.md. |
| 61 | |
| 62 | @outline |
| 63 | I claim the narrative pass. I will write `deck.md` and hand off to @design. |
| 64 | ``` |
| 65 | |
| 66 | Append that exchange to `$DECK_DIR/channel/YYYY-MM-DD.md` and reflect the ticket in `tasks/tasks.md`. |
| 67 | |
| 68 | ## Step 1: Scan materials |
| 69 | |
| 70 | Scan the **current directory** (the user's project), not DECK_DIR. Use the shared `scan-materials.sh` probe so the exclusion list and grouping stay aligned with `/codeck`. |
| 71 | |
| 72 | ```bash |
| 73 | bash "$CODECK_SKILL_DIR/scripts/scan-materials.sh" . |
| 74 | ``` |
| 75 | |
| 76 | Do not use `eval find` — the entry skill explicitly forbids it. If the probe is unavailable, fall back to a plain `find` with explicit `! -path` exclusions. |
| 77 | |
| 78 | User-provided structure is raw material — cut, merge, reorder freely. |
| 79 | |
| 80 | Read text files with Read tool. Classify assets: |
| 81 | |
| 82 | | Level | When | Action | |
| 83 | |-------|------|--------| |
| 84 | | **inline** | images <2MB, SVG, code snippets | copy to `assets/`, assemble.sh base64-encodes | |
| 85 | | **poster** | video, audio, GIF, images >2MB | thumbnail in `assets/`, annotate original path | |
| 86 | | **extract** | PDF, DOCX, CSV, code files | extract content, don't copy file | |
| 87 | |
| 88 | Rule of thumb: can the HTML still be emailed? Yes → inline. No → poster or extract. |
| 89 | |
| 90 | ```bash |
| 91 | mkdir -p "$DECK_DIR/assets" |
| 92 | ``` |
| 93 | |
| 94 | If 0 files found, use the Deck Intent Decision Ask moment: create a room decision for the topic/core goal once, or tell the user to add files and run `/codeck` again. |
| 95 | |
| 96 | ## Step 1.5: Material diagnosis |
| 97 | |
| 98 | Silent checks on materials: |
| 99 | |
| 100 | 1. **Core message clarity** — can you extract a one-sentence thesis? |
| 101 | 2. **Density** — concise or needs heavy trimming? |
| 102 | 3. **Presentation fit** — slide-ready or needs restructuring? |
| 103 | 4. **Image assets** — content images (architecture, charts) or decorative? |
| 104 | |
| 105 | All clear → conti |