Skill Optimization

VerifiedCaution

Analyze and optimize a skill using academic research and structural improvements.

Sby Skills Guide Bot
DevelopmentIntermediate
8/15/2026
Claude Code
#skill-authoring#academic-research#prompt-engineering#workflow-orchestration#verification

Recommended for

Automated summary

Analyzes an existing Claude Code skill, grounds it in academic research, and restructures it while preserving practical guidance.

Strengths

  • Breaks optimization into five explicit phases with concrete outputs at each stage.
  • Uses parallel research agents and a theory-to-practice mapping table to connect academic principles with existing rules.
  • Supports scoped runs through --research-only and --structure-only modes.

Limitations

  • Quality depends heavily on external search results and the model's ability to distill academic material.
  • Does not include a final evaluation step to measure whether the rewritten skill performs better.
  • Assumes a Claude Code environment with ~/.claude/skills and access to sonnet/opus models.
When to use it

Use it when an existing Claude Code skill needs academic grounding and a structural rewrite without losing its practical know-how.

When not to use it

Avoid it for creating a brand-new skill from scratch or when a quick content edit is enough.

Security analysis

Caution
Quality score80/100

The skill contains no destructive commands, no secret exfiltration, no obfuscated payloads, and no attempts to disable safety controls. Its risk stems only from implicit use of file writes in the user's skills directory, subagents, and network fetches for a legitimate research-and-rewrite workflow, with writes gated by user confirmation. That places it at 'caution' rather than 'safe' or 'risky'.

Findings
  • •No tools are declared, but the workflow implicitly requires filesystem reads/writes to `~/.claude/skills/<skill-name>/`, sub-agent spawning (Task), and outbound web fetching (WebFetch); this is legitimate but the capability surface is undeclared.
  • •Phase 5 rewrites/overwrites existing skill files on the user's machine; it is gated behind explicit user confirmation and an optional commit, which mitigates but does not eliminate risk of unintended modification.
  • •Research phase fetches arbitrary web content; the fetched material is summarized and could carry biased or injected guidance into the rewritten skill, with no sanitization step mentioned.
  • •The workflow rewrites files under ~/.claude/skills/<skill-name>/ (self-modification of agent configuration); Phase 5 gates this behind explicit user confirmation, so risk is low but worth noting.
  • •Delegates to Task sub-agents and WebFetch for external research; no commands, no credential handling, no destructive operations are instructed.
How this analysis is made

Examples

Full optimization
Optimize the code-review skill: research relevant academic work, map the findings to its current rules, and restructure it while preserving the practical examples.
Research-only pass
Run the optimize-skill command with --research-only on the git-workflow skill and return the key academic principles, sources, and search terms without changing any files.
Structure-only restructure
Use --structure-only to reorganize the testing-strategy skill around its core principles, keeping all existing practical rules intact.

description: Analyze and optimize a skill using academic research and structural improvements

Optimize Skill Command

Improve any skill by grounding it in academic research while preserving practical experience.

Parameters

  • <skill-name>: Name of skill directory (e.g., code-review, git-workflow)
  • --research-only: Only gather research, don't modify
  • --structure-only: Only restructure, skip research phase

Process Overview

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│  PHASE 1        │     │  PHASE 2        │     │  PHASE 3        │
│  Understand     │────▶│  Research       │────▶│  Synthesize     │
│  (sonnet)       │     │  (sonnet)       │     │  (opus)         │
└─────────────────┘     └─────────────────┘     └─────────────────┘
                                                        │
┌─────────────────┐     ┌─────────────────┐            │
│  PHASE 5        │     │  PHASE 4        │◀───────────┘
│  Apply          │◀────│  Restructure    │
│  (confirm)      │     │  (opus)         │
└─────────────────┘     └─────────────────┘

PHASE 1: Understand the Skill (sonnet)

Goal: Extract the core problem domain and current approach.

  1. Read ~/.claude/skills/<skill-name>/SKILL.md
  2. Check for sub-skills in same directory
  3. Extract:
    • Problem domain: What problem does this skill solve?
    • Current techniques: What methods/rules does it use?
    • Pain points: What issues prompted creating this skill?
    • Key terms: Domain-specific vocabulary for research

Output: Domain summary with 5-10 search terms.

Example:

Domain: Code review false positive reduction
Terms: "static analysis false positives", "code review precision",
       "interprocedural analysis", "path feasibility", "LLM code review"

PHASE 2: Academic Research (sonnet, parallel)

Goal: Find established solutions to the skill's problem domain.

Launch parallel search agents for:

  1. Academic papers: "<domain> academic research 2024 2025"
  2. Techniques: "<domain> techniques precision accuracy"
  3. LLM-specific: "LLM <domain> false positive reduction"
  4. Foundational: "<domain> theory fundamentals"

