PPT规划
- 作者仓库星标 435
- 作者更新于 实时读取
- 作者仓库 nvim
- 领域
- 工程开发
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @benbrastmckie · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: skill-slide-planning
description: Interactive slide planning with narrative arc review and per-slide feedback. Invoke for /plan on…
category: 工程开发
runtime: 无特殊运行时
---
# skill-slide-planning 输出预览
## PART A: 任务判断
- 适用问题:代码实现、重构、调试或代码审查。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Context References / Trigger Conditions / Input Parameters”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于代码实现、重构、调试或代码审查,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Context References / Trigger Conditions / Input Parameters”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/plan`、`/research` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Context References / Trigger Conditions / Input Parameters”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: skill-slide-planning
description: Interactive slide planning with narrative arc review and per-slide feedback. Invoke for /plan on…
category: 工程开发
source: benbrastmckie/nvim
---
# skill-slide-planning
## 什么时候使用
- 用于审阅代码、文档或方案并给出可执行反馈 适合处理工程开发场景下的代码实现、调试、重构、测试或代码审查,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;通常…
- 面向代码实现、重构、调试或代码审查,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Context References / Trigger Conditions / Input Parameters」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "skill-slide-planning" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Context References / Trigger Conditions / Input Parameters
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Slide Planning Skill
Interactive 5-stage Q&A skill for slide planning. Gathers theme preference, narrative arc feedback, slide include/exclude decisions, and per-slide refinement before delegating to slide-planner-agent for slide-by-slide plan generation.
IMPORTANT: This skill implements the skill-internal postflight pattern. After the subagent returns, this skill handles all postflight operations (status update, artifact linking, git commit) before returning.
Context References
Reference (do not load eagerly):
- Path:
.opencode/context/formats/return-metadata-file.md- Metadata file schema - Path:
.opencode/context/patterns/postflight-control.md- Marker file protocol - Path:
.opencode/context/patterns/file-metadata-exchange.md- File I/O helpers - Path:
.opencode/context/patterns/jq-escaping-workarounds.md- jq escaping patterns (Issue #1132)
Note: This skill runs interactive Q&A then delegates to slide-planner-agent. Context is loaded by the agent.
Trigger Conditions
This skill activates when:
/planon a present task withtask_type: "slides"(or compoundpresent:slides)- Manifest routing:
plan -> present:slides -> skill-slide-planning - Present extension is available
Input Parameters
Required Parameters
task_number- Task number (must exist in state.json with task_type containing "slides")session_id- Session ID from orchestrator
Optional Parameters
plan_path- Path to existing plan (for resume, not typically used)resume_phase- Phase to resume from (not typically used)
Execution Flow
Stage 0: Input Validation
Validate required inputs:
task_number- Must be provided and exist in state.json- Verify task_type contains "slides" (supports "present:slides", "slides", or legacy language="present" + task_type="slides")
# Lookup task
task_data=$(jq -r --argjson num "$task_number" \
'.active_projects[] | select(.project_number == $num)' \
specs/state.json)
# Validate exists
if [ -z "$task_data" ]; then
return error "Task $task_number not found"
fi
# Extract fields
task_type=$(echo "$task_data" | jq -r '.task_type // ""')
status=$(echo "$task_data" | jq -r '.status')
project_name=$(echo "$task_data" | jq -r '.project_name')
description=$(echo "$task_data" | jq -r '.description // ""')
forcing_data=$(echo "$task_data" | jq -r '.forcing_data // {}')
Stage 1: Preflight Status Update
Update task status to planning BEFORE starting interactive flow.
padded_num=$(printf "%03d" "$task_number")
task_dir="specs/${padded_num}_${project_name}"
mkdir -p "$task_dir"
# Update state.json
jq --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--arg sid "$session_id" \
'(.active_projects[] | select(.project_number == '$task_number')) |= . + {
status: "planning",
last_updated: $ts,
session_id: $sid
}' specs/state.json > specs/tmp/state.json && mv specs/tmp/state.json specs/state.json
# Update TODO.md marker to [PLANNING]
Create postflight marker:
cat > "${task_dir}/.postflight-pending" << EOF
{
"session_id": "${session_id}",
"skill": "skill-slide-planning",
"task_number": ${task_number},
"operation": "plan",
"reason": "Postflight pending: status update, artifact linking, git commit",
"created": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
"stop_hook_active": false
}
EOF
Stage 2: Check for Existing Design Decisions
existing_dd=$(echo "$task_data" | jq -r '.design_decisions // empty')
if [ -n "$existing_dd" ]; then
# AskUserQuestion:
# "Previous design decisions found for this task:
# Theme: {theme}
# Slides: {included count} included, {excluded count} excluded
# Feedback on {count} slides
#
# Reuse existing decisions, or start fresh?"
#
# If "reuse": skip to Stage 7 (delegation)
# If "start fresh": clear design_decisions and continue
fi
Stage 3: Theme Selection (Interactive Stage 1)
Read the research report to extract the recommended theme:
report_path=$(ls -1 "${task_dir}/reports/"*_slides-research.md 2>/dev/null | sort -V | tail -1)
# Extract recommended theme from report (if exists)
AskUserQuestion:
{If report exists: "The research report recommends: {recommended_theme}\n\n"}
Select a visual theme for your {talk_type} presentation:
A) Academic Clean -- Minimal, high-contrast, serif headings. Best for department seminars.
B) Clinical Teal -- Medical/clinical palette, clean data presentation. Best for clinical audiences.
C) Conference Bold -- Strong colors, large type, designed for projection. Best for conference talks.
D) Minimal Dark -- Dark background, high contrast, code-friendly. Best for technical audiences.
E) UCSF Institutional -- Navy/blue palette, Garamond headings. Best for UCSF presentations.
Or type a custom theme description.
Map response to theme slug:
- A ->
academic-clean - B ->
clinical-teal - C ->
conference-bold - D ->
minimal-dark - E ->
ucsf-institutional - Custom text -> store as-is
Store as design_decisions.theme.
Stage 4: Narrative Arc Outline (Interactive Stage 2)
Build the narrative outline from the research report slide map (or talk pattern if no report):
For each slide in the map:
{position}. [{type}] {one-line content summary} ({REQUIRED|optional})
AskUserQuestion:
Here is the narrative arc for your {talk_type} talk ({duration} min, {slide_count} slides):
1. [title] "{talk_title}" -- authors, affiliations, date
2. [motivation] Gap in knowledge: {summary} (REQUIRED)
3. [background] Literature context: {summary} (REQUIRED)
...
{N}. [acknowledgments] Funding, collaborators: {summary} (optional)
Estimated timing: ~{duration/slide_count} min/slide
Feedback on the narrative arc:
- Reorder? (e.g., "move 10 before 9")
- Add slides? (e.g., "add a slide about X after 5")
- Remove slides? (e.g., "remove 8")
- Change emphasis? (e.g., "expand results to 3 slides")
- Or type "looks good" to proceed as-is.
Process feedback:
- Parse reorder instructions, insertions, removals, emphasis changes
- Rebuild the slide list with changes applied
- New slides from user additions get type "custom"
Store as:
design_decisions.narrative_arc- Final ordered slide list (array of objects with position, type, summary, required flag)design_decisions.arc_feedback- Raw user feedback text
Stage 5: Slide Picker (Interactive Stage 3)
Present the updated slide list with 2-3 line content previews per slide.
AskUserQuestion:
Review each slide and mark for inclusion. Type the numbers of slides to EXCLUDE
(all are included by default), or "all" to include everything.
1. [title] "{talk_title}"
Content: Authors, affiliations, conference/date
2. [motivation] Gap in knowledge
Content: {2-3 line preview of mapped content}
...
{N}. [acknowledgments] Funding and collaborators
Content: {2-3 line preview}
Exclude slides (comma-separated numbers), or "all" to keep everything:
Parse response:
- "all" or empty -> include everything
- Comma-separated numbers -> exclude those positions
Store as:
design_decisions.included_slides- List of included slide positionsdesign_decisions.excluded_slides- List of excluded slide positions
Stage 6: Per-Slide Detail and Feedback (Interactive Stage 4)
For each included slide, show detailed content mapping and collect optional feedback. Uses a single consolidated AskUserQuestion to minimize round-trips.
For long talks (20+ included slides): Group by section and show section summaries first. Accept "section looks good" for entire groups.
AskUserQuestion:
Here are the {N} included slides in detail. For any slide you want to adjust,
type its number and your feedback. Examples:
2: emphasize the clinical urgency more
5: include the CONSORT diagram
6: split into two slides, one for each primary outcome
9: add comparison to the Smith et al. 2024 findings
---
Slide 1: [title] "{talk_title}"
Content: {full content mapping from research report}
Speaker notes: {suggested talking points}
Template: {template name}
---
Slide 2: [motivation] Gap in knowledge
Content: {full content mapping}
Speaker notes: {suggested talking points}
Template: {template name}
...
Enter feedback (one per line, "done" when finished, or "looks good" for no changes):
Parse response:
- "looks good" or "done" with no feedback -> no changes
- Lines matching
{number}: {feedback}-> store per-slide feedback
Store as design_decisions.slide_feedback (map of slide position string -> feedback text).
Stage 7: Delegate to slide-planner-agent
Assemble the complete delegation context:
{
"session_id": "{session_id}",
"delegation_depth": 1,
"delegation_path": ["orchestrator", "plan", "skill-slide-planning", "slide-planner-agent"],
"task_context": {
"task_number": "{task_number}",
"task_name": "{project_name}",
"description": "{description}",
"task_type": "present:slides"
},
"research_report_path": "{report_path}",
"design_decisions": {
"theme": "{selected theme}",
"narrative_arc": [{position, type, summary, included, feedback}],
"arc_feedback": "{raw arc feedback}",
"included_slides": [1, 2, 3, ...],
"excluded_slides": [7, 8, ...],
"slide_feedback": {"2": "feedback text", ...}
},
"forcing_data": "{from state.json task metadata}",
"metadata_file_path": "{task_dir}/.return-meta.json"
}
CRITICAL: Use the Task tool to spawn slide-planner-agent. Do NOT use Skill(...).
Tool: Task (NOT Skill)
Parameters:
- subagent_type: "slide-planner-agent"
- prompt: [Include full delegation context above]
- description: "Create slide plan for task {N}"
Also store design decisions in state.json before delegation:
# Store design_decisions in state.json task metadata
# Use jq to update the task entry with the complete design_decisions object
Stage 7b: Self-Execution Fallback
CRITICAL: If you performed the work above WITHOUT using the Task tool (i.e., you read files,
wrote artifacts, or updated metadata directly instead of spawning a subagent), you MUST write a
.return-meta.json file now before proceeding to postflight. Use the schema from
return-metadata-file.md with the appropriate status value for this operation.
If you DID use the Task tool, skip this stage -- the subagent already wrote the metadata.
Postflight (ALWAYS EXECUTE)
The following stages MUST execute after work is complete, whether the work was done by a subagent or inline (Stage 7b). Do NOT skip these stages for any reason.
Stage 8: Read Metadata File
metadata_file="${task_dir}/.return-meta.json"
if [ -f "$metadata_file" ] && jq empty "$metadata_file" 2>/dev/null; then
meta_status=$(jq -r '.status' "$metadata_file")
artifact_path=$(jq -r '.artifacts[0].path // ""' "$metadata_file")
artifact_type=$(jq -r '.artifacts[0].type // ""' "$metadata_file")
artifact_summary=$(jq -r '.artifacts[0].summary // ""' "$metadata_file")
else
echo "Error: Invalid or missing metadata file"
meta_status="failed"
fi
Stage 9: Update Task Status (Postflight)
| Meta Status | Final state.json | Final TODO.md |
|---|---|---|
| planned | planned | [PLANNED] |
| partial | planning | [PLANNING] |
| failed | (keep preflight) | (keep preflight marker) |
Stage 10: Link Artifacts
Add artifact to state.json with summary. Use the two-step jq pattern to avoid Issue #1132.
Update TODO.md: Link artifact per @.opencode/context/patterns/artifact-linking-todo.md with field_name=**Plan**, next_field=**Description**.
Stage 11: Git Commit
git add -A
git commit -m "task ${task_number}: create slide implementation plan
Session: ${session_id}"
Stage 12: Cleanup
rm -f "${task_dir}/.postflight-pending"
rm -f "${task_dir}/.postflight-loop-guard"
rm -f "${task_dir}/.return-meta.json"
Stage 13: Return Brief Summary
Success:
Slide planning completed for task {N}:
- Theme: {theme}
- {included_count} slides planned, {excluded_count} excluded
- {feedback_count} slides with user feedback
- Plan: specs/{NNN}_{SLUG}/plans/{MM}_slide-plan.md
- Status updated to [PLANNED]
- Changes committed with session {session_id}
Partial:
Slide planning partially completed for task {N}:
- Design decisions gathered but plan generation incomplete
- Run /plan {N} again to retry (existing decisions will be reusable)
Edge Cases
No Research Report
- Warn user at Stage 3: "No research report found. Run
/research {N}first for best results." - Fall back to talk pattern JSON for slide structure in Stages 4-6
- Theme question still works (omit recommendation line)
- Arc outline uses pattern defaults with generic summaries
Existing Design Decisions
- Stage 2 asks: reuse or start fresh
- "Reuse" skips directly to Stage 7 delegation
- "Start fresh" clears existing and runs all interactive stages
User Adds Slides in Arc Feedback
- Create new slide entries with type "custom" and user's description
- Assign next position number in sequence
- Custom slides appear in picker (Stage 5) and detail (Stage 6)
User Removes All Optional Slides
- Valid. Proceed with required slides only.
- Note in delegation context that minimal slide set was chosen.
Very Long Talks (35+ slides)
- Stage 6 groups slides by section (e.g., "Introduction (6 slides)", "Aim 1 (5 slides)")
- Show section summaries first
- Accept "section looks good" for entire groups
Error Handling
Task not found
Slide planning error for task {N}:
- Task not found in state.json
- No status changes made
Wrong task type
Slide planning error for task {N}:
- Task is not a slides task (task_type={task_type})
- Use /plan for slides tasks routed via manifest
- No status changes made
Agent metadata file missing
Keep status at preflight level (planning) for resume.
Git commit failure
Non-blocking. Log failure but continue.
Return Format
This skill returns a brief text summary (NOT JSON). The JSON metadata is written to the file and processed internally.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核