skill-optimize
Maintain agent skills by pruning tokens and improving documentation structure.
Install
mkdir -p .claude/skills/skill-optimize && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16974" && unzip -o skill.zip -d .claude/skills/skill-optimize && rm skill.zipInstalls to .claude/skills/skill-optimize
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
[Skill Management] Optimize an existing agent skillKey capabilities
- →Analyze skill structure and line count
- →Reduce SKILL.md size
- →Move details to reference files
- →Improve clarity of skill instructions
- →Validate skill functionality after optimization
How it works
The skill analyzes the structure and content of an existing skill, then optimizes it by reducing the SKILL.md file size, moving details to reference files, and improving clarity, followed by validation.
Inputs & outputs
When to use skill-optimize
- →Refactoring skill documentation
- →Token count optimization
- →Updating skill instructions
About this skill
[IMPORTANT] Use
TaskCreateto break ALL work into small tasks BEFORE starting — including tasks for each file read. This prevents context loss from long files. For simple tasks, AI MUST ask user whether to skip.
Quick Summary
Goal: Optimize an existing skill for token efficiency, clarity, and effectiveness.
Workflow:
- Analyze — Review skill structure, line count, progressive disclosure
- Optimize — Reduce SKILL.md size, move details to references, improve clarity
- Validate — Verify skill still works correctly after optimization
Key Rules:
- Delegates to
skill-creatorfor optimization patterns - SKILL.md target: under 100 lines with progressive disclosure
- Reference files also under 100 lines each
Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence percentages (Idea should be more than 80%).
Think harder.
Use skill-creator and claude-code skills.
Use docs-seeker skills to search for documentation if needed.
Arguments
SKILL: $1 (default: *)
PROMPT: $2 (default: empty)
Your mission
Optimize an existing skill in .claude/skills/${SKILL} directory.
Mode detection:
- If arguments contain "auto" or "trust me": Skip plan approval, implement directly.
- Otherwise: Propose plan first, ask user to review before implementing.
Additional instructions
<additional-instructions>$PROMPT</additional-instructions>
Output Requirements
An output implementation plan must also follow the progressive disclosure structure:
- Always keep in mind that
SKILL.mdand reference files should be token consumption efficient, so that progressive disclosure can be leveraged at best. SKILL.mdis always short and concise, straight to the point, treat it as a quick reference guide.- Create a directory using naming pattern from
## Namingsection. - Save the overview access point at
plan.md, keep it generic, under 80 lines, and list each phase with status/progress and links. - For each phase, add
phase-XX-phase-name.mdfiles containing sections (Context links, Overview with date/priority/statuses, Key Insights, Requirements, Architecture, Related code files, Implementation Steps, Todo list, Success Criteria, Risk Assessment, Security Considerations, Next steps).
IMPORTANT:
- Skills are not documentation, they are practical instructions for Claude Code to use the tools, packages, plugins or APIs to achieve the tasks.
- Each skill teaches Claude how to perform a specific development task, not what a tool does.
- Claude Code can activate multiple skills automatically to achieve the user's request.
IMPORTANT Task Planning Notes (MUST FOLLOW)
- Always plan and break work into many small todo tasks
- Always add a final review todo task to verify work quality and identify fixes/enhancements
Limitations
- →SKILL.md target: under 100 lines with progressive disclosure
- →Reference files also under 100 lines each
How it compares
This skill automates the process of refining skill documentation for token efficiency and clarity, which differs from manual editing and review.
Compared to similar skills
skill-optimize side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| skill-optimize (this skill) | 0 | 3mo | No flags | Intermediate |
| prompt-optimize | 13 | 9mo | No flags | Advanced |
| ai-cost-optimizer | 9 | 5mo | Caution | Intermediate |
| self-improving-agent | 12 | 1mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by majiayu000
View all by majiayu000 →You might also like
prompt-optimize
YYH211
Expert prompt engineering skill that transforms Claude into "Alpha-Prompt" - a master prompt engineer who collaboratively crafts high-quality prompts through flexible dialogue. Activates when user asks to "optimize prompt", "improve system instruction", "enhance AI instruction", or mentions prompt engineering tasks.
ai-cost-optimizer
ScientiaCapital
Save 40-70% on AI costs with intelligent multi-LLM routing. Automatically selects the optimal model based on task complexity across 40+ models from 8 providers.
self-improving-agent
alirezarezvani
Curate Claude Code's auto-memory into durable project knowledge. Analyze MEMORY.md for patterns, promote proven learnings to CLAUDE.md and .claude/rules/, extract recurring solutions into reusable skills. Use when: (1) reviewing what Claude has learned about your project, (2) graduating a pattern from notes to enforced rules, (3) turning a debugging solution into a skill, (4) checking memory health and capacity.
ccs-delegation
kaitranntt
Auto-activate CCS CLI delegation for deterministic tasks. Parses user input, auto-selects optimal profile (glm/kimi/custom) from ~/.ccs/config.json, enhances prompts with context, executes via `ccs {profile} -p "task"` or `ccs {profile}:continue`, and reports results. Triggers on "use ccs [task]" patterns, typo/test/refactor keywords. Excludes complex architecture, security-critical code, performance optimization, breaking changes.
skill-from-notebook
GBSOSS
Extract methodologies from documents or examples to create executable skills
prompt-factory
alirezarezvani
World-class prompt powerhouse that generates production-ready mega-prompts for any role, industry, and task through intelligent 7-question flow, 69 comprehensive presets across 15 professional domains (technical, business, creative, legal, finance, HR, design, customer, executive, manufacturing, R&D, regulatory, specialized-technical, research, creative-media), multiple output formats (XML/Claude/ChatGPT/Gemini), quality validation gates, and contextual best practices from OpenAI/Anthropic/Google. Supports both core and advanced modes with testing scenarios and prompt variations.