Langsung ke konten
Skillpedia
Pemrograman umum81k Β· #1592

cost-booster-edit

Fungsinya

Skill ini menerapkan edit kode sederhana yang bisa diulang dengan mesin lokal yang cepat, bukan dengan model AI. Skill ini untuk pengembang yang perlu perubahan kecil yang sama dibuat di banyak file.

Kapan dipakai

  • βœ“Saat Anda perlu perubahan sederhana yang sama di banyak file, misalnya mengganti var dengan const.
  • βœ“Saat Anda ingin edit yang dapat diprediksi dan tidak bergantung pada penalaran AI.
  • βœ“Saat Anda menjalankan pipeline otomatis dan ingin menghindari biaya panggilan AI untuk edit sederhana.

Link skill

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-booster-edit/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-booster-edit/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œTolong ganti setiap var menjadi const di file-file ini untuk saya, tanpa memakai AI.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill mengirim file dan jenis edit yang dipilih ke mesin transformasi lokal yang cepat. Skill mengembalikan kode yang sudah berubah, dan input yang sama selalu menghasilkan output yang sama.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

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 inputs β€” intent (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:

    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 outcome β€” memory_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():

intent latency (ms) wall (ms) confidence strategy success
var-to-const 5 5 0.65 fuzzy_replace true
add-types 1 1 0.64 fuzzy_replace true
remove-console 0 0 0.70 fuzzy_replace true
add-error-handling 0 0 0.85 exact_replace true
async-await 0 0 0.85 exact_replace true

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

Claim Status here
100% win rate Verified β€” 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 latency Verified β€” avg 0.67 ms, p50 0 ms, p99 6 ms, max 6 ms.
$0 per edit Verified structurally β€” no API call, no token billing.
Deterministic AST-based merge Verified β€” same inputs reproduce the same output and strategy.
Confidence β‰₯ 0.5 β‡’ correct Verified on this corpus β€” 12/12 above 0.5 (min 0.551), all correct.
350Γ— speedup vs. LLM Verified β€” 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 edit Measured: $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 LLMs Verified β€” Booster,
Pertanyaan umum

Edit apa saja yang didukung?

Sumbernya mencantumkan enam jenis bawaan: var menjadi const, menambahkan tipe, menghapus console log, menambahkan penanganan error, async-await, dan menambahkan logging.

Kapan saya tidak boleh memakainya?

Jangan dipakai untuk perubahan yang membutuhkan pemahaman maksud, penamaan, atau berkas lain. Pekerjaan seperti itu membutuhkan model AI.

Apakah ini berbiaya?

Tidak. Tidak ada panggilan AI yang dilakukan, sehingga transformasinya sendiri tidak berbiaya model.

Detail

Deskripsi asli dari pembuat

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

repo: ruvnet/ruflo

Popularitas

Bintang GitHub
81k
Peringkat
#1592
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa