/skill-generator:skill-generatorfrom skill-generator
Generate new agent skills from scratch and update, refactor, or improve existing skills the user points to. Covers interviewing the user, drafting SKILL.md with bundled scripts/references/assets, auditing an existing skill against best practices, applying targeted edits, running test prompts with and without the skill, grading results, and tuning the description so the skill triggers reliably. Use this whenever the user wants to create, write, scaffold, generate, update, edit, fix, improve, refactor, extend, merge, split, review, or benchmark a skill or SKILL.md, wants to turn a workflow or conversation into a reusable skill, or says a skill is not triggering or not behaving as expected, even if they do not say the word "generator".
Ships in skill-generator. 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.
Generate new skills and update existing ones, then prove they work.
A skill is a folder with a SKILL.md (YAML frontmatter + Markdown instructions) and optional bundled files. It follows the open Agent Skills format, so it should work in any agent harness that reads .agents/skills/, .claude/skills/, .devin/skills/, .windsurf/skills/, and similar. Write skills that are portable by default; only use harness-specific features when the user asks for them.
Figure out which situation you are in before doing anything else:
| Situation | Mode |
|---|---|
| "Make me a skill for X", "turn this into a skill" | Create |
| User gives a path, name, or pasted SKILL.md of an existing skill | Update |
| "Why isn't my skill triggering?", "make it trigger better" | Update → Description tuning |
| "Is v2 actually better than v1?" | Update → Evaluate (with blind comparison) |
If unclear, ask one short question. Then jump in at the right stage — a user who already has a draft does not need the interview again.
Both modes share the same loop:
scripts/quick_validate.py)Stay flexible. If the user says "skip the tests, just write it", do that. Add these steps to your todo list if you have one, so none get lost.
Users range from senior engineers to people opening a terminal for the first time. Read context cues. "Evaluation" and "benchmark" are usually fine; explain "assertion", "frontmatter", or "JSON" in a few words unless the user clearly knows them.
If the current conversation already contains the workflow (the user says "turn this into a skill"), mine it first: tools used, step order, corrections the user made, input/output formats. Then confirm gaps with the user.
Get answers to:
Ask about edge cases, example inputs, and success criteria. Use available docs, MCP servers, or web search to research the domain so you arrive with context instead of making the user explain everything. Don't write test prompts until this is settled.
pdf-form-filler, release-notes).~/.agents/skills/<name>/<repo>/.agents/skills/<name>/Check that the name doesn't collide with an existing skill in the target location.
Read references/skill-format.md for the full frontmatter and structure reference. The essentials:
Frontmatter
name (required)description (required) — the single most important line. It is the only thing the agent sees when deciding whether to load the skill. Put what it does AND when to use it here, not in the body. Agents tend to under-trigger skills, so make it a little pushy: list the concrete situations, synonyms, and file types, and say "even if the user doesn't explicitly ask for X". Max 1024 chars, no angle brackets.license, compatibility (environment requirements), metadata (version, author), allowed-tools.Body — what the agent should do once the skill is loaded:
Bundled resources
skill-name/
├── SKILL.md required
├── scripts/ deterministic or repetitive work, run rather than read
├── references/ docs loaded only when needed
└── assets/ templates, icons, fonts used in output
Progressive disclosure. The description is always in context; the body loads on trigger; bundled files load on demand. So keep SKILL.md under ~500 lines. If it grows, split detail into references/ with clear "read X when Y" pointers. Give reference files over ~300 lines a table of contents. When a skill covers several variants (AWS/GCP/Azure, Java/Python), put each in its own reference file so only the relevant one is read.
Writing style. Explain why instead of shouting MUST/NEVER. Today's models have good judgment; a reason generalizes to cases you didn't foresee, a bare rule doesn't. All-caps rules are a yellow flag — reserve them for true safety boundaries. Keep instructions general rather than overfit to one example. Write a draft, then reread it with fresh eyes as if you were the agent receiving it cold.
Lack of surprise. A skill's behavior must match what its description says. Don't create skills containing malware, credential harvesting, data exfiltration, or hidden side effects. Skills that send messages, write to external systems, or delete things should ask for explicit confirmation first.
python3 <this-skill-dir>/scripts/quick_validate.py <path-to-new-skill>
Fix errors; consider warnings. Then go to Testing, or straight to Description tuning if the user skipped tests.
The user provides an existing skill (path, name, or pasted content). Your job is to improve it without breaking what already works.
~/.agents/skills/, ./.agents/skills/, ~/.claude/skills/, ./.devin/skills/, ~/.config/devin/skills/, ~/.codeium/*/skills/, and plugin folders). If several match, ask which one.SKILL.md and every bundled file it references. Note which referenced files are missing and which files exist but are never referenced.secrets/, .env, *.key, *.pem, *token*, *webhook*). Note that they exist and how the skill uses them, but don't read their values.Copy the original so you can diff, roll back, and benchmark against it. Leave credential files out: a snapshot is a second copy of anything inside the skill, and secrets shouldn't spread to temp or shared folders.
mkdir -p <workspace>
rsync -a --exclude 'secrets/' --exclude '.env*' --exclude '*.key' --exclude '*.pem' \
<skill-path>/ <workspace>/skill-snapshot/
Use the same exclusions when diffing later (step 6) so the left-out files don't show up as changes. Never edit in place without a snapshot.
Where <workspace> goes: <skill-name>-workspace/ somewhere the agent harness does not scan for skills, e.g. ${TMPDIR:-/tmp}/skill-generator-workspaces/<skill-name>-workspace/ or a scratch folder in the user's project. Don't put it inside ~/.agents/skills/, .claude/skills/, .devin/skills/ or similar. The snapshot contains a SKILL.md with the same name, so a harness may load it as a duplicate skill, and the workspace clutters the user's skill list. Tell the user where it is.
Common requests:
If the user only says "improve it", run the audit below and present the findings as a short prioritized list before editing, so they can pick.
Check the skill against references/skill-format.md and this list:
SKILL.md? If credentials live inside the skill folder (e.g. secrets/), does the skill say they must never be copied, shared, or committed, and is there an environment-variable alternative?name and folder name unless the user asks to rename. Renaming breaks anything that invokes the skill by name.metadata.version if present.python3 <this-skill-dir>/scripts/quick_validate.py <skill-path>
diff -ru --exclude secrets --exclude '.env*' --exclude '*.key' --exclude '*.pem' \
<workspace>/skill-snapshot <skill-path>
Summarize what changed and why. For non-trivial changes, offer to run the Testing loop with the snapshot as the baseline.
This section is one continuous sequence; try not to stop partway.
Write 2–3 realistic prompts — what a real user would actually type, with file paths, names, casual phrasing, and a bit of backstory. Share them: "Here are a few test cases I'd like to try — do these look right, or want to add any?"
Save to evals/evals.json inside the skill folder (schema in references/schemas.md). Leave assertions empty for now.
Same workspace as the snapshot, outside any folder the harness scans for skills (see Update mode, step 2). In Create mode, also keep the draft outside skill folders until it's final, so the baseline run can't pick it up.
<skill-name>-workspace/
├── skill-snapshot/ (update mode only)
└── iteration-1/
└── <descriptive-eval-name>/
├── eval_metadata.json
├── with_skill/outputs/
└── baseline/outputs/
Create directories as you go, not upfront. Use descriptive eval names, not eval-0.
For each test prompt run two executions:
<skill-path>/SKILL.md<workspace>/skill-snapshot/SKILL.md)If your harness supports subagents, spawn all runs at once in parallel so they finish together; give each one full context, because subagents can't see your conversation. If it doesn't, do the runs yourself one at a time — less rigorous, since you know the skill, but still a useful check; skip the baseline in that case.
Check permissions before spawning. In many harnesses, background or non-interactive subagents can't ask the user for approval, so any tool that needs it gets silently denied. Usually that means shell commands and file writes. A skill whose core steps run commands then gets tested without its core steps, and both configurations fall back to the same improvised workarounds. The results look plausible but measure nothing. So, before launching:
After the first run finishes, check its transcript for denied tools before waiting for the rest. If its core steps were blocked, stop, tell the user, and fix the setup, rather than grading runs that couldn't do the task.
Prompt template for an executor:
Execute this task as a user would expect.
- Skill: <path to SKILL.md, or "none — do not load any skill named <skill-name>">
- Task: <eval prompt>
- Input files: <paths or "none">
- Save all deliverables to: <run-dir>/outputs/
- Also write <run-dir>/outputs/transcript.md: the steps you took, tools/commands used, errors hit, and your final answer.
- If anything was ambiguous or you used a workaround, note it in <run-dir>/outputs/user_notes.md.
- Do not perform irreversible actions or contact external systems; simulate them and record what you would have done.
Caution for the baseline: if the draft skill is already installed in a folder the harness scans, the baseline agent may load it anyway. Explicitly tell it not to, or keep the draft outside skill folders until it's final.
If the harness reports tokens or duration when a run finishes, save them immediately to <run-dir>/timing.json — that data is often not recoverable later.
Use the waiting time to write objectively verifiable assertions with descriptive names for each eval, then explain them to the user. Good assertions are discriminating: they pass when the skill truly succeeds and fail when it doesn't (check content, not just that a file exists). Don't force assertions onto subjective qualities — leave those to human review. Write them into eval_metadata.json and evals/evals.json.
agents/grader.md (spawn a grader subagent or do it inline). Save grading.json next to outputs/. Where an assertion can be checked by a script, write and run one instead of eyeballing.iteration-N/benchmark.md: a table per eval with pass rate for with_skill vs baseline, plus time/tokens if captured, and the overall delta. Format in references/schemas.md.agents/analyzer.md: assertions that pass in both configs (not discriminating), always fail (broken), high variance (flaky), time/token cost.benchmark.md saying what was blocked and which assertions it affects. Tell the user before presenting the numbers, so a harness failure isn't mistaken for a skill failure or success.Get results in front of the user before you revise anything. For each eval show the prompt, the with_skill output (inline, or the file path for binaries like .docx/.xlsx), the baseline output for contrast, and the grades. Then the benchmark table. Ask for feedback per eval; empty feedback means it looked fine. Save their feedback to iteration-N/feedback.md.
This is the heart of the loop.
scripts/ and tell the skill to use it.Draft the revision, reread it fresh, then improve it again.
iteration-<N+1>/, including baselines (create mode: still no-skill; update mode: snapshot or previous iteration — your call)Stop when the user is happy, feedback is empty, or you're no longer making meaningful progress.
When the user wants rigor ("is the new version really better?"), give both outputs to an independent agent labeled A/B without saying which is which — follow agents/comparator.md. Then unblind and explain why the winner won with agents/analyzer.md. Requires subagents; skip otherwise.
The description decides whether the skill ever gets used. Offer this after creating or substantially updating a skill, or whenever the user reports triggering problems.
The agent sees each skill's name + description in a list and decides whether to load one. Agents generally only consult skills for tasks they can't trivially do themselves — "read this file" won't trigger anything regardless of the description. So trigger tests must be substantive, multi-step requests.
Write ~20 queries, saved as evals/trigger_evals.json (schema in references/schemas.md):
Make them realistic: file paths, company names, column names, typos, lowercase, backstory, varied length.
Bad: "Format this data". Good: "ok so my boss sent me 'Q4 sales final FINAL v2.xlsx' (in downloads) and wants a profit margin % column, revenue is col C and costs col D i think".
Show the set to the user and let them edit it before running. Bad evals produce bad descriptions.
Run each query against a fresh agent that sees the candidate description among the real list of other installed skills (names + descriptions), and record whether it chooses this skill. Options, best first:
Run each query ~3 times if feasible; triggering is noisy. Hold out ~40% of queries as a test set and don't look at them while revising, to avoid overfitting.
Look at misses on the training split: false negatives usually mean missing trigger contexts or synonyms; false positives usually mean the description is too broad or overlaps a sibling. Rewrite, re-measure on both splits, up to ~5 rounds. Pick the version with the best held-out score.
Update the frontmatter, show the user before/after and the scores, and re-run quick_validate.py.
scripts/quick_validate.py one last time.<skill-name>-workspace/ — ask the user; don't silently delete it.cd <parent-dir> && zip -r <skill-name>.zip <skill-name> -x '*-workspace/*' '*/secrets/*' '*.env*' '*.key' '*.pem'. Then list the zip contents (unzip -l) to confirm nothing sensitive went in.references/skill-format.md — frontmatter fields, structure, portability notes, description patterns. Read when writing or auditing a skill.references/schemas.md — evals.json, eval_metadata.json, grading.json, benchmark.md, trigger_evals.json. Read before writing any of those files.agents/grader.md — how to grade assertions against outputs.agents/comparator.md — blind A/B comparison.agents/analyzer.md — why one version won, and benchmark pattern analysis.scripts/quick_validate.py — structural validation of a skill folder.The core loop one more time: understand → draft/edit → validate → test with and without → review with the user → improve → repeat → tune the description.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub evrentan/skill-generator --plugin skill-generator