skill-tuning

0
1
Source

Universal skill diagnosis and optimization tool. Detect and fix skill execution issues including context explosion, long-tail forgetting, data flow disruption, and agent coordination failures. Supports Gemini CLI for deep analysis. Triggers on "skill tuning", "tune skill", "skill diagnosis", "optimize skill", "skill debug".

Install

mkdir -p .claude/skills/skill-tuning && curl -L -o skill.zip "https://mcp.directory/api/skills/download/6305" && unzip -o skill.zip -d .claude/skills/skill-tuning && rm skill.zip

Installs to .claude/skills/skill-tuning

About this skill

Skill Tuning

Autonomous diagnosis and optimization for skill execution issues.

Architecture

┌─────────────────────────────────────────────────────┐
│  Phase 0: Read Specs (mandatory)                    │
│  → problem-taxonomy.md, tuning-strategies.md         │
└─────────────────────────────────────────────────────┘
                        ↓
┌─────────────────────────────────────────────────────┐
│  Orchestrator (state-driven)                         │
│  Read state → Select action → Execute → Update → ✓ │
└─────────────────────────────────────────────────────┘
        ↓                           ↓
┌──────────────────────┐   ┌──────────────────┐
│  Diagnosis Phase     │   │ Gemini CLI       │
│  • Context          │   │ Deep analysis    │
│  • Memory           │   │ (on-demand)      │
│  • DataFlow         │   │                  │
│  • Agent            │   │ Complex issues   │
│  • Docs             │   │ Architecture     │
│  • Token Usage      │   │ Performance      │
└──────────────────────┘   └──────────────────┘
                ↓
        ┌───────────────────┐
        │  Fix & Verify     │
        │  Apply → Re-test  │
        └───────────────────┘

Core Issues Detected

PriorityProblemRoot CauseFix Strategy
P0Authoring ViolationIntermediate files, state bloat, file relayeliminate_intermediate, minimize_state
P1Data Flow DisruptionScattered state, inconsistent formatsstate_centralization, schema_enforcement
P2Agent CoordinationFragile chains, no error handlingerror_wrapping, result_validation
P3Context ExplosionUnbounded history, full content passingsliding_window, path_reference
P4Long-tail ForgettingEarly constraint lossconstraint_injection, checkpoint_restore
P5Token ConsumptionVerbose prompts, state bloatprompt_compression, lazy_loading

Problem Categories (Detailed Specs)

See specs/problem-taxonomy.md for:

  • Detection patterns (regex/checks)
  • Severity calculations
  • Impact assessments

Tuning Strategies (Detailed Specs)

See specs/tuning-strategies.md for:

  • 10+ strategies per category
  • Implementation patterns
  • Verification methods

Workflow

StepActionOrchestrator DecisionOutput
1action-initstatus='pending'Backup, session created
2action-analyze-requirementsAfter initRequired dimensions + coverage
3Diagnosis (6 types)Focus areasstate.diagnosis.{type}
4action-gemini-analysisCritical issues OR user requestDeep findings
5action-generate-reportAll diagnosis completestate.final_report
6action-propose-fixesIssues foundstate.proposed_fixes[]
7action-apply-fixPending fixesApplied + verified
8action-completeQuality gates passsession.status='completed'

Action Reference

CategoryActionsPurpose
Setupaction-initInitialize backup, session state
Analysisaction-analyze-requirementsDecompose user request via Gemini CLI
Diagnosisaction-diagnose-{context,memory,dataflow,agent,docs,token_consumption}Detect category-specific issues
Deep Analysisaction-gemini-analysisGemini CLI: complex/critical issues
Reportingaction-generate-reportConsolidate findings → final_report
Fixingaction-propose-fixes, action-apply-fixGenerate + apply fixes
Verifyaction-verifyRe-run diagnosis, check gates
Exitaction-complete, action-abortFinalize or rollback

Full action details: phases/actions/

State Management

Single source of truth: .workflow/.scratchpad/skill-tuning-{ts}/state.json

