skill-builder
Use when creating new skills, optimizing existing skills, or auditing skill quality. Guides skill development following Claude Code official best practices.
What this skill does
## What This Skill Does Guides the creation and optimization of Claude Code skills using official best practices. Use this whenever: - Building a new skill from scratch - Optimizing or auditing an existing skill - Deciding on advanced features (subagent execution, hooks, dynamic context, etc.) - Troubleshooting a skill that isn't working correctly For the complete technical reference on all frontmatter fields, advanced patterns, and troubleshooting, see [reference.md](reference.md). ## Quick Start: What Is a Skill? A skill is a reusable set of instructions that tells Claude Code how to handle a specific task. Skills live in `.claude/skills/[skill-name]/SKILL.md` inside your project. When you type `/skill-name` or describe what you need in natural language, Claude loads the skill's instructions and follows them. Think of skills as SOPs for Claude. Instead of re-explaining a workflow every conversation, you write it once and invoke it forever. **How they work under the hood:** - Your project's `CLAUDE.md` instructions are always loaded, every conversation - Skill *descriptions* (from frontmatter) are always loaded so Claude knows what's available - The full skill content only loads when the skill is actually invoked - Once loaded, Claude follows the skill's instructions while still respecting your CLAUDE.md rules --- ## Mode 1: Build a New Skill When building a new skill, run the **Discovery Interview** first. Do NOT start writing files until discovery is complete. ### Discovery Interview Ask questions using AskUserQuestion, one round at a time. Each round covers one topic. Move to the next round only after the user answers. Keep going until you're 95% confident you understand the skill well enough to build it without further clarification. **Round 1: Goal & Name** *Why this matters: A clear goal prevents scope creep. The name becomes the `/slash-command`, so it needs to be memorable and specific.* - What does this skill do? What problem does it solve or what workflow does it automate? - What should we call it? (Suggest a name based on their answer -- lowercase, hyphens, max 64 chars) **Round 2: Trigger** *Why this matters: The `description` field is how Claude decides whether to load your skill. Bad trigger words mean Claude never uses it. Too broad means Claude fires it when you don't want it.* - What would someone say to trigger this? (Get 2-3 natural language phrases) - Should it be user-only (`/slash-command`), Claude-auto-invocable, or both? - Does it accept arguments? If so, what? (e.g., a topic, a URL, a file path) **Round 3: Step-by-Step Process** *Why this matters: Claude follows instructions literally. Vague steps produce vague results. Specific steps produce consistent output every time.* - Walk me through exactly what should happen from trigger to output. What's step 1? Step 2? Keep going. - For each step: Does Claude do it directly, or delegate to a subagent/script? - Does this need to be conversational (back-and-forth with the user) or is it a fire-and-forget task? **Round 4: Inputs, Outputs & Dependencies** *Why this matters: Skills that don't specify where to find inputs or where to put outputs produce inconsistent results. Nailing this down makes the skill reliable.* - What inputs does the skill need? (Files, API responses, user arguments, live data) - What does it produce? (Files, text output, structured data) Where do outputs go? - Does it need external APIs, scripts, or tools? Which ones? - Does it need reference files, style guides, templates, or examples? **Round 5: Guardrails & Edge Cases** *Why this matters: Skills without guardrails can produce unexpected behavior -- wrong outputs, unnecessary API costs, or actions you didn't intend.* - What could go wrong? What are the common failure modes? - What should this skill NOT do? Any hard boundaries? - Are there cost concerns? (API calls, AI image generation, etc.) - Any ordering or dependency constraints? (e.g., "must check X before doing Y") **Round 6: Confirmation** *Why this matters: Misunderstandings caught here save you from rebuilding the skill later.* After all rounds, summarize your understanding back to the user in this format: ``` ## Skill Summary: [name] **Goal:** [one sentence] **Trigger:** `/name` + [natural language phrases] **Arguments:** [what it accepts, or "none"] **Process:** 1. [step] 2. [step] ... **Inputs:** [what it reads/needs] **Outputs:** [what it produces + where] **Dependencies:** [APIs, scripts, agents, reference files] **Guardrails:** [what can go wrong, what to avoid] ``` Ask: "Does this capture it? Anything to add or change?" Only proceed to building once the user confirms. **Skipping rounds:** If the user provides enough context upfront (e.g., they describe the full workflow in their first message), skip rounds that are already answered. Don't re-ask what you already know. ### Build Phase Once discovery is complete, build the skill following these steps: **Step 1: Choose the skill type** - **Task skills** (most common) give step-by-step instructions for a specific action. Invoked with `/name` or natural language. Examples: generate a report, summarize a PR, deploy code. - **Reference skills** add knowledge Claude applies to current work without performing an action. Examples: coding conventions, API patterns, style guides. **Step 2: Configure frontmatter** Set these fields based on what you learned in discovery: - `name` -- Matches the directory name. Lowercase, hyphens, max 64 chars. - `description` -- Written as: "Use when someone asks to [action], [action], or [action]." Include natural keywords from the trigger phrases. - `disable-model-invocation: true` -- Set if the skill has side effects (file generation, API calls, costs money). Prevents Claude from auto-invoking. - `argument-hint` -- Set if the skill accepts arguments. Shows in the `/` menu autocomplete. - `context: fork` + `agent` -- Set if the skill is self-contained and doesn't need conversation history. - `model` -- Set if a specific model capability is needed. - `allowed-tools` -- Set if the skill should have restricted tool access. Only set fields you actually need. Don't add frontmatter just because you can. For the full field reference and invocation control matrix, see [reference.md](reference.md). **Step 3: Write the skill content** Structure task skills as: 1. **Context** -- Files to read, APIs to call, reference material to load 2. **Step-by-step workflow** -- Numbered steps. Each step tells Claude exactly what to do. 3. **Output format** -- What the result looks like. Include templates, file paths, structured formats. 4. **Notes** -- Edge cases, constraints, what to delegate, what NOT to do. Content rules: - Keep SKILL.md under 500 lines. Move detailed reference material to supporting files. - Use `$ARGUMENTS` / `$N` for dynamic input from arguments. - Use `!`command`` for dynamic context injection (preprocessing). - Be specific about agent delegation -- include exact prompt text. - Specify all file paths (inputs, outputs, scripts, references). **Step 4: Add supporting files (if needed)** If your skill needs detailed reference docs, examples, or scripts, add them alongside SKILL.md in the same directory. Reference them from SKILL.md so Claude knows they exist. Supporting files are NOT loaded automatically -- they load only when Claude needs them. See [reference.md](reference.md) for the full pattern. **Step 5: Deploy, Backup & Register in Installer** All skills are backed up to the central skill repository and deployed to their target project. **Backup location (always):** `~/workspace/x85446/claudecodetricks/skills/[skill-name]/` This is the canonical copy. The installer script deploys from here. **Deploy location:** The target project's `.claude/skills/` directory. Ask the user which project to deploy to using AskUserQuestion. There is no default -- the user must specify. Known deploy targets (for reference): | Target | Pat
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.