progressive-disclosure
Skill3 starsChanged 48 days agoMITView on GitHub
Apply progressive-disclosure discipline to a SKILL.md — measure size, identify inert content (prompt templates, schemas, long enumerations, long bash blocks), propose extractions, and rewrite the SKILL.md with reference stubs. Use when editing or creating a SKILL.md, or when an existing SKILL.md exceeds 100 lines.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- bepaldes/heimdall-agenttheir own version, first seen Nov 8, 2026
- 0xUrsanomics/utopia-ostheir own version, first seen Nov 1, 2026
- edenbuilds/agentlooptheir own version, first seen Oct 13, 2026
- jonhill90/skillstheir own version, first seen Sep 30, 2026
- Neeeophytee/finding-unknowns-skillstheir own version, first seen Sep 9, 2026
- flpbalada/fb-skillstheir own version, first seen Aug 3, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- Neeeophytee/finding-unknowns-skills★ 339same name
- flpbalada/fb-skills★ 8same name
- jonhill90/skills★ 8same name
- 0xUrsanomics/utopia-os★ 2same name
- bepaldes/heimdall-agent★ 2same name
- edenbuilds/agentloop★ 0same name
- m381532187-netizen/ClaudeSkills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- doc-auditSkill
- feature-doneSkill
- release-docsSkill
- test-plugins-locallySkill
- validateSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 0 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 31
If total_lines <= 100, tell the user the file is already under the soft threshold and ask whether to proceed anyway.
- Very specific: line 60
If len(candidates) == 0: tell the user "No extraction candidates above threshold" and stop.
- Very specific: line 61
If len(candidates) == 1: convert to single-select Yes/No (Yes, extract <block-name> / No, keep inline).
- Very specific: line 62
If len(candidates) >= 2: use single AskUserQuestion with multiSelect: true, one option per candidate.
- Very specific: line 71
Write the extracted content verbatim to the destination file.
- Very specific: line 95
Never modify CLAUDE.md, README.md, agent files, or hook scripts — the rubric is calibrated for SKILL.md only.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Progressive Disclosure — SKILL.md Slimming
Apply a reusable rubric for deciding what stays inline in a SKILL.md versus what gets pushed into references/ (inert content) or scripts/ (long bash). Goal: smaller always-loaded context per skill invocation, without losing fidelity.
Guard
Target file path MUST match **/skills/<name>/SKILL.md. If the target is a CLAUDE.md, README.md, agent file, or hook script, abort with:
Progressive-disclosure rubric is calibrated for SKILL.md only. Target
<path>is not a SKILL.md; aborting.
The other file types have different audiences and different criteria.
Step 1: Measure the file
Run:
TARGET="<path-to-SKILL.md>"
total_lines=$(wc -l < "$TARGET")
heading_count=$(grep -c '^##\? ' "$TARGET")
long_blocks=$(awk '/^```/{n++; if(n%2){start=NR}else{if(NR-start>20)print " block ending line "NR" ("NR-start" lines)"}}' "$TARGET")
echo "File: $TARGET"
echo "Total lines: $total_lines"
echo "Headings: $heading_count"
echo "Code blocks > 20 lines:"
echo "$long_blocks"If total_lines <= 100, tell the user the file is already under the soft threshold and ask whether to proceed anyway. Below the threshold, the rubric usually finds nothing worth extracting.
Step 2: Identify extraction candidates
Walk every ## Step section of the SKILL.md and apply the rubric:
| Pattern in SKILL.md | Threshold | Destination | Stub form |
| Verbatim prompt template (question text + option labels + per-option behavior) | > 10 lines | references/prompts/<topic>.md | Use the prompt template at \references/prompts/<topic>.md` — verbatim, do not paraphrase.` |
| JSON / YAML schema example | > 15 lines | references/schemas/<name>.md | See schema at \references/schemas/<name>.md`. Match output to this schema.` |
| Decision tables | > 10 rows | references/tables/<topic>.md | Lookup table at \references/tables/<topic>.md` — apply per the headers there.` |
| Long enumeration of options or rules | > 10 items with multi-line explanations | references/<topic>.md | Apply the rules documented in \references/<topic>.md`.` |
| Bash block | > 20 lines | scripts/<name>.sh (NOT references/) | bash "${CLAUDE_PLUGIN_ROOT}/scripts/<name>.sh" <args> |
NEVER extract:
- Step titles + 1-3 line step descriptions
- Numbered control flow (
Step 1:,Step 2:…) AskUserQuestioncall shapes ≤ 10 lines- Short imperative instructions
- Decision tables ≤ 10 rows
- Bash blocks ≤ 20 lines
- Anything tagged as the control-flow contract
Produce a list: {block-name, source-line-range, destination-path, reason} per candidate.
Step 3: Propose extractions via AskUserQuestion
Build the AskUserQuestion candidate list from Step 2's output. Honor the AskUserQuestion guard in .claude/rules/ask-user-question-guard.md:
- If
len(candidates) == 0: tell the user "No extraction candidates above threshold" and stop. - If
len(candidates) == 1: convert to single-select Yes/No (Yes, extract <block-name>/No, keep inline). - If
len(candidates) >= 2: use single AskUserQuestion withmultiSelect: true, one option per candidate. User can approve some, reject others.
Each option label MUST include the source step name and destination path so the user can decide without reading the rubric again. Example: Step 9 retention prompt → references/prompts/retention.md.
Step 4: Write extracted files
For each approved extraction:
mkdir -pthe destination directory.- Write the extracted content verbatim to the destination file. For bash to
scripts/, prepend#!/usr/bin/env bashand the appropriatesetline per.claude/rules/shell-scripts.md(utility scripts:-euo pipefail; scripts with an always-exit-0 contract:-uo pipefail). Make executable (chmod +x). - Replace the original block in the SKILL.md with the matching stub form from Step 2's rubric table. The stub MUST include either "verbatim" (reference is authoritative; do not paraphrase) or "summary" (reference is descriptive; paraphrase OK). Without this qualifier, a downstream reader cannot tell what is safe to adapt.
- For bash extracted to
scripts/, the SKILL.md invocation MUST use${CLAUDE_PLUGIN_ROOT}/scripts/<name>.shper.claude/rules/plugin-script-paths.md. Bare relative forms are silently broken.
Step 5: Verify and report
Re-measure the target and surface the delta:
new_lines=$(wc -l < "$TARGET")
delta=$((total_lines - new_lines))
pct=$(( delta * 100 / total_lines ))
echo "Before: $total_lines lines"
echo "After: $new_lines lines ($delta removed, -$pct%)"
echo "Extracted to:"
for f in <list-of-new-files>; do
echo " $f ($(wc -l < "$f") lines)"
doneShow the diff summary, not the full diff. If the delta is < 5% of the original, surface a note: the file may not be a strong candidate for further extraction.
Key Rules
- Never modify CLAUDE.md, README.md, agent files, or hook scripts — the rubric is calibrated for SKILL.md only.
- Control flow stays inline always — even if a
Stepis 50 lines, control flow is exempt. - Bash > 20 lines goes to
scripts/NEVERreferences/. Use${CLAUDE_PLUGIN_ROOT}/scripts/<name>.shinvocation form. - Stub form must include "verbatim" or "summary" qualifier so readers know what's authoritative.
- Honor the AskUserQuestion guard: 0 candidates → skip; 1 candidate → single-select Yes/No; ≥2 → multiSelect.
- This skill must obey its own rubric — its own SKILL.md is ≤ 100 lines. If a future edit pushes it over, apply the rubric to itself.
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.