{
  "status": "pending|running|completed|failed",
  "target_skill": { "name": "...", "path": "..." },
  "diagnosis": {
    "context": {...},
    "memory": {...},
    "dataflow": {...},
    "agent": {...},
    "docs": {...},
    "token_consumption": {...}
  },
  "issues": [{"id":"...", "severity":"...", "category":"...", "strategy":"..."}],
  "proposed_fixes": [...],
  "applied_fixes": [...],
  "quality_gate": "pass|fail",
  "final_report": "..."
}

See phases/state-schema.md for complete schema.

Orchestrator Logic

See phases/orchestrator.md for:

  • Decision logic (termination checks → action selection)
  • State transitions
  • Error recovery

Key Principles

  1. Problem-First: Diagnosis before any fix
  2. Data-Driven: Record traces, token counts, snapshots
  3. Iterative: Multiple rounds until quality gates pass
  4. Reversible: All changes with backup checkpoints
  5. Non-Invasive: Minimal changes, maximum clarity

Usage Examples

# Basic skill diagnosis
/skill-tuning "Fix memory leaks in my skill"

# Deep analysis with Gemini
/skill-tuning "Architecture issues in async workflow"

# Focus on specific areas
/skill-tuning "Optimize token consumption and fix agent coordination"

# Custom issue
/skill-tuning "My skill produces inconsistent outputs"

Output

After completion, review:

  • .workflow/.scratchpad/skill-tuning-{ts}/state.json - Full state with final_report
  • state.final_report - Markdown summary (in state.json)
  • state.applied_fixes - List of applied fixes with verification results

Reference Documents

DocumentPurpose
specs/problem-taxonomy.mdClassification + detection patterns
specs/tuning-strategies.mdFix implementation guide
specs/dimension-mapping.mdDimension ↔ Spec mapping
specs/quality-gates.mdQuality verification criteria
phases/orchestrator.mdWorkflow orchestration
phases/state-schema.mdState structure definition
phases/actions/Individual action implementations

copyright-docs

catlog22

Generate software copyright design specification documents compliant with China Copyright Protection Center (CPCC) standards. Creates complete design documents with Mermaid diagrams based on source code analysis. Use for software copyright registration, generating design specification, creating CPCC-compliant documents, or documenting software for intellectual property protection. Triggers on "软件著作权", "设计说明书", "版权登记", "CPCC", "软著申请".

5214

prompt-enhancer

catlog22

Transform vague prompts into actionable specs using intelligent analysis and session memory. Use when user input contains -e or --enhance flag.

11812

project-analyze

catlog22

Multi-phase iterative project analysis with Mermaid diagrams. Generates architecture reports, design reports, method analysis reports. Use when analyzing codebases, understanding project structure, reviewing architecture, exploring design patterns, or documenting system components. Triggers on "analyze project", "architecture report", "design analysis", "code structure", "system overview".

3810

software-manual

catlog22

Generate interactive TiddlyWiki-style HTML software manuals with screenshots, API docs, and multi-level code examples. Use when creating user guides, software documentation, or API references. Triggers on "software manual", "user guide", "generate manual", "create docs".

319

command-guide

catlog22

Workflow command guide for Claude DMS3 (78 commands). Search/browse commands, get next-step recommendations, view documentation, report issues. Triggers "CCW-help", "CCW-issue", "ccw-help", "ccw-issue", "ccw"

1006

skill-generator

catlog22

Meta-skill for creating new Claude Code skills with configurable execution modes. Supports sequential (fixed order) and autonomous (stateless) phase patterns. Use for skill scaffolding, skill creation, or building new workflows. Triggers on "create skill", "new skill", "skill generator".

256

You might also like

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

2,2683,903

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

3,6613,342

pdf-to-markdown

aliceisjustplaying

Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.

4,7072,234

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

2,2851,724

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

2,4881,553

youtube-transcribe-skill

feiskyer

Extract subtitles/transcripts from a YouTube video URL and save as a local file. Use when you need to extract subtitles from a YouTube video.

3681,444