/skill-kit:authorfrom skill-kit
Was the skill-authoring skill. Creates and optimizes Claude Code skills following Anthropic's official best practices with emphasis on agent parallelization and script-first determinism. Use when: (1) creating a new skill from scratch, (2) optimizing an existing skill that exceeds 500 lines or has poor discoverability, (3) extracting inline code into scripts/ or reference material into references/, (4) designing orchestrator + sub-agent architectures for complex skills, (5) restructuring a skill directory into SKILL.md + scripts/ + references/ layout, (6) auditing skill cross-references for stale links. Covers: agent-first orchestration, parallel sub-agent design, script-first determinism, frontmatter rules, progressive disclosure, directory layout, description writing, and quality checklist.
Ships in skill-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Paths: This skill's commands call its scripts by absolute path. Claude Code fills in this skill's directory before the text reaches you, so each command works from the project directory. In
references/files, which get no such filling-in,<SCRIPTS_DIR>stands for this skill's scripts directory:<SCRIPTS_DIR> = "${CLAUDE_SKILL_DIR}/scripts"Values you only know at run time are
<NAME>placeholders: write the real value in their place.
When you write a new skill, do the same, but never copy a path from this file. Claude Code replaces the skill-directory variable everywhere in a SKILL.md, so any path you see here is already this skill's own absolute path. In the new skill's SKILL.md, call each script as: a double quote, a dollar sign, {CLAUDE_SKILL_DIR}, then /scripts/<name>.sh and a closing double quote, with no spaces between the parts. references/skill-templates.md (section "Script paths") describes the same text with an example. A bare ./scripts/<name>.sh resolves against the user's project, not the skill, so it fails. A command may not read a shell variable that an earlier block set (each block may run in a fresh shell). The templates in references/skill-templates.md and references/task-tracking-pattern.md, and the example below, write that prefix as <SKILL_SCRIPTS>.
Supported fields: name, description, metadata, plus model (sub-agent skills) and disable-model-invocation (slash-command-only skills). validate-skill.sh rejects any other.
---
name: kebab-case-name # ≤64 chars, lowercase + hyphens, no "anthropic" or "claude"
description: "Third-person description. Use when: (1) ..., (2) ..." # ≤1024 chars, single-line quoted
metadata:
version: 1.0.0 # semver: patch=typos, minor=new content, major=breaking
---
Do NOT include: author, date, tags, allowed-tools, category, or
top-level version (use metadata.version instead). Use double-quoted single-line
strings for description — block scalars (description: |) cause VS Code linter errors.
Name rules: prefer the gerund form, which says what the skill does (processing-pdfs,
analyzing-spreadsheets); a noun phrase (pdf-processing) is fine. Avoid vague names
(helper, utils, tools). validate-skill.sh fails a name over 64 characters or one
that contains anthropic or claude.
Description rules:
Use when: (1) ..., (2) ..., (3) ...your-skill/
├── SKILL.md # Required — decision workflow, when-to-use, key rules
├── scripts/ # Optional — executable automation
│ ├── extract.sh # Pre-processing: deterministic data extraction
│ └── apply-fixes.sh # Post-processing: apply agent results
└── references/ # Optional — lookup material loaded on-demand
├── field-tables.md # Tables, matrices, lookup data
└── examples.md # Code examples, past case studies
# Agent definitions live alongside other agents (not inside the skill):
.claude/agents/
├── your-orchestrator.md # Pure orchestrator — delegates everything
├── your-sub-agent-a.md # Focused specialist (NOT user-invocable)
└── your-sub-agent-b.md # Focused specialist (NOT user-invocable)
| Content Type | Location | Why |
|---|---|---|
| Decision workflow | SKILL.md | Always loaded — guides what to do |
| Trigger conditions | SKILL.md | Must be visible for skill activation |
| Quick-reference commands | SKILL.md | Frequently needed during use |
| Agent orchestration pattern | SKILL.md | Defines how agents coordinate |
| Agent definitions | .claude/agents/ | Reusable across skills, standard location |
| Lookup tables, field refs | references/ | Consulted occasionally, not always |
| Code examples, case studies | references/ | Large blocks that dilute SKILL.md |
| Executable procedures | scripts/ | Predictable, testable, reusable |
head -100 instead of reading
all of it, so anything past that is missed.api-field-reference.md not ref1.md## Contents list, so a partial read still shows the scopevalidate-skill.sh fails a .md file that SKILL.md does not name (and no script reads),
and a file over 100 lines with no ## Contents heading in its first 30 linesDefault: extract a script. Only skip if the skill is purely decision guidance with no deterministic steps.
Extract into scripts/ when ANY apply:
Script requirements:
--help / -h with usage examplesTIMEOUT=47 if nobody wrote down where 47 came from--fix mode where applicable (detect + auto-remediate)chmod +x scripts/*.sh#!/usr/bin/env bash shebang (portable)set flags by script purpose: set -euo pipefail for validation
scripts; set -eu (without pipefail) for context-gathering scripts, whose
head-terminated pipes and zero-count grep -c would otherwise abort them. Under set -e,
((var++)) with var=0 aborts the script (use VAR=$((VAR + 1))), and a while read loop
at the end of a pipe runs in a subshell, so its variables are lost (use a for loop or < file)After writing the script, slim SKILL.md:
Reference from SKILL.md:
## Quick Check
```bash
<SKILL_SCRIPTS>/validate.sh /tmp/data.json # Report only
<SKILL_SCRIPTS>/validate.sh /tmp/data.json --fix # Auto-remediate
<SKILL_SCRIPTS>/validate.sh --help # Usage
```
Default: decompose into agents. Only skip if the skill is a single-step check or pure decision guidance. Every skill with 2+ independent subtasks should use parallel agents.
| Signal | Agent Approach | Teams? |
|---|---|---|
| Task has 2+ independent subtasks | Parallel sub-agents for each | No |
| Task requires web search, content reading, or AI judgement | Dedicated agent per domain | No |
| Task processes N items of the same type | Fan-out: one agent per item (or per batch) | No |
| Task has sequential phases with parallel work within | Orchestrator coordinates phase gates | Maybe |
| Task is a single deterministic check | No agent — use a script instead | No |
| Multi-phase workflow with inter-agent feedback | Named teammates via TeamCreate | Yes |
The pure orchestrator pattern is the gold standard for complex skills:
Orchestrator (coordinates, decides, reports)
├── Sub-agent A (focused task 1) ─── launched in parallel ──┐
├── Sub-agent B (focused task 2) ─── launched in parallel ──┤ SINGLE message
├── Sub-agent C (focused task 3) ─── launched in parallel ──┘
└── Script (deterministic pre/post-processing)
Orchestrator rules:
Agent Teams teammates and sub-agents CANNOT call MCP tools. MCP server connections and tool permissions are session-scoped — they don't propagate to tmux panes or child agent sessions. When a teammate calls an MCP tool, it shows "Permission request sent to team leader" and deadlocks — the lead has no mechanism to approve.
"Lead Reads, Agents Analyze" pattern:
mcp__* or ReadMcpResourceTool toolsThis applies to ALL MCP servers (Figma, Sentry, Railway, etc.) and both Agent Teams
teammates and non-team sub-agents (Agent tool calls). Always design skills that use
MCP data with this constraint in mind.
Each sub-agent should be maximally specialized:
haiku for fast/simple tasks (data extraction, formatting),
sonnet for moderate judgement (code review, validation), opus only when deep
reasoning is essential.Fan-out by item — one agent per catalog, per PR, per test folder:
# 3 catalogs → 3 parallel agents (SINGLE message)
Task(agent=general-purpose, prompt="Validate curated catalog URLs...")
Task(agent=general-purpose, prompt="Validate google-places catalog URLs...")
Task(agent=general-purpose, prompt="Validate experiences catalog URLs...")
Fan-out by concern — one agent per review dimension:
# 3 review concerns → 3 parallel agents (SINGLE message)
Task(agent=code-reviewer, prompt="Review for bugs/correctness...")
Task(agent=code-reviewer, prompt="Review for simplicity/DRY...")
Task(agent=code-reviewer, prompt="Review for project conventions...")
Phased parallelism — sequential phases, parallel within each:
Phase 1: Script extracts data (deterministic)
Phase 2: 3 parallel agents process data (judgement)
Phase 3: Script applies fixes (deterministic)
Phase 4: 1 agent validates results (judgement)
The most powerful pattern combines both:
Example flow: extract-urls.sh → 3 parallel verification agents → apply-fixes.sh
See references/agent-teams.md: teams vs sub-agents, the team pattern, conditional team usage, and the teams variant of the complex template.
For skills that spawn agents, create .claude/agents/<agent-name>.md:
---
name: agent-name
description: "Single-purpose description. NOT user-invocable — spawned by <orchestrator>."
model: sonnet # or haiku for simple tasks
---
You are a **<Role Name>**. Your mission is to <focused task>.
## Input (provided by orchestrator)
[What the orchestrator passes in the Task prompt]
## Output Format
[Exact JSON/report structure to return]
## Workflow
[Step-by-step procedure]
Agent registration: If the skill uses an orchestrator, include a Sub-Agent Registry table in the orchestrator's agent file listing all sub-agents, their concurrency model (parallel/sequential), purpose, and model tier.
Skills with 3+ sequential phases or workflows lasting >2 minutes should include a task manifest — a script that defines the exact TaskCreate checklist for each workflow the skill supports.
| Signal | Required? |
|---|---|
| 3+ sequential phases | Yes — users need visibility |
| Multiple workflows/subcommands | Yes — each workflow gets its own manifest |
| Single-phase script | No — overkill |
| Pure decision guidance (no execution) | No — nothing to track |
Every skill with tracking should include scripts/task-manifest.sh — a bash case
statement that emits a JSON array of tasks per workflow. Each task has subject,
activeForm, and description fields matching TaskCreate parameters.
See references/task-tracking-pattern.md for the full script template with examples.
Key rules:
case branch emitting a JSON array--list returns machine-readable workflow names; --help shows usagein_progress before starting, completed after, deleted on abort"${CLAUDE_SKILL_DIR}/scripts/generate-task-manifest.sh" \
--skill-dir /path/to/my-skill \
--workflows "full-audit:5,quick-check:2"
--help, error handling, exit codesscripts/task-manifest.sh for each workflow1.0.0Ask: "Can this task be split into independent subtasks that run in parallel?"
| Answer | Approach | Example |
|---|---|---|
| Yes — N independent items | Fan-out: one agent per item, orchestrator collects | catalog-url-validator: 3 parallel agents, one per catalog |
| Yes — N independent concerns | Fan-out by concern: one agent per dimension | pr-review-toolkit: parallel reviewers for code, tests, errors, types |
| Partially — phases with parallel steps | Phased: script → parallel agents → script | catalog-maintainer: backup → fetch → enrich → validate → embed |
| No — single sequential task | No orchestrator needed; single agent or script | catalog-embedding-sync: one script checks all |
Ask: "Can the skill's core action be expressed as a deterministic check or procedure?"
| Answer | Approach | Example |
|---|---|---|
| Yes — fully deterministic | Write script first, SKILL.md is thin wrapper | catalog-embedding-sync: script checks timestamps + counts |
| Mostly — with some judgement | Script handles the deterministic parts, agents handle judgement | catalog-url-validator: script extracts URLs, agents verify content |
| No — primarily decision guidance | Prose-first SKILL.md, no script needed | catalog-field-lifecycle: decision tree for field preservation |
Why script-first wins: A 140-line script replaces ~60 lines of prose in SKILL.md while being testable, runnable standalone, and composable with CI/hooks. The SKILL.md drops from "explain everything" to "explain when/why + point to script".
Ask: "Does this skill have 3+ sequential phases or take >2 minutes?"
| Answer | Approach | Example |
|---|---|---|
| Yes — 3+ phases | Add scripts/task-manifest.sh with one entry per phase | review-dependabot-prs: 8 tasks across triage→apply→test→deploy |
| Yes — multiple workflows | Add one case branch per workflow | triage-issues (github-board plugin): full-audit (5 tasks) + quick-check (2 tasks) |
| No — 1-2 fast phases | Skip task manifest — no tracking needed | catalog-embedding-sync: single script, <30 seconds |
Every skill with scripts MUST be dry-run tested against real project data before release.
Scripts that look correct often fail due to: regex format mismatches, grep pipe chains
where head causes SIGPIPE, find including coverage/build artifacts, and classification
heuristics that misfire on edge cases.
Procedure:
--json), scan for zero counts,
unexpected items, misclassified entries, empty sections--json — verify field values match human-readable outputCommon catches: grep -rlq ... | head -1 always exits 0 on empty -q output;
find without -not -path "*/coverage/*" includes test artifacts; regex assumes one
heading format but project uses another (e.g., ### Sub-Task vs ### AC1:).
| Found | Action |
|---|---|
| Nothing related | Create new |
| Same trigger + same fix | Update existing (minor version bump) |
| Same trigger, different root cause | Create new, add See Also links both ways |
| Same domain, different trigger | Update existing with new variant subsection |
| Stale or wrong | Deprecate in Notes, create replacement |
See references/skill-templates.md for the simple (script-only) and complex (orchestrator + parallel agents + scripts + task tracking) templates.
Before you publish, go through references/quality-checklist.md: decomposition and agents, scripts, progress tracking, teams, frontmatter, structure, cross-references and testing, with commands that check them.
Not covered by the rules above:
gh issue create, gh pr create), include ALL metadata flags (--label, --assignee,
--milestone) explicitly in the template. Agents improvise missing fields with
plausible-but-wrong values (e.g., dependencies label instead of project's dependabot
label). Include a selection guide for dynamic fields like priority labels.When a skill exceeds 500 lines, has poor structure, or runs slowly:
See **[references/your-file.md](references/your-file.md)** for the full lookup table.references/ and scripts/ links, verify all existskill-kit:extract — when to extract knowledge into skills (the WHY/WHEN)skill-kit:publish — package and distribute skills as plugins (the container)CHANGELOG.md (opens in a new tab)references/agent-teams.md (opens in a new tab)references/quality-checklist.md (opens in a new tab)references/skill-templates.md (opens in a new tab)references/task-tracking-pattern.md (opens in a new tab)scripts/generate-task-manifest.sh (opens in a new tab)scripts/validate-skill.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub abhattacherjee/claude-code-skills --plugin skill-kit3 skills in this plugin
/extractWas the claudeception skill. Extracts reusable knowledge from work sessions and codifies it into Claude Code skills. Use when: (1) /skill-kit:extract (was /claudeception) to review session learnings, (2) save this as a skill or extract a skill from this, (3) what did we learn?, (4) after non-obvious debugging, workarounds, or trial-and-error discovery. Evaluates whether current work contains extractable knowledge, checks for existing skills, and creates or updates skills following the skill-kit:author best practices./publishWas the skill-publishing skill. Publishes Claude Code skills as installable plugins and syncs them to a GitHub monorepo. Plugin-first: every skill with a plugin-manifest.json is auto-assembled and synced as a plugin. Also supports bare skill publishing and individual repos. Use when: (1) user says 'publish', 'share', or 'sync' a skill, (2) a skill needs to be made installable by others, (3) syncing skills/plugins to the monorepo, (4) creating a versioned monorepo release, (5) assembling a plugin from skills + commands, (6) user says 'publish plugin' or 'package plugin'.Other plugins' skills for the same job