Agent skill

Skill Optimization

by shinpr in shinpr/ai-coding-project-boilerplate

Evaluates and optimizes skill file quality using 9 content patterns and 10 editing principles.

MITAuto-check passed

Install Skill Optimization

skills CLI
$ npx skills add shinpr/ai-coding-project-boilerplate --skill skill-optimization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install shinpr/ai-coding-project-boilerplate skill-optimization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/shinpr/ai-coding-project-boilerplate.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills-en/skill-optimization .claude/skills/skill-optimization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
skill-optimization
GitHub stars
232
Token cost
~3.5k tokens
SKILL.md length
1,777 words
Files
3 (incl. references)
Skills in repo
42
Repo updated
First seen
Licence
MIT

At a glance

Evaluates and optimizes skill file quality using 9 content patterns and 10 editing principles.

  • Works in 6 steps: Finding-Based: Every change resolves a… → Concrete: Each pattern provides… → Structure-Focused: Optimizes expression… → …
  • Creating skills
  • SKILL.md covers Core Philosophy, Content Optimization Patterns, 10 Skill Editing Principles and References
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Skill Optimization is an agent skill from shinpr/ai-coding-project-boilerplate. Evaluates and optimizes skill file quality using 9 content patterns and 10 editing principles. Use when creating skills, refining skill content, or auditing skill quality.

