agentsclimarketplace

Keepfire

Skill ljf06853/keepfire

Capture, organize, and reuse high-quality coding prompts as versioned recipes. Use when the user says keep/save this prompt, /keep, /use, /garden, "收藏这个问法", "用我以前那种方式", "keep this spark", or wants to reuse a past successful coding prompt pattern for implement/debug/review/refactor/test/design/security tasks. Do not use for general project memory unrelated to prompt reuse.From its SKILL.md

Install
npx -y skills add ljf06853/keepfire

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

8.2 KB, ~2.0k tokens by cl100k_base, as published. Nobody here has run it

Keepfire — Compound Your Coding Sparks

Claude Code users: prefer the plugin instead of this single-file skill — it installs four granular auto-triggering skills plus the journal hook: /plugin marketplace add ljf06853/keepfire then /plugin install keepfire@keepfire. This file remains the surface for Codex / Gemini CLI / other Agent-Skills-standard tools.

You are running the keepfire skill: a personal coding-prompt recipe system.

Sparks (great prompts) should not die in chat history. Turn them into recipes, then recall + adapt them on the next similar task.

Mental model

  • Spark: a prompt (or prompt pattern) that clearly worked well for coding.
  • Recipe: structured card with skeleton, constraints, output contract, and why it worked.
  • Compounding: each reuse can improve the recipe (v1 → v2).

Storage is local Markdown under ~/.keepfire/ (override with KEEPFIRE_HOME). Prefer the keepfire CLI when available; otherwise read/write the same files directly.

Modes

Read ~/.keepfire/config.json if present:

  • capture_mode: confirm (default) | auto
  • use_mode: always_ask | ask_if_low_confidence (default) | auto
  • auto_suggest: true (default) | false — proactive spark detection (see below)
  • auto_apply_threshold: number 0..1 (default 0.75)

If config is missing, assume defaults above.

Commands the user may say

User intentWhat you do
"收藏/keep/save this prompt"Capture flow (/keep)
"用我以前那种方式 /use ..."Recall + adapt flow (/use)
"列出/搜索配方 /garden /list"Browse library
"挖掘/回顾最近的 prompt /harvest"Mine the journal (/harvest)
"改成 auto/confirm"Update capture/use mode
"这次更好,升级配方"Improve version

Proactive spark detection (auto_suggest)

When auto_suggest is not false, watch the session for sparks and suggest keeping them. Signals that a spark just happened:

  • The user praises a result tied to a specific prompt ("perfect", "exactly", "完美", "就是这样", "这个好").
  • A prompt was refined 2+ times and the final version clearly produced the desired result.
  • A prompt encodes a reusable process (e.g. "reproduce → smallest failing test → minimal fix → verify"), not one-off content.

Rules:

  • Suggest with one short line, e.g. 🔥 这条 prompt 很出彩,要 keep 吗? — never interrupt mid-task; wait for a natural pause.
  • At most one suggestion per session unless the user engages.
  • Never save without the user's yes. auto_suggest automates recognition, not persistence; saving still follows capture_mode.
  • If the user declines, drop it silently. Do not re-suggest the same prompt.

/keep — capture a spark

When to capture

When the user explicitly asks to keep something, or when they accept a proactive suggestion (above). Never save otherwise.

What to extract

From the conversation, identify:

  1. Final effective user prompt (not the first rough draft if later refined)
  2. Intent: one of
    implement | debug | review | refactor | test | explain | design | git-pr | perf | security | other
  3. Skeleton: same prompt with project-specific names removed and placeholders like {{task}}, {{diff}}, {{files}}, {{error}}, {{stack}}
  4. Constraints: hard rules that made it good
  5. Output contract: checklist / diff / steps / severity format...
  6. Why it worked (good_signals): 1–3 bullets
  7. Anti-patterns: what to avoid
  8. Stack hints: e.g. ts, react, go, postgres
  9. Trigger phrases: short phrases that should recall this later

Confirm mode (default)

Show a short draft card:

🔥 Keepfire draft
Title: ...
Intent: ...
Skeleton:
  ...
Constraints:
  - ...
