skills/development-workflows/spark/SKILL.md
Plan-first brainstorming workflow that turns an idea into an approved implementation plan before coding. Use when the user wants to brainstorm, design, scope, stress-test, or plan a feature/spec. Spark adapts to the active planning surface: in Codex native Plan mode it stays read-only and returns a chat-only final plan; in Claude Code Plan mode it uses Claude's plan approval/exit flow and writes files only after approval exits Plan mode; in writable/default mode it saves Markdown plans under .plannings/YYYY-MM-DD-feature-slug.md. HTML or visual artifacts are explicit and writable-mode-only.
npx skillsauth add bahayonghang/my-claude-code-settings sparkInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Turn rough ideas into an approved implementation plan. Spark is a planning skill, not an execution skill: it clarifies intent, records assumptions, uses the active planning surface correctly, and stops for user approval.
Writable/default output is a Markdown plan at <project-root>/.plannings/YYYY-MM-DD-<feature-slug>.md. Native Plan modes are read-only while active. Create an HTML or visual artifact only when the user explicitly asks for HTML, browser-viewable, visual, mockup, or comparable output and the current surface allows file writes.
Choose the planning surface before deriving an output path. Do not force-enter Codex Plan mode just to run Spark; the user controls Codex native Plan mode with the client UI such as /plan or its mode toggle. Claude Code Plan mode may expose explicit plan-mode tools; use those only in the Claude Code branch.
| Surface | Use when | Output | File-write rule |
| --- | --- | --- | --- |
| Codex native Plan mode | The Codex session is already in Plan mode. | Final plan in chat only. Use request_user_input when available for one blocking structured question; otherwise ask one concise plain-text question. | Read-only. Do not derive or write .plannings, .spark, HTML, CONTEXT.md, ADR, task, or implementation files. |
| Claude Code Plan mode | The Claude Code session is in Plan mode, or Claude Code exposes native Plan mode tools for this workflow. | Submit the plan through Claude's approval flow. Use EnterPlanMode/ExitPlanMode when those tools are available. | Do not write files while Plan mode is active. After ExitPlanMode approval exits Plan mode into a writable permission mode, materialize the approved Spark plan if durable output was requested, then stop. |
| Writable/default mode | No native Plan mode is active and file writes are allowed. | Markdown plan in .plannings/YYYY-MM-DD-<feature-slug>.md; optional paired HTML/visual only on explicit request. | File writes are limited to the planning artifacts described below. Do not modify production files. |
| Compatibility fallback | No native plan surface or structured question tool is available. | Use the writing-plans planning method only as a fallback rubric. | If file writes are allowed, use writable/default mode. If file writes are not allowed, return a chat-only plan and say no artifact was saved. |
Track each item and complete them in order:
request_user_input in Codex Plan mode, AskUserQuestion in compatible Claude-style environments), otherwise ask one concise plain-text question. Record non-blocking unknowns as assumptions instead of stopping.<project-root>/.plannings/YYYY-MM-DD-<feature-slug>.md only in writable/default mode, or after Claude Code ExitPlanMode approval has exited into a writable permission mode.<project-root>/.plannings/YYYY-MM-DD-<feature-slug>.html and follow the offline HTML contract.digraph spark_plan {
"Choose planning surface" [shape=box];
"Explore project context" [shape=box];
"Interrogate blocking decisions" [shape=box];
"Codex Plan mode
chat-only final plan" [shape=box];
"Claude Plan mode
ExitPlanMode approval" [shape=box];
"Writable Markdown plan
.plannings/YYYY-MM-DD-<feature-slug>.md" [shape=box];
"Explicit HTML/visual branch and writable?" [shape=diamond];
"Optional paired HTML
.plannings/YYYY-MM-DD-<feature-slug>.html" [shape=box];
"Self-review" [shape=box];
"User approves plan?" [shape=diamond];
"Wait for separate execution request" [shape=doublecircle];
"Choose planning surface" -> "Explore project context";
"Explore project context" -> "Interrogate blocking decisions";
"Interrogate blocking decisions" -> "Codex Plan mode
chat-only final plan" [label="Codex Plan mode"];
"Interrogate blocking decisions" -> "Claude Plan mode
ExitPlanMode approval" [label="Claude Plan mode"];
"Interrogate blocking decisions" -> "Writable Markdown plan
.plannings/YYYY-MM-DD-<feature-slug>.md" [label="writable"];
"Writable Markdown plan
.plannings/YYYY-MM-DD-<feature-slug>.md" -> "Explicit HTML/visual branch and writable?";
"Explicit HTML/visual branch and writable?" -> "Optional paired HTML
.plannings/YYYY-MM-DD-<feature-slug>.html" [label="explicit request"];
"Explicit HTML/visual branch and writable?" -> "Self-review" [label="default"];
"Optional paired HTML
.plannings/YYYY-MM-DD-<feature-slug>.html" -> "Self-review";
"Codex Plan mode
chat-only final plan" -> "Self-review";
"Claude Plan mode
ExitPlanMode approval" -> "Self-review";
"Self-review" -> "User approves plan?";
"User approves plan?" -> "Interrogate blocking decisions" [label="changes requested"];
"User approves plan?" -> "Wait for separate execution request" [label="approved"];
}
Understanding the idea:
AGENTS.md, code_map.md, existing .plannings/ plans, task PRDs, CONTEXT.md, CONTEXT-MAP.md, docs/adr/, package ADR folders, relevant code, tests, configs, and fixtures.Decision-tree interrogation:
CONTEXT.md defines a term differently from the user's wording, name the mismatch and ask which meaning governs the plan.CONTEXT.md, or task-file updates as follow-up actions in the final plan. Do not edit those files until the session exits Plan mode into a writable request.Exploring approaches:
Design for isolation and clarity:
The Markdown plan path in writable/default mode is:
<project-root>/.plannings/YYYY-MM-DD-<feature-slug>.md
Skip this path entirely in Codex native Plan mode. In Claude Code Plan mode, derive and write this path only after ExitPlanMode approval has exited Plan mode into a writable permission mode.
Rules:
YYYY-MM-DD format.<feature-slug> from the feature name when one is obvious.-v2 or a more specific noun..gitignore; .plannings/ is the expected local planning area.Use this structure unless the repository already has a stronger plan template:
# <Feature Name> Implementation Plan
- Date: YYYY-MM-DD
- Feature slug: <feature-slug>
- Status: Draft for user review
## Summary
## Goals
## Non-goals
## Current context
## Assumptions
## Recommended approach
## Alternatives considered
## Implementation steps
## Files and areas likely to change
## Risks and mitigations
## Test and acceptance criteria
## Approval gate
Implementation steps should be concrete enough that a fresh agent can execute them without redesigning the feature. Acceptance criteria must name observable checks, commands, or behaviors; avoid vague wording such as "confirm it works".
When Spark is in Codex native Plan mode, end with a chat-only final plan containing:
When Spark is in Claude Code Plan mode, submit the plan through the Claude Code approval flow with ExitPlanMode when available. If approval exits Plan mode into a writable permission mode and the user wanted durable Spark output, then write the approved Markdown plan under .plannings/ and stop. If the user does not approve, do not write an artifact.
Only create a .html artifact when the user explicitly requests HTML, a browser-viewable plan/spec, visual output, mockups, layout comparisons, or a similar visual deliverable.
This branch is unavailable while Codex native Plan mode or Claude Code Plan mode is active because the visual companion and HTML branch write files. In active Plan modes, list the requested HTML/visual artifact as a follow-up to create after leaving Plan mode.
When the explicit branch is active:
<project-root>/.plannings/YYYY-MM-DD-<feature-slug>.html.assets/spec-template.html when a full HTML plan/spec is needed.h1, a main id="main", and clear headings.[placeholder], or lorem ipsum.spec-document-reviewer-prompt.md only for this HTML branch; the default Markdown plan uses the Markdown self-review below.visual-companion.md before starting the browser companion. Visual companion scratch files are separate from the default plan output.Before asking for approval, review the generated plan and fix issues inline:
.plannings, .spark, HTML, CONTEXT.md, ADR, task, or implementation file writes were performed while Codex native Plan mode or Claude Code Plan mode was active.After self-review, respond with:
Then stop. Do not implement until the user separately asks to execute the approved plan.
.plannings/ only when the current surface allows file writes; HTML is opt-in.The browser-based companion is available only for explicit visual planning needs in writable/default mode. Use it for mockups, diagrams, layout comparisons, and other genuinely visual choices. Keep textual requirements, scope decisions, and technical tradeoffs in the terminal.
Before starting the companion, read the detailed guide:
visual-companion.md
tools
文献深度解读助手,像研究生导师一样交互式解读 Zotero 库中的学术论文,面向计算机科学、深度学习、自动化等方向(个人向)。当用户提供文献题目、DOI、PDF 或要求解读某篇论文时触发,通过 Zotero MCP 优先获取全文,并根据用户意图自动选择快速筛选、导师深读或研究复盘模式。完整深读时先完成叙事类型判断、阅读前预检、novelty 校准和作者思考路径重建,再整体概览,并基于图例、正文和表格逐图详细解读(Zotero MCP 无法提取 PDF 图片,解读基于文字信息,必要时提醒上传图片)。适用于:(1)快速判断文献是否值得深读 (2)深入理解某篇论文 (3)学习文章中的方法和技术 (4)批判性分析研究设计 (5)寻找研究灵感。需要多篇论文综合、对比或找研究空白,或 arXiv/DOI 批量规范化时,改用 paper-workbench。
development
Review Codex, Claude, OpenAI, or other agent skill directories as reusable capability packages. Use when asked to audit, review, improve, score, rewrite, debrand, package, or document a SKILL.md, skill package, marketplace skill, or agent skill directory, especially when the user wants a comprehensive findings-first report with concrete patch recommendations and validation steps.
development
Turn vague or complex Codex tasks into strong `/goal` commands with outcome, verification, constraints, boundaries, iteration policy, completion evidence, and pause/block conditions. Use when the user asks for Codex goal instructions, Goal 指令, 目标指令, `/goal` prompts, 中文 Goal 模板, plan-to-goal interviews, success criteria, verification commands, or bounded agent work definitions.
tools
Write, debug, and validate ast-grep structural code search rules. Use this skill when the user needs syntax-aware code search, AST pattern matching, structural refactor discovery, language-construct queries, or searches that plain text tools like rg can miss, such as finding functions with particular descendants, calls inside specific contexts, missing error handling, React hook shapes, decorators, or other Tree-sitter-backed code structures.