SuperAPI AI Directory

compress-file

General & other

View repository

Updated 10-16 03:47

About this skill

Compress File

Cut structure, not meaning — the file must still deliver its purpose, in fewer lines.

Steps

Step 1 — Pin the purpose + its invariants

State in one line what the file is for. List every distinct instruction it must still deliver — the checklist you prove against in Step 4.

Step 2 — Find and remove structural fat

Map which sections restate the purpose, the description, or each other. Judge each overlap:

  • CUT — content another section or the description already carries.
  • FOLD — unique content in the wrong home → move it into the section that governs it, then delete the emptied section.

Score each finding 0.00–1.00 — how sure you are the CUT loses nothing, or the FOLD's new home is right.

invoke the tighten-instruction skill via the Skill tool; tighten each survivor in place. Leave the file's output-contract or skeleton near-untouched — it's the product.

Step 3 — Score-gate and apply

Show the plan, then Edit every finding scoring ≥ 0.80; list the rest as held, un-applied. The edits land in a reviewable diff, revert in one commit, and Step 4 re-reads them cold — so the floor applies without walking each.

**Compression plan — <file>**
Purpose (must survive): <one line>
- [0.92] CUT:  <section/line> — already in <where>
- [0.60] FOLD: <content> → <target section>  · held (< 0.80)

Write Nothing to compress — already lean. when there's nothing to change.

Step 4 — Prove and quantify

Re-read each changed section cold, plan out of view. Confirm every Step 1 invariant survived — in place and still reading right — or was an approved CUT; a FOLD can strand a referent or half a rule, so revert or fix any that broke. Then report net lines and words removed, and the percentage.