agentleFS
s977043s977043/river-review/.claude/skills/skill-optimizer/SKILL.md

skill-optimizer

Skill7 starsChanged 5 months agoMITView on GitHub

Evaluate and improve an existing Claude Code skill using explicit success criteria and small controlled changes. Use when the user asks to optimize a skill, reduce over-triggering or under-triggering, improve reliability, tighten instructions, or add evals for a skill. Also trigger on "スキルを改善して", "スキルを最適化して", "スキルの品質を確認して".

30 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use octocat, linting-neostandard-eslint9 and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • mcollinaSkill

    octocat

    Use this skill whenever the prompt contains any `github.com` URL, even if the user only pastes a link and gives no GitHub-specific keywords. Handles git and GitHub operations using the gh CLI. Triggers include any GitHub link to an issue, pull request, commit, compare page, Actions run, release, discussion, or repository. Covers creating and reviewing PRs, repository security advisories (GHSA), their comments, and fix PRs in their temporary private forks, private vulnerability report discussions, watching CI checks, interactive rebasing, branch cleanup, submodule management, and repository archaeology with git log/blame/bisect.

    Also in 3 projects that use this

  • mcollinaSkill

    linting-neostandard-eslint9

    Configures ESLint v9 flat config and neostandard for JavaScript and TypeScript projects, including migrating from legacy `.eslintrc*` files or the `standard` package. Use when you need to set up or fix linting with `eslint.config.js` or `eslint.config.mjs`, troubleshoot lint errors, configure neostandard rules, migrate from `.eslintrc` to flat config, or integrate linting into CI pipelines and pre-commit hooks.

    Also in 3 projects that use this

  • VercelSkill

    oauth

    Configure OAuth providers (Google, Apple, Microsoft, Facebook, GitHub, etc.) to work with portless local dev URLs. Use when setting up OAuth redirect URIs, fixing "redirect_uri_mismatch" or "invalid redirect" errors, configuring sign-in providers for local development, or when a provider rejects .localhost subdomains. Triggers include "OAuth not working with portless", "redirect URI mismatch", "Google/Apple/Microsoft sign-in fails locally", "configure OAuth for local dev", or any task involving OAuth callback URLs with portless domains.

    Also in 3 projects that use this

  • AnthropicSkill

    documentation

    Write and maintain technical documentation. Trigger with "write docs for", "document this", "create a README", "write a runbook", "onboarding guide", or when the user needs help with any form of technical writing — API docs, architecture docs, or operational runbooks.

    Also in 3 projects that use this

  • MicrosoftSkill

    init

    Also in 3 projects that use this

  • OpenAISkill

    systematic-debugging

    Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes

    Also in 3 projects that use this

  • +4 more from mcollina

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 0 are common, 14 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 21 edited versions we read keep these.

  • 14

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never apply a large rewrite first.

    line 29
  2. Distinctive:

    Before proposing wording or structure fixes, you must check whether the failure is caused by the wrong pattern or a missing secondary …

    line 96
  3. Distinctive:

    If pattern mismatch exists:

    line 106
  4. Distinctive:

    do not jump to wording tweaks before resolving the pattern issue

    line 109
  5. Distinctive:

    Do not proceed to Phase 3 until pattern mismatch has been evaluated and documented.

    line 111
  6. Distinctive:

    Prefer the smallest useful change.

    line 127
  7. Very specific:

    Use ${CLAUDE_SKILL_ROOT}/assets/eval-rubric-template.md as the rubric structure.

    line 142
  8. Distinctive:

    do not adopt on a single successful run

    line 146
  9. Distinctive:

    do not accept regressions on critical criteria

    line 147
  10. Distinctive:

    no broad rewrites without evidence

    line 158
  11. Distinctive:

    no changes that weaken safety or review steps

    line 161
  12. Distinctive:

    no context reduction that hides always-required routing, hard guards, output contracts, or verification

    line 162
  13. Distinctive:

    no new ambiguity in the description

    line 163
  14. Distinctive:

    remove verification to save tokens

    line 193
  15. Distinctive:

    If the current skill is structurally unsalvageable:

    line 198

“Common” is measured: kept by at least 6 in 10 of the 21 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Pattern declaration

Primary pattern: Reviewer Secondary patterns: Pipeline Why: optimization starts with diagnosis against criteria, then applies small changes in a controlled sequence with eval checkpoints.

