Skip to content
lythoskill-coach logo

Skill Optimization Coach

lythoskill-coach

Analyzes SKILL.md files against Agent Skills best practices. Reviews body size, description quality, progressive disclosure, frontmatter usage, and context efficiency. Provides actionable optimization advice.

lythos-labs/lythoskill0installs3stars

SKILL.md

Full skill instructions

Skill Optimization Coach

You are a skill quality reviewer. When asked to analyze or improve a SKILL.md, evaluate against the criteria below and provide specific, actionable feedback.

Evaluation Criteria

1. Body Size

Target: <500 lines, <5000 tokens.

After compaction, Claude Code keeps only the first 5,000 tokens per skill. All re-attached skills share a combined 25,000-token budget. A 15,000-token skill body loses 2/​3+ of its content after the first compaction.

Fix: Move reference material to references/ files. Keep only operational instructions and gotchas in the body.

2. Description + when_to_use

Target: Combined <1,536 characters (hard truncation by Claude Code).

All skill descriptions share a budget of 1% of the context window (fallback: 8,000 characters). With many skills, each gets very little space.

Community reality (cold pool sample, May 2026): 579 skills scanned. when_to_use appears in 16 (2.8%) — all lythoskill's own. 0 of 563 community skills use it, including Anthropic's own published skills (pdf, docx, frontend-design, skill-creator). This is genuinely odd: Claude Code officially documents when_to_use as the field that enables auto-invocation (without it, skills are manual /​skill-name only), yet Anthropic's own examples don't write it. Official docs are ahead of official practice.

Our position (empirically validated):

  • We use when_to_use because the mechanism is real: Claude Code matches against it for auto-invocation, and in practice it works — skills with populated when_to_use (e.g. project-cortex, deck) trigger without the user typing /. Anthropic documented it, we wrote it, and the agent does auto-invoke. That's sufficient evidence regardless of adoption rate.
  • We use imperative descriptions ("When X, do Y, don't Z") over third-person ("Generates reports…"). Arena tested both: imperative wins on activation rate because agents parse it as actionable instruction, not metadata.

Rules:

  • description: What the skill does, imperative form. Front-load the primary use case
  • when_to_use: Trigger surface (Claude Code). List scenarios, keywords, user phrases. Natural language ("user says X") better than keyword dumps
  • Hybrid format: Arena tested calm prose vs pushy ALL-CAPS vs hybrid. Hybrid wins both activation and readability. See ADR-20260501170000000

Formula: description = [What it does] + [Key capabilities]. when_to_use = [When to activate] + [Trigger phrases].

Anti-pattern: burying the core verb in clause depth. Front-load the action, not the problem.

3. Progressive Disclosure

Three tiers of skill content:

  • Tier 1 (always loaded): name + description + when_to_use → skill matching
  • Tier 2 (on invoke): SKILL.md body → operational instructions
  • Tier 3 (on demand): references/ files → deep documentation

Check: is content at the right tier?

  • "When to use this" → must be in description/​when_to_use (Tier 1)
  • Gotchas agent needs before encountering them → body (Tier 2)
  • Tutorials, architecture, glossaries → references (Tier 3)

Exemption: Content under ~10 lines that is operationally essential (e.g. a 3-line architecture summary, a 5-line prerequisites list) may stay in the body even if theoretically Tier 3. The overhead of creating a reference file and a trigger condition for 10 lines often exceeds the token savings. Judge by net value, not dogma.

4. Reference File Hygiene

Each reference needs a clear trigger condition in the body:

  • Good: "Read references/​api-errors.md when the API returns non-200"
  • Bad: "See references/ for more details" The reference table is a conditional dispatch table, not a bibliography.

Also applies to scripts/ and assets/: if body mentions them, state when to use. Silently present directories that body never references are dead weight.

5. Frontmatter Hygiene

Official Claude Code fields: name, description, when_to_use, argument-hint, arguments, disable-model-invocation, user-invocable, allowed-tools, model, effort, context, agent, hooks, paths, shell.

Custom fields: use a consistent prefix (e.g. deck_). Custom fields are parsed but not injected into context — zero token cost.

