Skip to content
Development
Skill

/ase-docs-shorten

Shorten a document toward a target length, given as either `--chars <N>` or `--words <N>`: first tighten the sentences, then drop low-value content, then compress the remaining content into shorter expressions -- each stage entered only while the target is still not met. Use

From plugin
ase
7561 skills11 agents

Claude Code

$ npx -y skills add rse/ase --skill ase-docs-shorten --agent claude-code

SKILL.md

ase-docs-shorten.SKILL.md
name: ase-docs-shorten
argument-hint: "[--help|-h] [--auto|-a] (--chars|-c <N> | --words|-w <N>) <docs-reference>"
description: >
    Shorten a document toward a target length, given as either `--chars <N>` or `--words <N>`: first
    tighten the sentences, then drop low-value content, then compress the remaining content into
    shorter expressions -- each stage entered only while the target is still not met. Use when the
    user wants to "shorten", "cut down", or "reduce the length of" a document.
user-invocable: true
disable-model-invocation: false
effort: high

@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md @${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md

<purpose name="ase-docs-shorten"> Shorten a Document to a Target Length </purpose>

<expand name="getopt" arg1="ase-docs-shorten" arg2="--auto|-a --chars|-c=0 --words|-w=0"> $ARGUMENTS </expand>

<objective> *Shorten* the document of `<getopt-arguments/>` until it reaches the requested *target length* by running three *stages* in order -- tighten the sentences, drop low-value content, compress the remaining content into shorter expressions -- and entering each stage *only* while the target is still not met. </objective>

Ground Rule -----------

This skill *removes* text, so unlike `ase-docs-refine` 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 stays *exactly* as it was, no content is invented, the order of the surviving argument is kept, and fenced code blocks, inline code spans, link targets, Markdown frontmatter, and the heading structure are never touched.

The skill also *MUST* *NOT* shorten *beyond* the target: it stops at the first change which reaches the target, so a document is never cut more than the user asked for.

<flow>

1. <step id="STEP 1: Resolve Target and Document">

1. Determine the *target length* from the two mutually exclusive options. Set <chars/> to <getopt-option-chars/> and <words/> to <getopt-option-words/>, treating a *non-numeric* or *negative* value as `0`. Then dispatch:

  • <if condition="<chars/> is `0` and <words/> is `0`">

Only output the following <template/> and then *IMMEDIATELY* *STOP* all further skill processing:

<template> ⧉ **ASE**: ✪ skill: **ase-docs-shorten**, ▶ ERROR: a target length is required -- pass either `--chars <N>` or `--words <N>` </template>

</if>

  • <if condition="<chars/> is not `0` and <words/> is not `0`">

Only output the following <template/> and then *IMMEDIATELY* *STOP* all further skill processing:

<template> ⧉ **ASE**: ✪ skill: **ase-docs-shorten**, ▶ ERROR: `--chars` and `--words` are mutually exclusive -- pass only one of them </template>

</if>

  • <if condition="<chars/> is not `0`">

Set <unit>chars</unit> and <target><chars/></target>. </if> <else> Set <unit>words</unit> and <target><words/></target>. </else>

Do not output anything else in this substep.

2. *Silently* resolve `<getopt-arguments/>` to the list <documents/> of individual document files, expanding any directory or wildcard reference with the `Glob` tool. Then dispatch:

  • <if condition="<documents/> is empty">

Only output the following <template/> and then *IMMEDIATELY* *STOP* all further skill processing:

<template> ⧉ **ASE**: ✪ skill: **ase-docs-shorten**, ▶ ERROR: no document to shorten </template>

</if>

  • <if condition="<documents/> carries more than one document">

A target length applies to *one* document, so a reference which expands to several documents is *ambiguous*: it is unclear whether the target bounds each document or their sum. Set <count/> to the number of documents, then only output the following <template/> and *IMMEDIATELY* *STOP* all further skill processing:

<template> ⧉ **ASE**: ✪ skill: **ase-docs-shorten**, ▶ ERROR: **<count/>** documents referenced -- a target length applies to exactly one document </template>

</if>

Set <file/> to the single document of <documents/>.

3. Do not output anything else in this STEP 1.

</step>

2. <step id="STEP 2: Investigation">

<if condition="<ase-project-boxing/> is equal `black`">

The project source artifacts are classified as a *black box*, so the user does *not* want them inspected or their problems surfaced. *Skip* the entire investigation and reporting: do *not* invoke any `Agent` tool and do *not* read any document, only output the following <template/> and then *SKIP* the remaining steps STEP 3, STEP 4, and STEP 5:

<template> <ase-tpl-bullet-normal/> **SHORTEN**: *suppressed* (`project.boxing` is `black`) </template>

</if>

First, use the following <template/> to give a hint on this step:

<template> <ase-tpl-bullet-secondary/> **SHORTENING INVESTIGATION**: `<file/>` → **<target/>** <unit/> </template>

Dispatch the investigation to a *sub-agent* via the `Agent` tool so that *no* investigation details leak into the user-visible transcript. The sub-agent performs the silent reading, measuring, and shortening; only its final structured return value is consumed here. As a target length applies to exactly *one* document, exactly *one* sub-agent is invoked, which keeps the length budget coherent:

        Agent(
            description:       "Shorten Investigation",
Read more
@rse
Ships withase

Agentic Software Engineering (ASE)

7561 skills11 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
75
Star history of rse/ase on GitHub, a chart by star-history.com

Other skills on ase.

hello

hello

Show a nice greeting message with a timestamp. Use this when the user wants to greet or say hello, optionally to a certain…

@rse@rseInstall Skill
ase-arch-analyze

ase-arch-analyze

Review software architecture, including package cohesion and inter-package coupling

@rse@rseInstall Skill
ase-arch-discover

ase-arch-discover

Discover additional, third-party components (libraries/frameworks) for the technology stack to provide needed functionality.

@rse@rseInstall Skill
ase-code-analyze

ase-code-analyze

Analyze the source code for problems in either the logic and semantics and its related control flow, performance and efficiency,…

@rse@rseInstall Skill
ase-code-edit

ase-code-edit

Edit Source Code: Use when the user wants to "edit" the code base in one shot from a query or a bare analyzer issue id like "P1",…

@rse@rseInstall Skill
ase-code-explain

ase-code-explain

Explains code with WHAT, WHY, ANALOGY, DIAGRAM, CRUXES, and GOTCHAS. Use when you want to know how code works or when the user…

@rse@rseInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc11d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about ase-docs-shorten.

Which coding agents can use ase-docs-shorten?
ase-docs-shorten installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.