skill-tuning

0
0
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

You might also like

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.

643969

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.

591705

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."

318398

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

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.

451339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.