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.5 | $0.00041 | $0.00502 |
| Sonnet 5.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 2mo 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 ships with it
14 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.
- references/best-practices.md 3.3 KB
- references/prompts/analyze-cluster.md 1.5 KB
- references/prompts/execute-compact.md 2.1 KB
- references/spec-checklist.md 2.0 KB
- references/strategies.md 4.7 KB
- scripts/backup.ts 1.9 KB runs code
- scripts/detect-sources.ts 8.5 KB runs code
- scripts/group.ts 8.6 KB runs code
- scripts/manifest.ts 2.9 KB runs code
- scripts/restore.ts 2.4 KB runs code
- scripts/scan.ts 1.8 KB runs code
- scripts/update-sources.ts 6.2 KB runs code
- scripts/validate.ts 5.6 KB runs code
- scripts/write-compact.ts 5.5 KB runs code
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.
- 2mo 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 8mo ago), licensed MIT. It adds 103 tokens to every session and 1,254 once invoked, about $0.0004 per session on Opus 5.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.
skill-compact compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| skill-compactJuanJoseGonGi/skill-compact | Skill | 3 | 8mo ago | MIT | A | 103 | Claude Code, Codex |
| sessionendZenSystemAI/Zengram | Skill | 64 | 3d ago | MIT | A | 147 | Claude Code, Codex |
| bashZenSystemAI/Zengram | Skill | 64 | 3d ago | MIT | A | 0 | Claude Code, Codex |
| workflows-createzapier/agent-skills | Skill | 25 | 5d ago | MIT | A | 73 | Claude Code |
| workflows-modifyzapier/agent-skills | Skill | 25 | 5d ago | MIT | A | 54 | Claude Code |
| workflows-ai-by-zapierzapier/agent-skills | Skill | 25 | 5d ago | MIT | A | 58 | Claude Code |
| workflows-listzapier/agent-skills | Skill | 25 | 5d ago | MIT | A | 55 | Claude Code |