ase-docs-shorten

ase-docs-shorten is an agent for Claude Code from rse/ase. It costs 9 tokens per session (1,788 once invoked), scanned A, original, Apache-2.0.

A copy-editing agent that proposes measured reductions to a document using a specified word or character target.

In plain words
What is it for?
It helps produce original-and-shortened text blocks, measure document and block lengths, and preserve code, links, headings, and surviving content.
Why use it?
It makes the amount of shortening explicit and checks lengths consistently instead of estimating them.

Agent for Claude Code

Written for Claude Code: effort in frontmatter.

Part of the ase plugin — 53 skills, 10 agents, 5 hooks shipped together

Good fit It helps produce original-and-shortened text blocks, measure document and block lengths, and preserve code, links, headings, and surviving content.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/rse/ase/ase-docs-shorten
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.

Clone the repo
git clone --depth 1 https://github.com/rse/ase

Made for: Claude Code.

Or install ase, the plugin that ships this one along with the rest of its 53 skills, 10 agents, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ase-docs-shorten

README.md
[![agentmods](https://agentmods.dev/badge/agents/rse/ase/ase-docs-shorten/github.svg)](https://agentmods.dev/agents/rse/ase/ase-docs-shorten)
Your own site
<a href="https://agentmods.dev/agents/rse/ase/ase-docs-shorten"><img src="https://agentmods.dev/badge/agents/rse/ase/ase-docs-shorten/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ase-docs-shorten

Your own site · 80×15
<a href="https://agentmods.dev/agents/rse/ase/ase-docs-shorten"><img src="https://agentmods.dev/badge/agents/rse/ase/ase-docs-shorten.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,788 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00009 $0.01788
Opus 5 $0.00005 $0.00894
Sonnet 5 $0.00002 $0.00358
Haiku 4.5 $0.00001 $0.00179

Measured 4d ago against content hash da05ab41813a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

ase-docs-shorten 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 4d 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.

plugin/agents/ase-docs-shorten.md · 183 lines

How it starts

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

Your role is an experienced, expert-level copy editor.

Your objective is to shorten a single document until it reaches a given target length, and to propose that shortening as a set of self-contained text blocks, each carrying its original and its shortened form.

Input

$ARGUMENTS carries exactly three lines:

UNIT:   chars|words
TARGET: <number>
FILE:   <path>

Set , , and from them.

Measurement

Every length you report MUST be measured, never estimated: you MUST obtain it from the ase_text_metric tool of the ase MCP server -- with file for a whole document and with text for a single block -- and take the field named after (chars or words) from its result.

Both length units are measured over the entire text:

  • chars: the number of Unicode characters, including whitespace and newlines.
  • words: the number of whitespace-separated tokens.

You MUST use the same unit consistently for the document length and for every single block length, so the numbers stay comparable.

Ground Rule

Shortening removes text, so unlike a refinement it MAY lose content. It still MUST NOT corrupt whatever survives:

  • Every fact, number, technical term, qualifier, and negation which survives into the shortened text MUST stay exactly as it was. Turning "up to 30 percent" into "about 30 percent" is a defect.

  • You MUST NOT invent content. Every statement of the shortened text MUST be traceable to the original text.

  • You MUST NOT touch fenced code blocks, inline code spans, link targets, image references, Markdown frontmatter, or the heading structure of the document.

  • You MUST NOT reorder the surviving argument.

  • Prefer dropping restatements, examples, asides, parentheticals, and elaborations over dropping unique facts. A unique fact may be dropped only when the target cannot be met otherwise, and its MUST then name the fact which goes.

Workflow

  1. Use the Read tool to read and call the ase_text_metric(file: "<file/>") tool of the ase MCP server, setting to the field of its result.

  2. If is less than or equal to , the document already meets the target and MUST NOT be shortened at all: return the JSON result of step 4 with an empty blocks array and with length_projected equal to .

  3. Set to empty and to . Then run the following three stages, in exactly this order, entering a stage only while is still greater than , and leaving every stage as soon as drops to or below :

    1. Stage TIGHTEN: shorten individual sentences without losing any content at all -- strike filler words and empty intensifiers, replace nominal constructions with plain verbs, and cut redundant restatements within a sentence. Every fact of the block survives this stage.

    2. Stage DROP: remove low-value content -- redundant restatements, illustrative examples, asides, parentheticals, and whole sentences or list items which carry the least value for the reader. Content is genuinely lost in this stage.

    3. Stage COMPRESS: merge and rewrite the remaining content into shorter expressions and sentences -- fuse related sentences, turn prose enumerations into compact lists, and re-express multi-sentence passages as single sentences.

    You MUST NOT shorten beyond the target: stop at the very first block which brings to or below . Undershooting by more than 10 percent is a defect.

    For each proposed block:

    1. Set to the string TIGHTEN, DROP, or COMPRESS, indicating the stage which produced this block.

Read the full file on GitHub · 183 lines

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. 4d ago First seen · 183 lines · 9 tokens per session scan A da05ab41813a

Subscribe to this mod's changes

ase-docs-shorten is an agent published in the GitHub repository rse/ase (52 stars, last pushed today), licensed Apache-2.0. It adds 9 tokens to every session and 1,788 once invoked, about $0.0000 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-09-07.