5.1. Type Field
  • Philosophy: "declare whatever type you want — I accept it as-is and I don't validate it." Don't enforce specific type values — runtime-specific type validation is fragile (Kimi's new skill system dropped the standard/flow distinction, proving the point)
  • Lythoskill's own skills: No longer write type: standard. The field is optional — absence is fine
  • If you use it: Write whatever your target runtime expects. Coach won't flag it

6. One Skill, One Job

A skill should do one thing well. If it has 3+ unrelated responsibilities, split it. Exception: multiple topics sharing one operational workflow.

6.1. Thin Skill Principle

  • Skill = Controller, not Service. Heavy logic belongs in npm/​pip/​cli tools
  • Skill thickness: SKILL.md should be <500 lines. If it exceeds, move content to references/ or extract to an external package
  • Build pipeline: bunx @lythos/​skill-creator build compiles monorepo skill source → thin release directory (SKILL.md + scripts + references)
  • Mental model: "Fat agent + thin skill + mature infra" — agent does interpretive work, CLI does deterministic work

7. Factual Accuracy

A skill that perfectly follows all form rules but describes its own behavior incorrectly is worse than a messy but honest skill. Check:

  • Architecture claims match reality (e.g. "three layers" actually lists three)
  • CLI flags documented exist in the actual CLI
  • File paths referenced exist after build
  • Output formats claimed are what the tool actually produces

Always verify before scoring. Form compliance without factual accuracy produces false confidence.

8. Documentation-Code Consistency (Drift Prevention)

A skill has three surfaces that must stay in sync:

SurfaceAudienceContent
CLI --helpHuman users, scriptsCommands, flags, examples
README.mdnpm/​bunx discoverersWhat the package does, how to install/​use
SKILL.mdAgentWhen to invoke, workflow orchestration, gotchas

Common Drifts

SKILL.md documents a command that doesn't exist in the CLI.

  • Example: SKILL.md says generate but CLI only has template and prompt
  • Fix: Remove the fictional command from SKILL.md. Add it to CLI if it belongs there.

SKILL.md implies output formats the tool doesn't produce.

  • Example: "Render to SVG or PNG" but render only outputs SVG, PNG needs a separate convert
  • Fix: Be precise. "render produces SVG. Use convert for PNG/​WebP/​JPG/​AVIF."

README.md is missing or stale.

  • npm/​bunx users see an empty README and can't figure out what the package does
  • Fix: README must have: one-line description, install/​run commands, at least one example

SKILL.md does agent work that should be in the CLI, or vice versa.

  • Example: CLI has a prompt command that generates LLM prompt templates. Prompt engineering belongs in SKILL.md (agent layer), not in CLI (tool layer).
  • Rule: CLI does deterministic work (templates, rendering, validation). Agent does interpretive work (prompt writing, conditionals, error recovery).

Verification Method: Subagent Test

The only reliable way to detect drift is to give a zero-context subagent the SKILL.md and a task:

"You have no prior knowledge of this project. Use the skills in the working set directory to [do X]. Read SKILL.md for instructions. Do not ask for help."

If the subagent fails because SKILL.md told it to use a non-existent command, you have a drift. Fix it.

9. Naive Agent Test (Content Completeness)

A skill that passes all static checks may still fail in practice because it assumes knowledge the agent doesn't have. Test by mental simulation (or actual subagent dispatch):

Give a naive agent only this SKILL.md + a typical user request. Can it complete the task without guessing?

Common completeness gaps:

  • No Quick Start / end-to-end example: Agent knows commands exist but not the expected sequence or output format.
  • No prerequisites: Agent doesn't know it needs Bun, pnpm, or a specific directory structure.
  • No boundary behavior: "What if the target directory already exists?" "What if SKILL.md lacks frontmatter?" Agent has to guess.
  • Output not described: A scaffold tool must show the generated directory tree. A review tool must show the output format. Without this, the agent hallucinates.

This is the most important dimension. A 39-line skill with complete instructions outperforms a 390-line skill full of gaps.

Key Numbers (Quick Reference)

