skill-optimizer

Audit agent skills for token waste, disclosure violations, and triggering problems.

6|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/northguild/gmt --skill skill-optimizer-northguild
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: skill-optimizer
Source: https://github.com/northguild/gmt/tree/main/.agents/skills/skill-optimizer
Command: npx skills add https://github.com/northguild/gmt --skill skill-optimizer-northguild

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, and includes scripts (resource) and references (resource) components.

What problem does it solve? Agent skills often waste context tokens, violate progressive-disclosure principles, or fail to trigger because of weak descriptions, duplicate names, or runtime misconfigurations. This Skill audits every skill directory and reports these problems before they degrade agent behavior. ## Core Features & Use Cases - Token and size auditing: Measures SKILL.md character counts against a 20000-character budget and flags oversized files. - Progressive-disclosure analysis: Detects oversized sections and suggests extraction into references/ files. - Triggering and loading diagnostics: Checks descriptions for concrete trigger phrases, detects duplicate names and near-duplicate descriptions across skills, and warns about missing files, non-executable scripts, and backslash paths. - Use Case: A team maintains a dozen agent skills and notices one never triggers. Run the audit in --all mode to get a JSON report showing the description lacks trigger phrases and collides with another skill's name. ## Quick Start Ask the agent to audit all skills in .agents/skills for token waste and triggering problems using the skill-optimizer.

Frequently Asked Questions about skill-optimizer

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

FAQPage Schema
How do I audit agent skills for token waste?▼

Run the optimize.py script with uv against a skill directory or a skills root with --all. It measures SKILL.md character counts against a 20000-character budget and flags oversized sections as extraction candidates for references/ files.

Why isn't my agent skill triggering?▼

Skills often fail to trigger because the description lacks concrete trigger phrases like "use when" or "validate". The audit checks descriptions for these cues and also reports duplicate names and near-duplicate descriptions that cause the wrong skill to load.

Does the skill optimizer modify my SKILL.md files?▼

No, the tool is advisory only and never writes or edits files. It prints a JSON report with warnings and suggested extractions, and the human applies the fixes manually.

What runtime problems can break skill loading?▼

Common issues include scripts missing the executable bit, backslash path separators in SKILL.md, references to files that do not exist, and invalid YAML frontmatter. The audit checks all of these and suggests running claude --debug for remaining load failures.

How do I tune the size budget and thresholds?▼

Edit references/rules.md, which is the single source of truth for budgets and thresholds. Values like SIZE_BUDGET, SECTION_EXTRACT_CHARS, and DESCRIPTION_SIMILARITY are documented there and mirrored as constants in the script.