shorten-safely
Skill8 starsChanged 8 days agoMITView on GitHub
Use when a person gives you a text of theirs (an email, meeting notes, a report) and wants it made shorter; when the request names a limit in characters or words, or says trim, condense, tighten or "make it fit"; or when they say some part must stay exactly as written ("cut this to 280 characters but keep the legal line"). Not for summarising material you gathered yourself (web pages, logs, code), shortening your own draft, or translating or changing tone with no length reduction.
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- after-merge-checkSkill
- agent-rolesSkill
- clarify-with-ownerSkill
- decide-before-buildSkill
- delegate-briefSkill
- done-whenSkill
- findings-logSkill
- hold-for-ownerSkill
- latest-checkSkill
- link-checkSkill
- merge-resultsSkill
- plan-to-issuesSkill
- read-the-contractSkill
- repo-setupSkill
- review-queueSkill
- secret-scopeSkill
- session-recallSkill
- show-it-worksSkill
- tool-contractSkill
- unattended-batchSkill
The file
Files
shorten-safely
Pin down what must stay word for word, measure with a script instead of estimating, and show the author every removal before the short version is used.
When to use
A person hands you their text and wants it shorter, to a limit or not, with or without passages that must survive unchanged.
Steps
- Settle the protected passages before editing, so the cut is planned around them. If the person has not made clear what is untouchable, ask.
- Save the source to a file, for example
work/source.txt, so checks run on real characters. - Copy each protected passage out of the source file by machine (a line range or a pattern match written to
work/keep.txt, passages separated by a line holding only%%%). Retyping silently swaps quotation marks, dashes and spaces. - Write the short version to
work/short.txt. - Run the script with the person's limit. Never estimate length: language models miscount characters and words.
- On a protected mismatch, fix only the character the script names, then run again. Rewriting the whole passage usually introduces a different error.
- Repeat until the script prints
result: PASS. - Before delivering or saving, show the person the report: measured length, limit and margin; the verdict on each protected passage; every removed sentence; every sentence that is new wording. Condensing can add statements the author never made. Skip this only if they waived it.
- If they want something back, reinstate it and run the script again, because the limit may no longer hold.
Produce
Short version: 268 characters (limit 280, margin +12). PASS
Protected: 1 of 1 intact ("Costs are covered by the repair fund.")
Removed:
- Hello neighbours,
- Thank you for your patience!
New wording (yours to approve):
- The lift works; the back stairs are closed.
was: During that time the lift stays in service, but the back stairs are closed.
<the short version>Script
node scripts/compare-texts.mjs --source work/source.txt --short work/short.txt \
--protected work/keep.txt --max-chars 280 # or --max-words 60Node 18+, no dependencies, no network, no writes. It prints the measured length against the limit (a character is one Unicode code point; a word is any run without whitespace), and for each protected passage either INTACT or the earliest differing character with its code point, for example:
protected 1/1 in short version: MISMATCH at character 11 of the passage
expected "’" U+2019 RIGHT SINGLE QUOTE
found "'" U+0027 STRAIGHT APOSTROPHEIt then lists source sentences missing from the short version and short-version sentences missing from the source. Exit 0 only when the limit holds and every passage is intact, 1 when a check fails, 2 on a usage or file error. A passage that is not an exact copy from the source also fails.
Left to you: sentences are compared as exact text, so a reworded sentence shows up in both lists. Pair them yourself and say whether the meaning changed. The script does not judge meaning.
Stop and ask
- It is unclear which passages are protected, or which unit the limit is in.
- The protected passages alone exceed the limit.
- The limit cannot be met without dropping something the person asked to keep.
Not for
Improving style or message, summarising sources the person did not supply, or translation.
Script paths
scripts/... in this file means the scripts/ folder of this skill, wherever the skill is installed. From a project root that is usually .claude/skills/shorten-safely/scripts/, so the full form of a command is node .claude/skills/shorten-safely/scripts/<file>.mjs ....
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

