skill-shortener

skill-shortener is a skill for Claude Code from luongnv89/asm. It costs 58 tokens per session (4,752 once invoked), scanned E, original, MIT.

A process for shortening an overlong SKILL.md while keeping its behavior, by moving detailed material into files loaded only when needed.

In plain words
What is it for?
It helps measure, classify, shorten, reorganize, and verify an existing skill file.
Why use it?
It lowers the instructions an agent must read on every use without removing important guidance.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions subagents; positional $N argument.

Good fit It helps measure, classify, shorten, reorganize, and verify an existing skill file.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/luongnv89/asm/skill-shortener
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.

Any agent
npx skills add luongnv89/asm --skill skill-shortener
Clone the repo
git clone --depth 1 https://github.com/luongnv89/asm

Made for: Claude Code.

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 skill-shortener

README.md
[![agentmods](https://agentmods.dev/badge/skills/luongnv89/asm/skill-shortener/github.svg)](https://agentmods.dev/skills/luongnv89/asm/skill-shortener)
Your own site
<a href="https://agentmods.dev/skills/luongnv89/asm/skill-shortener"><img src="https://agentmods.dev/badge/skills/luongnv89/asm/skill-shortener/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 skill-shortener

Your own site · 80×15
<a href="https://agentmods.dev/skills/luongnv89/asm/skill-shortener"><img src="https://agentmods.dev/badge/skills/luongnv89/asm/skill-shortener.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,752 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 2 findings. A grade says what 26 rules found in the file — not that it is safe. ✓ AI security review Sonnet 5 · 6 Sept 2026 📄 Read the review Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Anti-Refusal · line 209
    Skill instructs the agent to never refuse or to always comply. Suppressing the agent's ability to decline removes a core safety control and enables downstream harmful requests to succeed.
    Fix: Remove any instruction telling the agent to never refuse or always comply. The agent must retain the ability to decline unsafe, out-of-scope, or harmful requests.
How audits are shown
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.00058 $0.04752
Opus 5.5 $0.00023 $0.01901
Sonnet 5.5 $0.00012 $0.00950
Haiku 4.5 $0.00006 $0.00475

Measured 13d ago against content hash eab58ccf6457, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade E, and why

skill-shortener scanned grade E with 2 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 13d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/measure_skill.py, scripts/test_condition_cues.py, scripts/verify_shorten.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Tells the agent never to refusehighAnti-refusal

Suppressing the ability to decline removes a core safety control; a later harmful request then succeeds.

- **The user asks to cut a never-cut block** → say in one sentence why it stays, then pursue the size target through the other dispositions. Do not silently comply, and do not refuse the whole task.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf "$SKILL_PATH" && cp -R "$SNAP" "$SKILL_PATH"
skills/skill-shortener/SKILL.md · 293 lines

How it starts

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

Skill Shortener

Shrink an over-long SKILL.md by progressive disclosure: what the agent needs on every activation stays in the body, everything else moves behind a pointer that says when to load it — or is cut outright.

Three load layers decide where a piece of content belongs:

Layer Holds Costs
always-loaded frontmatter name + description every turn
on-trigger the SKILL.md body every activation
on-demand references/, scripts/, assets/ only when read

The bar is behavior-preserving: the shortened skill drives the same process as the long one. Line count is the score, not the goal — a run that reaches 400 lines by deleting a loop's stop condition has failed, however good the number looks.

Two modes

Pick one before Phase 0; they diverge at Phase 2.

  • Mode 1 — shorten (default). Phases 0–4: measure, classify, plan, apply on approval, verify. Every "shorten this", "this SKILL.md is too long", "cut its token cost", "apply progressive disclosure" request is Mode 1.
  • Mode 2 — audit only. Phases 0–2, then stop and hand over the plan. Nothing outside the workdir is written, so the repo sync and snapshot in Phase 0 are skipped. Use when the user wants to know what would move, or will apply the split themselves.

Run variables

Every snippet below uses these four. Bash tool calls do not share shell state, so re-declare them at the top of each call that needs them — an empty $SKILL_PATH turns cp -R "$SKILL_PATH/." into a copy of the filesystem root. Capture RUN_EPOCH once and reuse the number; never re-stamp it.

SS="<this-skill-dir>"                                                # this skill: absolute path of the dir holding this SKILL.md
SKILL_PATH="$HOME/.claude/skills/<target>"                           # the target: the dir holding SKILL.md
QV="<SKILL_CREATOR_DIR>/scripts/quick_validate.py"                   # the Phase 4 gate: literal path from the acquire
# RUN_EPOCH: reuse the number the preflight printed, e.g. RUN_EPOCH=1787948450

Read the full file on GitHub · 293 lines

Files

What ships with it

9 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. 13d ago Changed eab58ccf6457
  2. 15d ago Changed · +45 lines 4189f64e11cb
  3. 1mo ago Changed dd3fc58f13c8
  4. 3mo ago First seen · 248 lines · 58 tokens per session scan E 3f8593f01ca7

Subscribe to this mod's changes

skill-shortener is a skill published in the GitHub repository luongnv89/asm (976 stars, last pushed today), licensed MIT. It adds 58 tokens to every session and 4,752 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it E with 2 findings (tells the agent never to refuse, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

skill-shortener compared with skills from other repositories

skill-shortener next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
skill-shortenerluongnv89/asmSkill976todayMITE58Claude Code
Skill Developmenttroykelly/claude-skillsSkill1210mo agononeA63Claude Code
sentry-setup-ai-monitoringtroykelly/claude-skillsSkill1210mo agononeA70Claude Code
sentry-setup-metricstroykelly/claude-skillsSkill1210mo agononeA61Claude Code
database-architecturetroykelly/claude-skillsSkill1210mo agononeA45Claude Code
timescaledbtroykelly/claude-skillsSkill1210mo agononeA50Claude Code
Hook Developmenttroykelly/claude-skillsSkill1210mo agononeA117Claude Code