Skip to content

Instantly share code, notes, and snippets.

@ashrocket
Created July 8, 2026 15:09
Show Gist options
  • Select an option

  • Save ashrocket/f08f3e5922d310507b0e240cb607b7a2 to your computer and use it in GitHub Desktop.

Select an option

Save ashrocket/f08f3e5922d310507b0e240cb607b7a2 to your computer and use it in GitHub Desktop.
cheaploop skill
name cheaploop
description Compact a running context into `fable.md`, then send the rewritten prompt onward with `cheaploop` disabled by `cheaploop stop`. Use when a session is getting expensive, when you want a repeatable compress-then-send loop, or when browser/Chrome work should stay on the cheapest available model path.

Cheaploop

Use this skill when a prompt needs one compact pass before it is sent onward.

Core loop

  1. Read the current conversation and any local project docs that matter.
  2. Compress the prompt into a shorter, cleaner form.
  3. Write the compressed handoff to fable.md.
  4. Send only the compacted prompt onward.

Rules

  • Keep the rewritten prompt focused on the active task.
  • Preserve facts, constraints, file paths, and verification criteria.
  • Drop repetition, brainstorming debris, and stale context.
  • Treat cheaploop stop as a hard bypass: no compression, no fable.md rewrite, no extra routing.
  • Keep browser/Chrome work on the cheapest available model or lightest viable path.
  • Never route Chrome work through the expensive Fable-style context loop unless the task explicitly requires it.

fable.md contract

Record the handoff in fable.md before the downstream prompt is sent.

Minimum fields:

  • source prompt
  • compacted prompt
  • why content was dropped
  • any browser/Chrome routing decision
  • rough before/after size

Install guidance

When installing this skill in another workspace:

  • add the skill folder under that workspace's Claude skills directory
  • add a project note in that workspace's CLAUDE.md saying browser/Chrome work should use the cheapest available model path
  • keep cheaploop stop as the explicit bypass phrase

Verification

Use a small fixture set:

  • short prompt
  • context-heavy prompt
  • stale-context prompt
  • cheaploop stop prompt

Pass criteria:

  • the compacted prompt is shorter
  • critical facts survive
  • stale facts are removed
  • stop bypasses compression
  • Chrome routing stays separated from the expensive loop

Cheaploop Verification

Test the skill as a compression layer, not as a one-off prompt rewrite.

Baseline

  • Send the same task directly.
  • Record the exact prompt length and output.

Cheaploop run

  • Run the task through cheaploop.
  • Confirm fable.md exists and records the transformation.
  • Confirm the rewritten prompt is meaningfully shorter.

Quality checks

  • Did the answer still satisfy the original task?
  • Were file paths, constraints, and stop conditions preserved?
  • Were stale details removed?

Chrome routing check

  • If the task touches Chrome or browser control, verify the browser path stays on the cheapest available model or lightest available path.
  • Verify the expensive context loop is not reused for browser control unless explicitly required.

Stop check

  • Run a prompt that includes cheaploop stop.
  • Verify no compression occurs and no fable.md handoff is written.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment