optimize-agents

Community

Make your agents cheaper and leaner

Authorcosmicdreams
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It reduces the cost and latency of running Claude Code agents by auditing agent definition files and trimming wasted tokens and bloated prompt text.

Core Features & Use Cases

  • Agent inventory & completeness checks: Scans all agent .md definitions and flags missing or incomplete YAML frontmatter fields (name, description, color, tools, model).
  • Model tier assignment: Recommends the cheapest viable model tier (haiku/sonnet/opus), based on whether the agent is procedural vs. reasoning-heavy, with opus reserved for explicit justification.
  • Token efficiency optimization: Flags overly long agent bodies and provides targeted cut guidance to achieve a lean 25–40 line body while preserving functional instructions.
  • Change application & verification: Updates frontmatter, adjusts model: tiers, trims bodies when over 50 lines, and includes a verification loop to confirm the results.

Quick Start

Ask the AI to run optimize-agents to audit your .claude/agents/ files, recommend haiku vs sonnet per agent, and trim any agents over 50 lines.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: optimize-agents
Download link: https://github.com/cosmicdreams/claude-plugins/archive/main.zip#optimize-agents

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.