Its SKILL.md is about 3.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/creation-guide.md` and `references/review-criteria.md`).

The repository describes itself as: Agentic coding TypeScript boilerplate for Claude Code: sub-agent workflows with built-in quality checks and context engineering. The licence is MIT.

When your agent uses it

  • Creating skills
  • Refining skill content
  • Auditing skill quality

Example prompts

  • “Use the skill-optimization skill to evaluate and optimizes skill file quality using 9 content patterns and 10 editing principles”
  • “/skill-optimization”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Finding-Based: Every change resolves a recorded issue or follows a named project-specific source
  2. Concrete: Each pattern provides detection criteria and transform methods
  3. Structure-Focused: Optimizes expression and organization; domain knowledge remains unchanged
  4. Intent-Preserving: Records the original requirements before changing structure, wording, constraints, context, or examples
  5. Traceable: Connects every applied change to a finding or named project source
  6. Self-Contained: Keeps every pure skill executable when loaded alone; duplication across independently loaded pure skills is valid when…

What it can do on your machine

Read from SKILL.md and the folder at commit 56913a2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Skill Optimization loads about 3.5k tokens when it runs, and up to ~5.9k if it reads all its reference files. Until then it costs about 48 tokens; SKILL.md has 1,777 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~48
When it runs · the whole SKILL.md, loaded when a task matches
~3.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from shinpr/ai-coding-project-boilerplate at commit 56913a2, republished under its MIT licence (© shinpr). 1,777 words, ~3,510 tokens.

Download SKILL.mdSave it as .claude/skills/skill-optimization/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
skill-optimization
description
Evaluates and optimizes skill file quality using 9 content patterns and 10 editing principles. Use when creating skills, refining skill content, or auditing skill quality.

Skill Content Optimization

Core Philosophy

  1. Finding-Based: Every change resolves a recorded issue or follows a named project-specific source
  2. Concrete: Each pattern provides detection criteria and transform methods
  3. Structure-Focused: Optimizes expression and organization; domain knowledge remains unchanged
  4. Intent-Preserving: Records the original requirements before changing structure, wording, constraints, context, or examples
  5. Traceable: Connects every applied change to a finding or named project source
  6. Self-Contained: Keeps every pure skill executable when loaded alone; duplication across independently loaded pure skills is valid when each copy is required for standalone execution

Content Optimization Patterns

P1: Critical (Must Fix)

Issues that directly reduce LLM execution accuracy when consuming the skill.

BP-001: Negative Instructions → Positive Form
DetectionTransform
"don't", "do not", "never", "avoid" in skill instructionsState the desired action or allowed state first. Preserve an explicit prohibition only when the violation is an irreversible operational action, the caller cannot normally recover it, and a positive-only rewrite would blur the boundary. Pair the prohibition with the safe alternative and the condition that authorizes crossing the boundary. Rewrite reviewable quality policies in positive form.

Exception boundary examples:

  • Permitted: "Move obsolete records to the recoverable archive. Do not permanently delete them unless the user explicitly authorizes permanent deletion."
  • Rewrite in positive form: "Do not invent issues" → "Base every issue on BP patterns or 10 principles", "Do not skip P1 issues" → "Evaluate all P1 issues in every review mode", "Do not give grade A when P1 exists" → "Assign grade A only when P1 count is zero"

Quality policies, role boundaries, scoring criteria, and general work rules always use positive form. Outputs that the caller validates, overwrites, or discards are never irreversible.

Skill example:

  • Before: "Don't use generic variable names"
  • After: "Use descriptive variable names that reflect purpose (e.g., userId not x)"

Why critical for skills: A prohibition alone leaves the executable target state unspecified.

BP-002: Vague Instructions → Specific Criteria
DetectionTransform
Vague term ("appropriate", "good", "proper", "best", "should be clear") that leaves a decision the intended outcome requires, where plausible interpretations would materially change execution or verificationResolve it with the least-restrictive sufficient criterion, following the resolution steps below
Unspecified format, length, scope, tone, or success criteria whose plausible interpretations satisfy the intended outcome equally wellTreat as acceptable flexibility; add a constraint only when one interpretation is required (for a format a downstream consumer requires, see BP-003)

Resolution steps (first-row findings):

  1. Choose the least-restrictive sufficient criterion — the measurable if-then rule or threshold that supplies the required precision while excluding the fewest valid behaviors.
  2. Record its precision contribution: the observable output difference it improves for the intended outcome.
  3. Record its constraint cost: the valid solutions allowed by the original intent that it excludes.
  4. Apply it only when the precision contribution is identifiable and the constraint cost preserves the original intent.
  5. When input or project context cannot determine the decision, record the required source instead of guessing.

Skill exception: Expressions that the LLM can resolve unambiguously from input context (e.g., "where the user left gaps" when the user's prompt is available for comparison) are not vague — they describe a deterministic operation, not a subjective judgment.

Skill example:

  • Before: "Handle errors appropriately"
  • After (criteria derived from a named source): "Follow the project error-handling policy (docs/error-handling.md): wrap external API calls, file I/O, and JSON.parse in try-catch; log error.name, error.stack, and timestamp; re-throw with context when the caller must handle it."
  • After (no source available): "Record 'error-handling policy' as the required source instead of inventing try-catch targets, log fields, or thresholds."

Why critical for skills: A vague instruction forces the model to choose an outcome-relevant behavior without a supplied criterion.

BP-003: Missing Output Format → Structured Output
DetectionTransform
Skill describes what to do but not the expected deliverable formatAdd an output section defining the structure, fields, and ordering required by the output consumer (parsing, routing, comparison, verification), rather than selecting a format by convention

For a skill review, the output contract contains BP-001 through BP-009 coverage, stable finding IDs, severity, location, quoted evidence, accepted declines, preservation requirements, unresolved inputs, and the final grade. For skill creation, the output is the complete SKILL.md content plus any required same-directory references or scripts.

Skill example:

  • Before: "Analyze the code for issues"
  • After (format required by the review-report consumer): "Emit ## Issues Found as a table the report renderer parses: | Severity | Location | Description | Suggested Fix |"

Why critical for skills: Structured output constraints reduce hallucination and make skill results consistent.

BP-009: Unbounded Work Generation → Proportionate Work
DetectionTransform
A finding, possibility, or technically valid improvement becomes mandatory without changing the outcome, a required boundary, a real consumer, or necessary proofTreat it as a candidate; retain required work and allow no-change, reuse, and evidence-backed decline
Research breadth determines implementation or artifact scopeStop when the required outcome is observable; discovery alone does not expand the work

Why critical for skills: Capable models execute implied obligations, so unsupported possibilities can manufacture work without improving the result.

P2: High Impact (Should Fix)

Issues that reduce skill effectiveness when addressed.

BP-004: Unstructured Content → Organized Format
DetectionTransform
Wall of text without headingsApply standard section order (see below)
Multiple topics mixed in one sectionSplit into distinct headed sections
No tables for reference dataConvert lists of criteria/patterns to tables

Standard skill section order:

  1. Context/Prerequisites
  2. Core concepts (definitions, patterns)
  3. Process/Methodology (step-by-step)
  4. Output format/Examples
  5. Quality checklist
  6. References

Conditional: Skip restructuring if skill is under 30 lines and covers a single topic.

BP-005: Missing or Excess Context → Necessary and Sufficient Context
DetectionTransform
Skill assumes knowledge not statedAdd Prerequisites section listing required context
Domain terms used without definitionAdd definitions inline or in a glossary table. Skill exception: Terms within the LLM's baseline knowledge (widely-used technical terminology, standard domain vocabulary) require no definition. Only project-specific terms, internal naming conventions, or domain jargon outside common LLM training data need explicit definition.
No "when to use" guidanceAdd trigger conditions with concrete scenarios
Context that has no downstream effect and is duplicated, distracting, or unactionableCondense repeated facts into one operative statement; keep raw background behind a path or reference when only an extracted fact is needed; name the source for project-specific facts

Skill example:

  • Before: "Apply the strangler pattern for migration"
  • After: "Prerequisite: Existing monolith with identifiable module boundaries. When to use: Replacing legacy module while maintaining production traffic."
Show full SKILL.md (715 more words)Show less
BP-006: Missing or Excess Procedural Control → Evidence-Guided Gates
DetectionTransform
A later action would be invalid without prerequisite evidenceAdd a gate naming the required evidence and transition condition
Authority, irreversible action, machine-consumed contract, or completion proof is implicitMake that boundary explicit
A reversible choice is prescribed as a mandatory routeState the purpose, evidence, and selection criteria; let the model choose the route
A gate requires a specific label or artifact despite semantically equivalent evidenceAccept the equivalent evidence unless a machine consumer requires the exact form

Key insight: Control the boundary and required evidence, not a predicted path between them.

For skill creation, use three gates in order:

  1. Analysis gate: Original requirements are recorded, BP-001 through BP-009 are covered, every issue has evidence, and no unresolved input blocks faithful work.
  2. Optimization gate: Every finding has one applied/skipped resolution, each change is traceable, and all preservation requirements remain represented.
  3. Balance gate: Intent preservation, decision sufficiency, information density, constraint necessity, work proportionality, and traceability pass before the result is final.

For review-driven repair, use the current review as analysis evidence and apply the optimization and balance gates to the accepted repair scope.

P3: Enhancement (Could Fix)

Incremental improvements for specific contexts.

BP-007: Unnecessary or Biased Examples → Minimal Necessary Examples
DetectionTransform
Examples restate behavior already known to the LLMReplace with a concise rule or consumer-required output shape, and remove the examples
Examples encode a domain-, product-, or organization-specific mapping, non-obvious exception, or boundary a rule cannot expressKeep the smallest set that covers those mappings; map each example to the ambiguity it removes
Multiple examples remove the same ambiguity, or all share the same surface patternReduce to the smallest covering set; add a different case only when it removes a distinct ambiguity
BP-008: No Uncertainty Permission → Explicit Escalation
DetectionTransform
Skill demands definitive answers alwaysClassify claims as observed, inferred, or unknown; add escalation criteria for ambiguous cases
No "when to stop" guidanceWhen an unknown blocks the next step, stop at that gate and name the exact evidence or user decision required to continue

Skill example:

  • Before: "Determine the root cause"
  • After: "Classify the root cause as observed, inferred, or unknown. When missing evidence blocks the next step, stop at the current gate and name the exact evidence or user decision required to continue."

10 Skill Editing Principles

Measurable quality criteria for skill content. Each principle includes a pass/fail test.

#PrinciplePass CriteriaFail Example
1Context efficiencyEvery sentence supplies non-baseline knowledge, a decision rule, a required boundary, or execution evidence.Restates baseline behavior without a supplied failure, review finding, or project requirement showing an execution effect
2DeduplicationNo concept is explained twice at the same abstraction level within one skill. Duplication across independently loaded pure skills is valid when each copy is required for standalone execution; evaluate those copies for semantic consistency rather than replacing them with sibling-skill referencesThe same rule appears twice in one skill without adding a distinct execution role
3GroupingRelated criteria in single section (minimize read operations)Scattered error handling rules across 4 sections
4MeasurabilityCriteria name observable evidence, deterministic decision rules, or justified thresholds"Write clean code" without an observable condition
5Positive formInstructions state what to do (BP-001 applied)"Don't use any" instead of "Use only X"
6Consistent notationUniform heading levels, list styles, table formatsMix of -, *, 1. in same context
7Explicit prerequisitesProject-specific and non-baseline prerequisites are stated or linked; baseline technical knowledge is left conciseUses "DI" without defining Dependency Injection
8Priority orderingMost important items first, exceptions lastEdge cases before common patterns
9Scope boundariesExplicitly state what the skill covers and the conditions that activate conditional content. A pure skill contains the context required for standalone execution. Cross-skill references are reserved for skills whose role is orchestration or skill selectionA pure skill omits an operative rule because another independently loaded skill also contains it
10Work proportionalityEvery required artifact, test, gate, or decision changes the outcome, a boundary, a consumer result, or necessary proofRequires all findings or technically valid improvements to be implemented

References

© shinpr, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in .claude/skills-en/skill-optimization of shinpr/ai-coding-project-boilerplate.

  • SKILL.md
  • references/creation-guide.md
  • references/review-criteria.md

Open the folder on GitHubat commit 56913a2

Compare with similar skills

Skill Optimization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Skill Optimization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Skill Optimization this skillshinpr/ai-coding-project-boilerplate232—~3.5kAutomated safety check: PassMIT
Caveman Optimization EvaluatorJuliusBrussee/caveman110k1 repos~1.2kAutomated safety check: PassApache-2.0
SQL Optimizationgithub/awesome-copilot40k2 repos~2.3kAutomated safety check: PassMIT
Arize Evaluatorgithub/awesome-copilot40k2 repos~8.1kAutomated safety check: NotesMIT
Agent Performance Optimizerruvnet/ruflo74k2 repos~3.6kAutomated safety check: PassMIT
Database Optimizerdavila7/claude-code-templates32k7 repos~2.5kAutomated safety check: PassMIT

Similar skills

  • Caveman Optimization Evaluator

    JuliusBrussee/caveman

    Turns a Caveman report-only optimization observation into one minimal code change and a paired baseline evaluation, after the operator picks which to pursue.

    110k GitHub starsUsed in 1 repo~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • SQL Optimization

    github/awesome-copilot

    Official

    Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server…

    40k GitHub starsUsed in 2 repos~2.3k tokens
    DatabasesAuto-check passed
  • Arize Evaluator

    github/awesome-copilot

    Official

    Handles LLM-as-judge evaluation workflows on Arize including creating/updating evaluators, running evaluations on spans or experiments, managing tasks, trigger-run operations, column mapping, and…

    40k GitHub starsUsed in 2 repos~8.1k tokens
    AI & LLM EngineeringAuto-check: notes
  • Agent skill for performance-optimizer - invoke with $agent-performance-optimizer

    74k GitHub starsUsed in 2 repos~3.6k tokens
    Auto-check passed
  • Database Optimizer

    davila7/claude-code-templates

    Expert database optimizer specializing in modern performance tuning, query optimization, and scalable architectures.

    32k GitHub starsUsed in 7 repos~2.5k tokens
    DatabasesAuto-check passed
  • LLM Evaluation

    davila7/claude-code-templates

    Master comprehensive evaluation strategies for LLM applications, from automated metrics to human evaluation and A/B testing.

    32k GitHub starsUsed in 12 repos~3.5k tokens
    AI & LLM EngineeringAuto-check passed

More from shinpr/ai-coding-project-boilerplate

All 42 skills in this repo
  • Integration E2E Testing

    shinpr/ai-coding-project-boilerplate

    Selects and designs the smallest integration/E2E test set that proves accepted behavior at an observable boundary.

    232 GitHub stars~2.8k tokensUpdated 3 days ago
    Auto-check passed
  • Frontend Technical Spec

    shinpr/ai-coding-project-boilerplate

    Defines React environment, component architecture, state/data flow, build verification, and frontend non-functional criteria from repository evidence.

    232 GitHub stars~1.9k tokensUpdated 3 days ago
    Auto-check: notes
  • Frontend Typescript Rules

    shinpr/ai-coding-project-boilerplate

    Applies React/TypeScript type safety, component design, and state management rules.

    232 GitHub stars~1.7k tokensUpdated 3 days ago
    Auto-check passed
  • Implementation Approach

    shinpr/ai-coding-project-boilerplate

    Selects implementation strategy (vertical slice, horizontal, or hybrid) with risk assessment.

    232 GitHub stars~3.2k tokensUpdated 3 days ago
    Auto-check passed
  • Subagents Orchestration Guide

    shinpr/ai-coding-project-boilerplate

    Coordinates subagents through scale-based planning, approval, implementation, verification, and escalation flows.

    232 GitHub stars~8k tokensUpdated 3 days ago
    Auto-check passed
  • Typescript Rules

    shinpr/ai-coding-project-boilerplate

    Applies type safety and error handling rules. An agent skill from shinpr/ai-coding-project-boilerplate.

    232 GitHub stars~1.5k tokensUpdated 3 days ago
    Auto-check passed

Questions about Skill Optimization

What does Skill Optimization do?

Evaluates and optimizes skill file quality using 9 content patterns and 10 editing principles. Skill Optimization is an agent skill from shinpr/ai-coding-project-boilerplate. Evaluates and optimizes skill file quality using 9 content patterns and 10 editing principles.

When should I use Skill Optimization?

Skill Optimization fits situations like: creating skills; refining skill content; auditing skill quality.

How do I install Skill Optimization in Claude Code?

Run `npx skills add shinpr/ai-coding-project-boilerplate --skill skill-optimization -a claude-code`. Or copy the skill folder (.claude/skills-en/skill-optimization in shinpr/ai-coding-project-boilerplate) into .claude/skills/skill-optimization in your project. Claude Code loads it when a task matches its description.

How do I install Skill Optimization in Codex?

Run `npx skills add shinpr/ai-coding-project-boilerplate --skill skill-optimization -a codex`. Or copy the skill folder (.claude/skills-en/skill-optimization in shinpr/ai-coding-project-boilerplate) into .agents/skills/skill-optimization in your project. Codex loads it when a task matches its description.

Can I use Skill Optimization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add shinpr/ai-coding-project-boilerplate --skill skill-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/skill-optimization, .gemini/skills/skill-optimization, .github/skills/skill-optimization and .opencode/skills/skill-optimization in your project.

What does Skill Optimization need to run?

SKILL.md names no scripts, command-line tools or credentials: Skill Optimization is instructions for the agent only.

Does Skill Optimization access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Skill Optimization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Skill Optimization use?

Skill Optimization is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Skill Optimization use?

About 3.5k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.4k tokens, read only when the agent opens those files.

What are the alternatives to Skill Optimization?

Skills that share tags, products or a category with Skill Optimization: Caveman Optimization Evaluator (JuliusBrussee/caveman, 110k stars), SQL Optimization (github/awesome-copilot, 40k stars), Arize Evaluator (github/awesome-copilot, 40k stars) and Agent Performance Optimizer (ruvnet/ruflo, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Skill Optimization?

shinpr (a GitHub user) maintains it in shinpr/ai-coding-project-boilerplate, which has 232 GitHub stars. The repository holds 42 skills in this directory. The repository was last updated on October 4, 2026.

Source: shinpr/ai-coding-project-boilerplate on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.