skill-shortener

Refactor over-long SKILL.md files by moving content into references and scripts behind conditional pointers.

904|84|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/luongnv89/asm --skill skill-shortener
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: skill-shortener
Source: https://github.com/luongnv89/asm/tree/main/skills/skill-shortener
Command: npx skills add https://github.com/luongnv89/asm --skill skill-shortener

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Over-long SKILL.md files consume context tokens on every agent activation, and manually splitting them risks silently deleting behavior-critical instructions. This Skill measures the token footprint, classifies every section as KEEP, CUT, or MOVE, and verifies mechanically that nothing was lost in the split.

Core Features & Use Cases

  • Progressive disclosure refactoring: Moves non-essential sections into references/, scripts/, or assets/ behind pointers with explicit load conditions, keeping the body under 500 lines and 3000 words.
  • Behavior-preserving verification: Runs 12 automated checks covering manifest exhaustiveness, dangling pointers, orphaned references, reference chains, size caps, and version bumps.
  • Audit-only mode: Produces the classification plan without touching any files, for users who want to review or apply the split themselves.
  • Use Case: A 900-line SKILL.md for a deployment skill covering AWS, GCP, and Azure gets split into one reference file per cloud, so each run only loads the branch it needs.

Quick Start

Ask the agent to shorten the SKILL.md in a target skill directory that has grown too long and is consuming too much context.

Frequently Asked Questions about skill-shortener

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I shorten a SKILL.md that is too long?โ–ผ

Run the skill-shortener workflow: it measures the per-section footprint, classifies each section as KEEP, CUT, or MOVE, presents a plan for approval, then rewrites the body with conditional pointers to new references/ files and verifies the result with automated checks.

What is progressive disclosure in agent skills?โ–ผ

Progressive disclosure keeps only universally needed content in the SKILL.md body and moves everything else into references/, scripts/, or assets/ behind pointers stating when to load them. This reduces the token cost paid on every activation.

What are the size limits for a SKILL.md body?โ–ผ

The skill enforces two caps: 500 lines and 3000 words for the body, and both must be satisfied. The measure_skill.py script reports the current footprint and returns a WITHIN_CAP or OVER_CAP verdict against these limits.

Can I audit a skill without modifying any files?โ–ผ

Yes, Mode 2 (audit only) runs the measurement and classification phases, then presents the split plan and stops. It writes nothing outside the .skill-shortener workdir and skips the snapshot and git sync steps.

When should I not use skill-shortener?โ–ผ

Do not use it for authoring new skills, fixing eval scores or frontmatter validation failures, or general prose editing. It also exits early when the body is already within both size caps, since splitting a fitting body only adds pointer overhead.

How does the skill prevent losing content during a split?โ–ผ

Every section is recorded in a manifest with its disposition, and verify_shorten.py checks that the manifest is exhaustive, all MOVE destinations exist and are pointed to with load conditions, no references are orphaned or chained, and the version was bumped. A manual read-back confirms content survived the move.