skill-shortener

skill-shortener is a skill for Claude Code from luongnv89/asm. It costs 58 tokens per session (3,786 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; positional $N argument; mentions Claude Code.

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/luongnv89/asm/skill-shortener
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.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.svg" alt="Measured on agentmods" 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 3,786 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 2 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.1 $0.00058 $0.03786
Opus 5 $0.00029 $0.01893
Sonnet 5 $0.00012 $0.00757
Haiku 4.5 $0.00006 $0.00379

Measured 6d ago against content hash 3f8593f01ca7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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 · 248 lines

How it starts

The opening of the file, as written. The whole thing — 248 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="$HOME/.claude/skills/skill-shortener"                            # this skill
SKILL_PATH="$HOME/.claude/skills/<target>"                           # the target: the dir holding SKILL.md
QV="$HOME/.claude/skills/skill-creator/scripts/quick_validate.py"    # the Phase 4 gate
# RUN_EPOCH: reuse the number the preflight printed, e.g. RUN_EPOCH=1787948450

Read the full file on GitHub · 248 lines

Files

What ships with it

8 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. 6d 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 (913 stars, last pushed today), licensed MIT. It adds 58 tokens to every session and 3,786 once invoked, about $0.0003 per session on Opus 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

Other skills, from other repositories

sentry-setup-ai-monitoring

Setup Sentry AI Agent Monitoring in any project. Use this when asked to add AI monitoring, track LLM calls, monitor AI agents, or instrument OpenAI/Anthropic/Vercel AI/LangChain/Google GenAI. Automatically detects installed AI SDKs and configures the appropriate Sentry integration.

troykelly/claude-skills · 70 tokens

Skill Development

This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.

troykelly/claude-skills · 63 tokens

Hook Development

This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDEPLUGINROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop…

troykelly/claude-skills · 117 tokens

sentry-setup-logging

Setup Sentry Logging in any project. Use this when asked to add Sentry logs, enable structured logging, setup console log capture, or integrate logging with Sentry. Supports JavaScript, TypeScript, Python, Ruby, React, Next.js, and other frameworks.

troykelly/claude-skills · 61 tokens

sentry-setup-metrics

Setup Sentry Metrics in any project. Use this when asked to add Sentry metrics, track custom metrics, setup counters/gauges/distributions, or instrument application performance metrics. Supports JavaScript, TypeScript, Python, React, Next.js, and Node.js.

troykelly/claude-skills · 61 tokens

sentry-setup-tracing

Setup Sentry Tracing (Performance Monitoring) in any project. Use this when asked to add performance monitoring, enable tracing, track transactions/spans, or instrument application performance. Supports JavaScript, TypeScript, Python, Ruby, React, Next.js, and Node.js.

troykelly/claude-skills · 62 tokens