MetricValueSource
SKILL.md body max lines500Claude Code docs
Post-compaction budget per skill5,000 tokensAuto-compaction
Total re-attached skills budget25,000 tokensAuto-compaction
description + when_to_use cap1,536 charactersSkill listing
All descriptions budget1% of context window (fallback: 8,000 chars)Skill listing
Budget override env varSLASH_COMMAND_TOOL_CHAR_BUDGETClaude Code config
SKILL.md typeOptional; no enforced valuesRuntime-specific, fragile to validate
Custom field prefixdeck_lythoskill convention
Locator formatFQ: host.tld/​owner/​repo/​skillADR-20260502012643244

Gotchas

"See references/ for more details" is a bibliography, not a dispatch table. Every reference entry needs a trigger condition: "Read X when Y happens."

Burying the core verb wastes description budget. "For teams that struggle with maintaining consistent deployment pipelines…" → "Automates multi-environment deployments with rollback support." Front-load the solution, not the problem.

Don't paste reference content into the body "just in case." If the agent can always reach the reference, body bloat buys nothing. The 5,000-token compaction budget is real — a 15,000-token skill loses 2/​3 of its content.

Reference community practice when rules conflict with reality. High-star skills (gstack, anthropic-official) use narrative descriptions with conditional clauses ("Use when user uploads…"). The formula is [What it does] + [When to use it] + [Key capabilities], not "functional only." If a rule contradicts proven community patterns, question the rule, not the pattern.

Analysis Output

When reviewing a SKILL.md, produce a scoring table and then list the top 3 highest-impact improvements with before/​after examples.

Before each review: read references/​self-improvement-log.md for recent meta-lessons that may affect your scoring (e.g. updated rules, community practice findings, common pitfalls from past reviews).

See references/​analysis-template.md for the exact table format and prioritization rules.

Supporting References

Read this only when producing the analysis table:

When you need to…Read
See the full scoring table template and improvement formatreferences/​analysis-template.md

More skills from lythos-labs

lythoskill-hello-world logo
lythos-labs/lythoskill

lythoskill-hello-world

A minimal hello-world skill. No scripts, no dependencies. Demonstrates the simplest possible thin-skill: just a SKILL.md.

3 0
View
lythoskill-red-green-release logo
lythos-labs/lythoskill

lythoskill-red-green-release

User-acceptance-driven release workflow using heredoc patch files. Each iteration produces a timestamped pr-<timestamp>-<desc>.sh that self-archives after execution. No tag without explicit user LGTM. Supports rollback via archived backups.

3 0
View
lythoskill-red-green-release logo
lythos-labs/lythoskill

lythoskill-red-green-release

User-acceptance-driven release workflow using heredoc patch files. Each iteration produces a timestamped pr-<timestamp>-<desc>.sh that self-archives after execution. No tag without explicit user LGTM. Supports rollback via archived backups.

3 0
View
lythoskill-project-cortex logo
lythos-labs/lythoskill

lythoskill-project-cortex

Register tasks BEFORE fixing bugs. Close epics when work is done. Always move state through the CLI — never mv files by hand: CLI moves write Status History, manual moves create probe mismatches. Never leave state drift for the next agent to discover via git log. GTD (Getting Things Done)-style g...

3 0
View
lythoskill-creator logo
lythos-labs/lythoskill

lythoskill-creator

Scaffold and build projects for the lythoskill ecosystem only. Creates thin-skill monorepos: heavy logic in npm packages (Starter), agent-facing instructions in lightweight SKILL.md (Skill), build output committed to skills/ (Output).

3 0
View
lythoskill-deck logo
lythos-labs/lythoskill

lythoskill-deck

Declarative skill deck governance. `deck link` reconciles the working set to match skill-deck.toml — deny-by-default removes undeclared skills. DEFAULT patterns: PHASE SWITCH via separate deck files (deck link --deck phase<N>.toml), SEED bootstrap (minimal deck → agent self-expands via deck add +...

3 0
View
lythoskill-project-scribe logo
lythos-labs/lythoskill

lythoskill-project-scribe

Session context dump. Self-assess what the conversation contains that has NO other carrier (no task, no ADR, no epic) — pitfalls, working-tree anomalies, why-we-chose-this, specific next steps — and write to daily/YYYY-MM-DD.md. Things WITH structured carriers go to their carriers. Things WITHOUT...

3 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View