compression

A suggested editing pass that shortens a selected manuscript section to meet a word, page, or character limit. It preserves citations, stated statistics, main claims, and chosen terminology, and shows each proposed change.

In plain words
What is it for?
Reducing the length of a specified section through sentence- and paragraph-level edits, with a report of preserved content and edits that were deliberately avoided.
Why use it?
It helps fit strict length limits while making it possible to review what was removed or rephrased. The manuscript is not changed automatically.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/seandavi/scriptorium/compression
Any agent
npx skills add seandavi/scriptorium --skill compression
Clone the repo
git clone --depth 1 https://github.com/seandavi/scriptorium

Made for: Claude Code, Codex.

Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,060 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00088 $0.05060
Opus 5 $0.00044 $0.02530
Sonnet 5 $0.00018 $0.01012
Haiku 4.5 $0.00009 $0.00506

Measured 2d ago against content hash 9e0a71d06e45, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

compression scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/compression/SKILL.md · 456 lines

How it starts

The opening of the file, as written. The whole thing — 456 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Compression pass

You are running scriptorium's compression skill. The job is to reduce the length of a manuscript section so it fits a declared length target (word count, page count, or character count), while preserving every citation, every declared statistic, every core claim, and every declared terminology choice. This is a transformation skill that operates one level closer to copyediting than argumentative-flow does — it does sentence-level and paragraph-level reductions, not structural reorganisation — but it inherits the same preservation contract.

This skill suggests edits. It does not apply them. The output is a structured markdown report the author reads, accepts, or rejects edit-by-edit. The manuscript on disk is unchanged.

Invocation discipline — read before doing anything else

This skill must be invoked explicitly by the user. Never run it proactively, never run it as a follow-up to another skill's output without the user re-asking. The author owns their voice and their section length; an unrequested compression — even a "helpful" one — is unwelcome.

If the user has not specified a section, ask. Do not compress an entire manuscript at once — the unit of work is one section at a time (introduction, abstract, results, discussion, or a named subsection). Single-section scope is what makes the diff reviewable.

If no length target is declared in MANUSCRIPT_STATE.yaml#constraints.max_word_count and the user has not supplied one at invocation, ask. Refuse to "just shorten" without a target — compression without a target is an opinion about the author's prose, not a structural service.

Hard preservation constraints

These are non-negotiable. Every proposed edit must satisfy all of them. If you cannot satisfy them while reducing length, do not propose the edit — surface it in the "Edits NOT proposed" section with the reason.

  1. Every cite key in the source is present in the output, with the same cite key. No removals, no renamings. If a sentence is cut, any citations it carried must be re-attached to the surviving sentence that makes the same claim, or the edit is not proposed. Reference [[hallucination-in-llm-citations]] for the failure mode inverse to this constraint (invention); the failure mode here is omission of cited support.
  2. Every quantitative statement is preserved verbatim — numbers, units, p-values, confidence intervals, effect sizes, percentages, sample sizes. Do not round, re-express, or substitute "majority" for "53%." A compression that swaps a number for a word has crossed into translation, not reduction.
  3. Every declared core_claim is preserved. Read MANUSCRIPT_STATE.yaml#core_claims. Any candidate edit that would re-scope, weaken, or remove a declared claim is not a compression edit — it is a scope change, and scope changes belong to the author.
  4. Every distinct claim in the source is preserved as a distinct claim. Two claims that the prose presents as distinct may not be merged into one. Granularity loss looks like compression but reads as a stealth scope change.
  5. Terminology declared in MANUSCRIPT_STATE.yaml#terminology is honored. Use terminology.preferred. Avoid terminology.forbidden. Apply terminology.synonyms where the author has licensed them. Do not introduce new terms not licensed by the state file.
  6. Voice and tone are preserved. Active or passive as the source has it; the style.voice and style.tone from the state file are the targets. No "helpful" stylistic embellishment. Per the AI-writing failure-modes literature ([[ai-writing-failure-modes]]), compression is a common surface for AI-writing tells to creep in: em-dash overuse, rule-of-three constructions, inflated symbolism, replacement of plain words with elevated synonyms. These are forbidden transformations.
  7. Hedging and stance markers are preserved. Epistemic modals ("may", "might", "could"), epistemic adverbs ("possibly", "apparently"), approximators ("approximately", "about"), attributive verbs ("we suggest", "we propose"), and indirect attributions ("it has been suggested", "it is possible that") are how the source calibrates the strength of its claims. Per [[esl-writers-swales-hyland]], these patterns vary legitimately across linguistic backgrounds. A compression that removes a hedge has weakened (or strengthened) the underlying claim and crossed a claim boundary. Hedging stacks ("may potentially possibly") are the only legitimate target: a stack adds no calibration, only tokens. Reducing a stack to a single hedge is compression; removing the hedge entirely is not.

Read the full file on GitHub · 456 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 456 lines · 88 tokens per session scan A 9e0a71d06e45

Subscribe to this mod's changes

compression is a skill published in the GitHub repository seandavi/scriptorium (3 stars, last pushed 1mo ago), licensed MIT. It adds 88 tokens to every session and 5,060 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

skillpack-creator

Create a reusable SkillPack from a successful completed task. Use when the user wants to convert a one-off research, coding, analysis, or content workflow into a distributable local SkillPack with skillpack.json, local skills under skills/, starter prompts, start scripts, and an optional zip package.

CreminiAI/skillpack · 67 tokens

skill-creator

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

CreminiAI/skillpack · 64 tokens

super-design

Use when the user asks you to build, style, theme, refine, audit, or recreate UI — or uploads a screenshot to rebuild. Reads DESIGN.md as a closed token layer, detects the project's framework (Tailwind v4/v3, ShadCN, MUI, Radix, Geist), and enforces production design rules (tokens only, full state matrix, WCAG 2.2 AA…

Eldergenix/SUPER-DESIGN · 122 tokens

deep-modules

Measures module depth: whether the interface is simple relative to the implementation behind it. Use when an interface has too many parameters or methods, many small classes each do too little, or methods just forward calls. Not for whether adjacent layers provide different abstractions (use abstraction-quality) or…

codybrom/clairvoyance · 71 tokens

red-flags

Scans code against 17 design smells (the book's 14 named Red Flags plus 3 process-stage signals) and produces a structured diagnostic report. Use when reviewing a PR against a comprehensive checklist, evaluating unfamiliar code, or when the user asks for a red flags scan. Not for diagnosing why code feels complex (use…

codybrom/clairvoyance · 86 tokens

comments-docs

Reviews comment quality and documentation practices: the four comment types, comments-first workflow, and comment rot. Use when reviewing comments or docs, when comments just repeat the code, or when something is hard to describe in a sentence. Not for naming or code obviousness (use naming-obviousness).

codybrom/clairvoyance · 63 tokens