For each promising result, fetch and extract:

  • Core principles/frameworks
  • Generalizable techniques
  • Metrics/benchmarks
  • Key terminology

Output: Research summary with 3-5 key principles and sources.


PHASE 3: Synthesize Findings (opus)

Goal: Map academic principles to practical skill improvements.

For each academic principle:

  1. Does it explain WHY current rules work? → Add as foundation
  2. Does it suggest NEW verification steps? → Add as technique
  3. Does it contradict current rules? → Evaluate which is correct
  4. Is it too theoretical? → Skip or simplify

Create mapping table:

| Academic Principle | Current Skill Rule | Action | |-------------------|-------------------|--------| | Must vs May analysis | "Trace backwards" | Ground existing rule in theory | | Path feasibility | (missing) | Add new verification pillar | | Context completeness | "Check callers" | Expand with interface contracts |

Output: Integration plan with theory-practice mappings.


PHASE 4: Restructure Skill (opus)

Goal: Rewrite skill with academic grounding while preserving practical value.

Structure Template

---
name: <skill-name>
description: "<trigger description>"
---

# <Skill Title>

**Invoke:** `/<skill-name>` or triggers

---

## Core Principle: <Foundational Concept>

[Academic principle that explains WHY this skill works]
[Simple explanation with concrete example]

---

## Step 1: <First Major Step>

[Practical instructions grounded in theory]

## Step 2: <Verification Framework>

[Organized around academic pillars, not ad-hoc rules]

### Pillar 1: <Academic Concept>
**Question:** [What to ask yourself]
**Verification:** [How to check]
**Example:** [Real-world case]

### Pillar 2: ...

---

## Anti-Patterns

[Practical traps, explained by theory where possible]

---

## Quick Reference

[Commands, checklists]

---

## Sources

### Academic Foundations
- [Paper 1](url) - key finding
- [Paper 2](url) - key finding

### Industry Practice
- [Source 1](url)
- [Source 2](url)

Preservation Rules

  • Keep practical examples from real usage
  • Keep anti-patterns that came from experience
  • Keep quick references and commands
  • Add theory to explain WHY rules work, not replace them
  • Remove only redundant or superseded content

PHASE 5: Apply Changes

Present to user:

  1. Summary of changes: What's new, what's preserved, what's removed
  2. Token impact: Before/after size
  3. Key improvements: Which false positives this prevents

Options:

  • Apply: Write changes, offer to commit
  • Show draft: Display full restructured skill
  • Research only: Show findings without changes

Sub-Agent Configuration

| Phase | Agent | Model | Why | |-------|-------|-------|-----| | 1. Understand | Task | sonnet | Simple extraction | | 2. Research | Task (parallel) | sonnet | Multiple quick searches | | 2b. Fetch | WebFetch | - | Get paper details | | 3. Synthesize | Task | opus | Complex reasoning | | 4. Restructure | Task | opus | Writing quality | | 5. Apply | Main | - | User confirmation |


Example Invocation

/optimize-skill code-review

Phase 1: Understanding skill...
  Domain: Code review false positive reduction
  Current techniques: 5-point checklist, diff scoping, caller verification

Phase 2: Researching...
  [Agent 1] Academic: Found IEEE survey on SA false positives
  [Agent 2] Techniques: Found LLM4FPM, LLM4PFA papers
  [Agent 3] LLM-specific: Found context completeness research
  [Agent 4] Foundational: Found must/may analysis theory

Phase 3: Synthesizing...
  Mapped 3 academic principles to current rules
  Identified 2 new verification techniques

Phase 4: Restructuring...
  - Added: MUST vs MAY as core principle
  - Added: Three Verification Pillars framework
  - Preserved: All anti-patterns from experience
  - Preserved: Quick reference commands
  - Removed: Redundant checklist (absorbed into pillars)

Apply changes? [Apply / Show draft / Cancel]

Edge Cases

  1. No academic research found: Fall back to industry blogs, StackOverflow patterns
  2. Skill has sub-skills: Process main skill first, then offer to optimize sub-skills
  3. Conflicting research: Present both views, let user decide
  4. Skill is already well-structured: Report "no significant improvements found"
  5. Very large skill: Process in sections, maintain coherence

Success Criteria

  • Finds relevant academic principles for the domain
  • Maps theory to practice without losing practical value
  • Preserves real-world examples and anti-patterns
  • Improves structure and reduces redundancy
  • Provides clear sources for academic claims
  • Results in measurably better outcomes (fewer false positives, etc.)

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/skill-optimization-mstwj079/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/skill-optimization-mstwj079' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/skill-optimization-mstwj079/download' --output '.skill-downloads/skill-optimization-mstwj079/SKILL.md.part' && mv '.skill-downloads/skill-optimization-mstwj079/SKILL.md.part' '.skill-downloads/skill-optimization-mstwj079/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/skill-optimization-mstwj079/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills