capturing-sparks
Skill1 starsChanged 5 months agoMITView on GitHub
Use when the user wants to save a prompt — "keep this prompt", "save this", "收藏这个问法", /keep — OR when you notice a spark yourself; the user praises a result ("perfect", "完美", "就是这样"), or a prompt refined 2+ times finally produced the desired outcome. Captures the winning prompt as a structured, reusable recipe.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- card-schemaSkill
- releaseSkill
- keepfireSkill
- harvesting-sparksSkill
- recalling-recipesSkill
- tending-the-gardenSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
NEVER save a recipe without the user's explicit yes.
- Very specific: line 20
Check ~/.keepfire/config.json first: if auto_suggest is false, stay silent.
- Distinctive: line 31
Create a task per item and complete in order:
- Very specific: line 64
Fallback — no CLI: write a Markdown card to ~/.keepfire/cards/<id>.md following the exact heading/frontmatter format in this plugin's …
- Distinctive: line 72
Prefer recipes that encode process, not one-off content:
- Distinctive: line 77
If the prompt is too task-specific to generalize, say so instead of saving noise.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Capturing Sparks
A spark is a prompt (or prompt pattern) that clearly worked well for a coding task. Sparks die in chat history unless captured as recipes — structured cards the user can recall and adapt on the next similar task.
<HARD-GATE>
NEVER save a recipe without the user's explicit yes. Proactive detection automates
*recognition*, not *persistence*. If the user declines, drop it silently and do not
re-suggest the same prompt.
</HARD-GATE>When you noticed the spark yourself
Check ~/.keepfire/config.json first: if auto_suggest is false, stay silent.
Otherwise suggest with ONE short line at a natural pause — never mid-task:
🔥 这条 prompt 很出彩,要 keep 吗? / That prompt was elite — keep it?At most one suggestion per session unless the user engages.
Checklist
Create a task per item and complete in order:
- Identify the final effective prompt — the version that worked, not the first rough draft.
- Extract the recipe fields:
title— short, recognizableintent— one ofimplement | debug | review | refactor | test | explain | design | git-pr | perf | security | otherskeleton— the prompt with project-specific names replaced by{{task}},{{diff}},{{files}},{{error}},{{stack}}placeholdersconstraints— the hard rules that made it goodoutput_contract— expected output shape (checklist / diff / severity levels …)good_signals— 1–3 bullets on why it workedanti_patterns— what to avoidstack_hints,trigger_phrases— for recall later
- Redact secrets — tokens, keys, absolute private paths, credentials never go into a recipe.
- Show a draft card and ask:
[save] [edit] [cancel]. (Skip the confirmation only ifcapture_modeisautoin config — the keep intent itself is still required.) - Save on approval (see below), then report:
🔥 Kept #<id> — <title>.
How to save
Preferred — the keepfire CLI (if installed; check with keepfire version):
keepfire keep \
--title "..." --intent review \
--prompt "RAW_PROMPT" --skeleton "SKELETON" \
--stack ts,node --tags pr,security \
--triggers "审PR|security review" \
--constraints "c1|c2" --output "..." \
--why "signal1|signal2" --avoid "anti1" \
--source claude-code --yesFor long prompts write them to a temp file and pass --prompt-file <path>.
Fallback — no CLI: write a Markdown card to ~/.keepfire/cards/<id>.md following
the exact heading/frontmatter format in this plugin's templates/card.md
(flat inline frontmatter only — the CLI parser does not handle nested YAML), with
id YYYY-MM-DD-<slug>-<4 random chars>. Then tell the user to run keepfire reindex
when they install the CLI, or update ~/.keepfire/index.json consistently yourself.
Quality bar
Prefer recipes that encode process, not one-off content:
- good: "reproduce → smallest failing test → minimal fix → verify"
- bad: a prompt bound to one private file path and one bug string
If the prompt is too task-specific to generalize, say so instead of saving noise.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

