AgentSkillsCN

skill-tweaker

修复、优化或更新现有的 Claude Code 技能。当用户:(1) 反映某项技能运行不佳或触发错误;(2) 希望调整技能的行为;(3) 提出“修复技能”、“更新技能”、“微调技能”、“技能无法正常工作”、“技能触发过于频繁”时,可使用此技能。内容包括:编辑 SKILL.md 的 frontmatter 与正文,调整 scripts/references/assets,排查触发问题。

SKILL.md
--- frontmatter
name: skill-tweaker
description: >
  Fix, improve, or update existing Claude Code skills. Use when: (1) User reports a skill isn't
  working well or triggering incorrectly, (2) User wants to adjust skill behavior, (3) User says
  'fix skill', 'update skill', 'tweak skill', 'skill not working', 'skill triggers too often'.
  Handles: editing SKILL.md frontmatter and body, adjusting scripts/references/assets, debugging
  trigger issues.

Tweak Existing Skill

Workflow

Step 1: Identify the skill

Find skills at:

  • ~/.claude/skills/<name>/SKILL.md (personal)
  • .claude/skills/<name>/SKILL.md (project)

Read the SKILL.md and any referenced files (scripts/, references/, assets/).

Step 2: Diagnose the issue

Common problems and fixes:

ProblemLikely CauseFix
Skill not triggeringPoor descriptionRewrite with clear trigger keywords and scenarios
Skill triggers too oftenDescription too broadMake description more specific; add disable-model-invocation: true for manual-only
Skill not visibleExceeds character budgetRun /context to check; shorten description or increase SLASH_COMMAND_TOOL_CHAR_BUDGET
Wrong agent used in forkagent: field incorrectChange to correct agent name
Forked skill lacks contextMissing instructionsSkill content IS the prompt in fork mode - make it self-contained
Script failsBug or environment issueRead and test the script

Step 3: Apply changes

Frontmatter fields reference:

FieldDescription
nameSkill name (lowercase, hyphens, max 64 chars)
descriptionWhat it does + when to use. Primary trigger mechanism
disable-model-invocationtrue = manual only via /skill-name
user-invocablefalse = hidden from / menu, Claude can still auto-invoke
argument-hintHint in autocomplete (e.g., [filename])
allowed-toolsTools allowed without permission when active
modelModel override when active
contextfork = run in isolated subagent context
agentAgent type for fork: Explore, Plan, general-purpose, or custom agent name
hooksLifecycle hooks

Substitution variables: $ARGUMENTS, $0, $1, ${CLAUDE_SESSION_ID}

Dynamic injection: !`shell command` runs before skill content is sent to Claude.

Step 4: Verify

After editing:

  1. YAML frontmatter parses without errors
  2. Description matches intended trigger scenarios
  3. Referenced files (scripts, references) exist and are correct
  4. For forked skills: content is self-contained (no conversation history available)
  5. SKILL.md body stays under 500 lines

Progressive Disclosure Reminder

If SKILL.md is getting too long (approaching 500 lines):

  • Move detailed content to references/ files
  • Keep only core workflow and navigation in SKILL.md
  • Reference split files clearly: "See filename for details"