Why it worked:
  - ...
[save] [edit] [cancel]

On save approval, persist via CLI:

npx --yes keepfire keep \
  --title "..." \
  --intent review \
  --prompt "RAW_PROMPT" \
  --skeleton "SKELETON" \
  --stack ts,node \
  --tags pr,security \
  --triggers "审PR|security review" \
  --constraints "c1|c2" \
  --output "severity with Critical/Warning/Suggestion" \
  --why "signal1|signal2" \
  --avoid "drive-by refactors" \
  --source claude-code \
  --yes

If CLI is unavailable, write a Markdown card under ~/.keepfire/cards/ using the template in templates/card.md and update ~/.keepfire/index.json consistently (or tell the user to run keepfire reindex).

Auto mode

Save immediately after extraction, then report:

🔥 Kept #id — Title

Still allow undo via keepfire delete <id> --yes.

/use — recall and adapt

  1. Parse the user's new task.
  2. Search the library:
npx --yes keepfire search "user task keywords" --top 5
  1. Present top 1–3 candidates with id, intent, score reasons.
  2. Selection policy:
    • always_ask: always let user pick
    • ask_if_low_confidence: auto-apply only if confidence is high
    • auto: apply best match
  3. Never paste an old prompt blindly. Always adapt:
    • fill placeholders from current task/repo context
    • drop stale file names / dead constraints
    • keep the recipe's structure, constraints, and quality signals
  4. Apply with:
npx --yes keepfire use --id <id> "current task text"

--id accepts any unique id fragment (e.g. --id 4zri). After listing candidates you can also apply the Nth one directly: keepfire use --pick 2 "current task text".

Or use the CLI output as the working instruction and execute the coding task accordingly.

  1. After a successful run, if the user says the result was better, offer /keep improve.

/garden — manage

Support natural language for:

  • list recipes
  • search
  • show one card
  • delete
  • export/import
  • switch modes

CLI:

npx --yes keepfire list
npx --yes keepfire show <id>
npx --yes keepfire delete <id> --yes
npx --yes keepfire mode capture auto
npx --yes keepfire mode use ask_if_low_confidence
npx --yes keepfire mode suggest on
npx --yes keepfire stats
npx --yes keepfire export

/harvest — mine the journal for missed sparks

If the user's environment journals prompts (via a UserPromptSubmit hook running keepfire journal --from-hook, or manual keepfire journal --text "..."), old sparks can be recovered retroactively:

  1. Run:
npx --yes keepfire harvest --limit 20
  1. Entries marked NEW have no similar recipe yet; covered-by:<id> means one exists.
  2. Review the NEW entries and propose the 1–3 strongest as draft cards (same quality bar as /keep: encode process, not one-off content).
  3. On approval, run the normal /keep capture flow for each.
  4. Never bulk-save the whole journal — harvest is curation, not import.

/keep improve — evolve a recipe

When a reuse improves the pattern:

npx --yes keepfire improve <id> \
  --note "Added reproduce-first step" \
  --skeleton "NEW_SKELETON" \
  --why "repro first|minimal fix"

Creates vN+1 linked via parent_id.

Quality bar for coding recipes

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

  • good: "reproduce → smallest failing test → minimal fix → verify"
  • bad: a prompt that only works for one private file path and one bug string

When skeletonizing, replace secrets, absolute paths, proprietary names, and temporary values with {{placeholders}}.

Privacy

  • Local-first: do not upload the library anywhere.
  • Do not capture secrets, tokens, private keys, or credentials into recipes.
  • Redact if the user accidentally includes them.

If tools fail

Fall back to:

  1. Read/write ~/.keepfire/cards/*.md
  2. Keep frontmatter fields compatible with the CLI parser
  3. Ask the user to run keepfire reindex

Response style

Be concise, concrete, and developer-toned. Use the 🔥 marker when a spark is kept successfully.

What ships with it: 25 files

98.1 KB alongside SKILL.md, 10 of them executable

.claude/

.claude-plugin/

agents/

assets/

docs/

examples/

hooks/

src/

templates/

Keep looking

Skills are one crate of 326,645. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.