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.
npx skills add JuanJoseGonGi/skill-compact --skill skill-compactgit clone --depth 1 https://github.com/JuanJoseGonGi/skill-compactWrote 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.
[](https://agentmods.dev/skills/juanjosegongi/skill-compact/skill-compact)<a href="https://agentmods.dev/skills/juanjosegongi/skill-compact/skill-compact"><img src="https://agentmods.dev/badge/skills/juanjosegongi/skill-compact/skill-compact/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.
<a href="https://agentmods.dev/skills/juanjosegongi/skill-compact/skill-compact"><img src="https://agentmods.dev/badge/skills/juanjosegongi/skill-compact/skill-compact.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00103 | $0.01254 |
| Opus 5 | $0.00051 | $0.00627 |
| Sonnet 5 | $0.00021 | $0.00251 |
| Haiku 4.5 | $0.00010 | $0.00125 |
Grade A, and why
skill-compact scanned grade A with 0 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 9d ago.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Skill Compact
Analyze, deduplicate, and restructure agent skills following the agentskills.io specification.
When to use
- User has many installed skills with potential overlap
- Skills are monolithic (>300 lines) without progressive disclosure
- Multiple skills share boilerplate content
- User wants to clean up and optimize their skills collection
- User wants to update skills from upstream and re-compact
Prerequisites
Ensure tsx is available. If not, install it:
npm install -g tsx
Workflow
Follow these phases in order. Always get user approval before modifying files.
Phase 1: Scan and Analyze
Run the scanner to get a full inventory:
npx tsx scripts/scan.ts <skills-dir>
Where <skills-dir> is typically ~/.claude/skills or .claude/skills.
Review the JSON output. Focus on:
summary.monolithicSkills- skills >300 lines without references/summary.skillsOverLineLimit- skills violating the 500-line limitsummary.totalTokens- total context cost of all skills
Present a summary table to the user showing: skill name, lines, tokens, has-refs, has-scripts.
Phase 2: Cluster and Identify Duplicates
Run the grouper to find overlapping clusters:
npx tsx scripts/group.ts <skills-dir>
Review the clusters. For each cluster with overlapScore > 0.2:
- Read the full SKILL.md of each skill in the cluster
- Identify specific overlapping content (shared paragraphs, identical code blocks, repeated templates)
- Identify what is unique to each skill
- Consult references/strategies.md for the appropriate compaction strategy
Present each cluster to the user with:
- Which skills overlap and how
- The proposed strategy (merge/absorb/extract-shared/refactor)
- Expected line savings
Phase 3: Compact (with user approval)
Before making any changes, create a backup:
npx tsx scripts/backup.ts <skills-dir>
For each approved compaction, apply the strategy. See references/strategies.md for detailed instructions per strategy type.
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.
- 9d ago First seen · 158 lines · 103 tokens per session scan A c13c118cf55d
skill-compact is a skill published in the GitHub repository JuanJoseGonGi/skill-compact (3 stars, last pushed 6mo ago), licensed MIT. It adds 103 tokens to every session and 1,254 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
sessionend
End-of-session ritual that turns sessions into institutional memory via Zengram. Detects repeatable workflows worth capturing as skills AND mistakes/corrections worth capturing as CLAUDE.md rules. Reflects honestly, stores to Zengram, updates local memory, spots workflow patterns, and proposes rule updates. Use when…
testing-anti-patterns
Reviews test code to identify and fix common testing anti-patterns including flaky tests, over-mocking, brittle assertions, test interdependency, and hidden test logic. Flags bad patterns, explains the specific defect, and provides corrected implementations. Use when reviewing test code, debugging intermittent or…
handoff-protocols
Manages work transitions between team members or agents by creating structured handoff documents, summarizing project status, documenting key decisions, blockers, and open questions, and generating onboarding briefs. Use when someone needs to hand off, hand over, or transition a project; pass work to another person or…
parallel-investigation
Coordinates parallel investigation threads to simultaneously explore multiple hypotheses or root causes across different system areas. Use when debugging production incidents, slow API performance, multi-system integration failures, or complex bugs where the root cause is unclear and multiple plausible theories exist…
hypothesis-testing
Applies the scientific method to debugging by helping users form specific, testable hypotheses, design targeted experiments, and systematically confirm or reject theories to find root causes. Use when a user says their code isn't working, they're getting an error, something broke, they want to troubleshoot a bug, or…
trace-and-isolate
Applies systematic tracing and isolation techniques to pinpoint exactly where a bug originates in code. Use when a bug is hard to locate, code is not working as expected, an error or crash appears with unclear cause, a regression was introduced between recent commits, or you need to narrow down which component…