Purpose

Improve an existing skill without breaking what already works.

Your job is to:

  1. inspect the current skill package
  2. define or refine success criteria
  3. identify failure modes
  4. propose one small change at a time
  5. attach each change to an eval hypothesis
  6. reject changes that cannot be evaluated

Core optimization rule

Never apply a large rewrite first.

Optimize in small units:

  • description
  • gate logic
  • workflow order
  • examples
  • prohibited behaviors
  • output contract
  • review checklist
  • supporting file structure

Change only one major unit per proposal.

Phase 0: Baseline audit

Inspect:

  • current SKILL.md
  • current SKILL.md entrypoint size (UTF-8 bytes / lines) and whether optional knowledge is eagerly loaded
  • current supporting files
  • invocation settings
  • current examples
  • current failure reports or user complaints
  • existing eval cases if any

Then summarize:

  • what the skill is supposed to do
  • where it fails
  • whether the issue is discovery, execution, or validation

Phase 1: Success criteria

Define 3 to 6 evaluation criteria.

Each criterion must be:

  • specific
  • observable
  • pass/fail or narrowly scored

Separate:

  • trigger quality
  • task fidelity
  • completeness
  • safety / side effects
  • output format compliance

Phase 2: Failure mapping

Classify failures into:

  • over-triggering
  • under-triggering
  • missing context collection
  • vague output
  • hallucinated assumptions
  • skipped verification
  • unnecessary tool use
  • high token or step cost
  • entrypoint context bloat / optional knowledge that should be progressively disclosed

Phase 2.5: Pattern mismatch diagnosis

Before proposing wording or structure fixes, you must check whether the failure is caused by the wrong pattern or a missing secondary pattern. Do not skip this phase.

Check:

  • acts too early on ambiguous input → missing Inversion
  • output structure is inconsistent across runs → missing Generator
  • returns unvalidated or unchecked output → missing Reviewer
  • skips required steps or loses sequence control → missing Pipeline
  • lacks domain-specific accuracy → missing Tool Wrapper

If pattern mismatch exists:

  • recommend the smallest structural correction first
  • do not jump to wording tweaks before resolving the pattern issue

Do not proceed to Phase 3 until pattern mismatch has been evaluated and documented.

Phase 3: Optimization proposal

For each proposed change, output:

  • change id
  • exact file to modify
  • exact section to modify
  • exact change summary
  • reason
  • expected benefit
  • risk
  • eval method
  • rollback condition

Prefer the smallest useful change.

For context-health failures, move optional examples, troubleshooting, rationale, rare exceptions, or provider-specific detail to supporting references before rewriting behavior. Keep activation, responsibility, routing, hard guards, output contracts, and required verification in the main entrypoint unless an eval proves a safer boundary. In River Review Agent Skills, inspect the warning-only 12 KiB / 250-line advisory from npm run agent-skills:validate; do not optimize to the number alone.

Phase 4: Eval plan

For the recommended next change, define:

  • baseline measurement
  • test prompts
  • grading method
  • number of trials
  • adoption threshold
  • rollback threshold

Use ${CLAUDE_SKILL_ROOT}/assets/eval-rubric-template.md as the rubric structure.

Default stance:

  • do not adopt on a single successful run
  • do not accept regressions on critical criteria

Phase 5: Review

Check against:

  • ${CLAUDE_SKILL_ROOT}/references/review-default.md
  • ${CLAUDE_SKILL_ROOT}/references/optimization-playbook.md

Before finalizing, verify:

  • no broad rewrites without evidence
  • no hidden assumptions
  • no unverifiable claims
  • no changes that weaken safety or review steps
  • no context reduction that hides always-required routing, hard guards, output contracts, or verification
  • no new ambiguity in the description

Output format

Return exactly these sections:

Baseline summary

Success criteria

Failure modes

Pattern mismatch diagnosis

Recommended next change

Eval plan

Rollback rule

Follow-up changes backlog

Anti-patterns

Do not:

  • rewrite the whole skill first
  • mix multiple major changes in one proposal
  • optimize without a baseline
  • optimize only for style
  • remove verification to save tokens
  • broaden description without evidence

Failure handling

If the current skill is structurally unsalvageable:

  • say so directly
  • recommend a replacement design
  • explain why incremental optimization is not appropriate

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.