Cost Booster Edit logo

Cost Booster Edit

CommunityPopular
ruvnet
cost-booster-edit

Apply a simple code transform via agent-booster's WASM engine — sub-millisecond, deterministic, $0 (no LLM call). Companion to cost-booster-route.

Overview

Publisherruvnet
Repositoryruflo
Skill namecost-booster-edit
Stars
72.7K
Forks
8.6K
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by ruvnet on GitHub. Read the source before you install it.

Installation

Install the Cost Booster Edit AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ruvnet/ruflo.git /tmp/ruflo
mkdir -p .claude/skills
cp -r /tmp/ruflo/plugins/ruflo-cost-tracker/skills/cost-booster-edit .claude/skills/cost-booster-edit
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cost Booster Edit in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cost Booster Edit on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cost Booster Edit is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Cost Booster Edit

Direct wrapper around agent-booster.apply() (npm agent-booster v0.2.x, exposed via agentic-flow/agent-booster). Use when a transform is already classified as Tier 1 eligible — cost-booster-route recommends whether; this skill executes.

When to use

  • Bulk transforms across many files (var → const, add-types, remove-console, add-error-handling, async-await, add-logging).
  • Any simple, structural edit where an LLM would otherwise be called and billed.
  • Inside CI pipelines where determinism + zero-cost matter more than naturalness.

Do NOT use when the transform requires reasoning about intent, naming, or cross-file context — those are Tier 2/3 jobs.

Steps

  1. Take inputsintent (one of the 6 booster intents) and file path.

  2. Read the source to a variable, derive the intended edit text from the intent (caller supplies).

  3. Invoke — run from anywhere under v3/ so agent-booster resolves:

    bash
    node --input-type=module -e '
      import("agent-booster")
        .then(async ({ AgentBooster }) => {
          const booster = new AgentBooster();
          const r = await booster.apply({
            code: process.argv[1],
            edit: process.argv[2],
            language: process.argv[3] || "javascript",
          });
          console.log(JSON.stringify({
            success: r.success, output: r.output, latency: r.latency,
            confidence: r.confidence, strategy: r.strategy,
            tokens: r.tokens,
          }));
        })
        .catch(e => console.log(JSON.stringify({ success: false, error: String(e.message) })));
    ' -- "$CODE" "$EDIT" "$LANG"
  4. Check confidence — default threshold is 0.5. Below that, fail closed: do NOT write the file; report and escalate to Tier 2/3.

  5. Write back the output field if success && confidence >= 0.5.

  6. Persist outcomememory_store --namespace cost-tracking --key "booster-edit-..." --value '{"intent":..., "latency":..., "confidence":..., "strategy":..., "applied":true}'. Feed the routing learner via hooks_model-outcome (use the cost-optimize skill's step 8).

Measured benchmark (2026-05-04, this checkout)

5 representative intents run through AgentBooster.apply():

intentlatency (ms)wall (ms)confidencestrategysuccess
var-to-const550.65fuzzy_replacetrue
add-types110.64fuzzy_replacetrue
remove-console000.70fuzzy_replacetrue
add-error-handling000.85exact_replacetrue
async-await000.85exact_replacetrue

Avg measured latency ≈ 1.2 ms. All 5 above the default 0.5 confidence threshold. See docs/benchmarks/0002-baseline.md for the LLM-baseline comparison.

What's verified locally

ClaimStatus here
100% win rateVerified — 12/12 on bench/booster-corpus.json (see runs/latest.json). Booster AND Gemini 2.0 Flash both score 12/12 — this is a structural-correctness corpus, not a hard adversarial one.
Sub-millisecond latencyVerified — avg 0.67 ms, p50 0 ms, p99 6 ms, max 6 ms.
$0 per editVerified structurally — no API call, no token billing.
Deterministic AST-based mergeVerified — same inputs reproduce the same output and strategy.
Confidence ≥ 0.5 ⇒ correctVerified on this corpus — 12/12 above 0.5 (min 0.551), all correct.
350× speedup vs. LLMVerified — exceeded against every tier: 1000.9× vs Gemini 2.0 Flash, 1838.7× vs Claude Sonnet 4.6, 2634.1× vs Claude Opus 4.7. Run BENCH_LLM_BASELINE=1 BENCH_ANTHROPIC=1 node scripts/bench.mjs to refresh.
Cost saved per editMeasured: $0.000020 vs Gemini, $0.000722 vs Sonnet 4.6, $0.004720 vs Opus 4.7 (the booster side is $0 in all cases).
Win parity with frontier LLMsVerified — Booster, Gemini 2.0 Flash, Sonnet 4.6, Opus 4.7 all scored 12/12 on this corpus. Booster matches LLM accuracy structurally for deterministic transforms.

To extend: add cases to bench/booster-corpus.json, run ( cd v3 && node ../plugins/ruflo-cost-tracker/scripts/bench.mjs ) (or with BENCH_LLM_BASELINE=1), commit runs/latest.json. Smoke step 23 fails the build if win rate drops below 0.80.

Override the LLM model: BENCH_LLM_MODEL='claude-sonnet-4' (when wired against api.anthropic.com) or BENCH_LLM_MODEL='models/gemini-2.5-flash' for a reasoning-model comparison. Pricing flags: BENCH_LLM_PRICE_IN, BENCH_LLM_PRICE_OUT.

fuzzy_replace is best-effort; for production transforms prefer cases that route to exact_replace (≥0.85 confidence in our sample).

Cross-references

ADR-0002 §"Decision 1" (route classifier) and §"Riskiest assumption" (Bash-shelled invocation) · cost-booster-route (classifier-side companion) · agent-booster npm README (3-mode install, MCP / npm / HTTP).

Frequently asked questions

What does the Cost Booster Edit AI skill do?

Apply a simple code transform via agent-booster's WASM engine — sub-millisecond, deterministic, $0 (no LLM call). Companion to cost-booster-route.

Why use Cost Booster Edit on TypingMind?

Because you install it once and use it with any model. Cost Booster Edit is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cost Booster Edit in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ruvnet/ruflo/tree/main/plugins/ruflo-cost-tracker/skills/cost-booster-edit. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Cost Booster Edit?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cost Booster Edit?

As many as you like. As long as a model supports skills, you can use Cost Booster Edit with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cost Booster Edit AI skill free?

Yes. It is published on GitHub by ruvnet under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