agentleFS
ljf06853ljf06853/keepfire/skills/capturing-sparks/SKILL.md

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.

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
  1. Distinctive:

    NEVER save a recipe without the user's explicit yes.

    line 13
  2. Very specific:

    Check ~/.keepfire/config.json first: if auto_suggest is false, stay silent.

    line 20
  3. Distinctive:

    Create a task per item and complete in order:

    line 31
  4. Very specific:

    Fallback — no CLI: write a Markdown card to ~/.keepfire/cards/<id>.md following the exact heading/frontmatter format in this plugin's …

    line 64
  5. Distinctive:

    Prefer recipes that encode process, not one-off content:

    line 72
  6. Distinctive:

    If the prompt is too task-specific to generalize, say so instead of saving noise.

    line 77

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

  1. Identify the final effective prompt — the version that worked, not the first rough draft.
  2. Extract the recipe fields:
    • title — short, recognizable
    • intent — one of implement | debug | review | refactor | test | explain | design | git-pr | perf | security | other
    • skeleton — the prompt with project-specific names replaced by {{task}}, {{diff}}, {{files}}, {{error}}, {{stack}} placeholders
    • constraints — the hard rules that made it good
    • output_contract — expected output shape (checklist / diff / severity levels …)
    • good_signals — 1–3 bullets on why it worked
    • anti_patterns — what to avoid
    • stack_hints, trigger_phrases — for recall later
  3. Redact secrets — tokens, keys, absolute private paths, credentials never go into a recipe.
  4. Show a draft card and ask: [save] [edit] [cancel]. (Skip the confirmation only if capture_mode is auto in config — the keep intent itself is still required.)
  5. 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 --yes

For 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.