skill-tuning
- Repo stars 2,029
- Author updated Live
- Author repo Claude-Code-Workflow
- Domain
- Data
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @catlog22 · no license declared
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Shell exec
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: skill-tuning
description: Universal skill diagnosis and optimization tool. Detect and fix skill execution issues including…
category: data
runtime: no special runtime
---
# skill-tuning output preview
## PART A: Task fit
- Use case: 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"..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Architecture / Core Issues Detected / Problem Categories (Detailed Specs)” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “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".”.
- **02** When the source has headings, the agent prioritizes “Architecture / Core Issues Detected / Problem Categories (Detailed Specs)” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source mentions slash commands such as `/skill-tuning`; use them first when your agent supports command triggers.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files, run shell commands.
Start with a small task and check whether the result follows “Architecture / Core Issues Detected / Problem Categories (Detailed Specs)”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: skill-tuning
description: Universal skill diagnosis and optimization tool. Detect and fix skill execution issues including…
category: data
source: catlog22/Claude-Code-Workflow
---
# skill-tuning
## When to use
- Universal skill diagnosis and optimization tool. Detect and fix skill execution issues including context explosion, lo…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Architecture / Core Issues Detected / Problem Categories (Detailed Specs)” and keep inference separate from source facts.
- read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "skill-tuning" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Architecture / Core Issues Detected / Problem Categories (Detailed Specs)
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files, run shell commands | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} 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
| Priority | Problem | Root Cause | Fix Strategy |
|---|---|---|---|
| P0 | Authoring Violation | Intermediate files, state bloat, file relay | eliminate_intermediate, minimize_state |
| P1 | Data Flow Disruption | Scattered state, inconsistent formats | state_centralization, schema_enforcement |
| P2 | Agent Coordination | Fragile chains, no error handling | error_wrapping, result_validation |
| P3 | Context Explosion | Unbounded history, full content passing | sliding_window, path_reference |
| P4 | Long-tail Forgetting | Early constraint loss | constraint_injection, checkpoint_restore |
| P5 | Token Consumption | Verbose prompts, state bloat | prompt_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
| Step | Action | Orchestrator Decision | Output |
|---|---|---|---|
| 1 | action-init |
status='pending' | Backup, session created |
| 2 | action-analyze-requirements |
After init | Required dimensions + coverage |
| 3 | Diagnosis (6 types) | Focus areas | state.diagnosis.{type} |
| 4 | action-gemini-analysis |
Critical issues OR user request | Deep findings |
| 5 | action-generate-report |
All diagnosis complete | state.final_report |
| 6 | action-propose-fixes |
Issues found | state.proposed_fixes[] |
| 7 | action-apply-fix |
Pending fixes | Applied + verified |
| 8 | action-complete |
Quality gates pass | session.status='completed' |
Action Reference
| Category | Actions | Purpose |
|---|---|---|
| Setup | action-init | Initialize backup, session state |
| Analysis | action-analyze-requirements | Decompose user request via Gemini CLI |
| Diagnosis | action-diagnose-{context,memory,dataflow,agent,docs,token_consumption} | Detect category-specific issues |
| Deep Analysis | action-gemini-analysis | Gemini CLI: complex/critical issues |
| Reporting | action-generate-report | Consolidate findings → final_report |
| Fixing | action-propose-fixes, action-apply-fix | Generate + apply fixes |
| Verify | action-verify | Re-run diagnosis, check gates |
| Exit | action-complete, action-abort | Finalize 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
- Problem-First: Diagnosis before any fix
- Data-Driven: Record traces, token counts, snapshots
- Iterative: Multiple rounds until quality gates pass
- Reversible: All changes with backup checkpoints
- 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_reportstate.final_report- Markdown summary (in state.json)state.applied_fixes- List of applied fixes with verification results
Reference Documents
| Document | Purpose |
|---|---|
| specs/problem-taxonomy.md | Classification + detection patterns |
| specs/tuning-strategies.md | Fix implementation guide |
| specs/dimension-mapping.md | Dimension ↔ Spec mapping |
| specs/quality-gates.md | Quality verification criteria |
| phases/orchestrator.md | Workflow orchestration |
| phases/state-schema.md | State structure definition |
| phases/actions/ | Individual action implementations |
Decide Fit First
Design Intent
How To Use It
Boundaries And Review