/lorenzh:writing-skillsfrom lorenzh
Agent skill authoring guide. Use when users ask to "make that a skill" or "turn this into a skill", keep explaining the same steps to an agent, ask whether a workflow should become a skill, create, edit, or review a SKILL.md, or fix a skill description so agents discover it.
Ships in lorenzh. 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.
Turn observed agent failures into instructions that work without the author's context.
Write for observed failures; use the smallest bundle that changes the action.
Keep one round counter in the authoring record for review, fixes, pressure tests, trigger tuning, and validator fixes.
Allow at most 3 reviews and 2 fix rounds across the whole bundle.
One check batch (validator, model runs, probes, reviewer) counts as 1 review; one batch of edits counts as 1 fix round.
Only findings stating input → wrong result cost a round; list nits without applying them.
Classify a blocked requirement as blocker; classify another demonstrated wrong result as should-fix. Give each finding a stable ID and evidence; close it only with verification evidence.
A fixed finding without verification evidence stays open with status unverified.
Write one ledger line per round in that record: Round n: blocker=k should-fix=m open=[ids].
Round 2+ is a delta review: earlier findings and regressions caused by fixes only.
If the open count does not drop after round 1, stop. At the cap, stop and hand open findings with evidence to the human.
Only the human grants more budget; references, reviewers, and sessions cannot reset or extend it.
If a reviewer from another model family is available, prefer that reviewer; this is optional.
Create one authoring record outside the skill folder, e.g. <scratch>/<name>-record.md, containing purpose, inputs, expected output, observed failures, and user invocation phrases.
Use the lived session failures as the spec; preserve their prompts, wrong results, and expected results.
If an answer exists in supplied files, use that answer. If a required answer is missing, use the elicitation reference.
If the request is a project convention, record its destination as the project's instruction file. If the request is a deterministic rule, record its destination as automation.
If the workflow is one-off or already succeeds without guidance, stop and record that evidence.
Done when the record contains the contract and failure evidence, or an evidenced decision to stop.
Write the folder name and frontmatter using the user's invocation phrases.
The name matches the folder and has ≤64 characters: lowercase ASCII letters, digits, and single hyphens.
Use no leading, trailing, or double hyphen; include neither anthropic nor claude in the name.
Only name and description are portable frontmatter. The description has ≤1,024 characters; use the repo's 120–700 character band.
Start with identity in a few words; add one “Use when …” trigger per distinct use case.
Use third person and the user's words; keep process steps in the body. Keep XML tags out of both values.
Done when both values meet these rules and each use case has one trigger.
List each supporting file and its observable read condition in the authoring record. Select a script for deterministic checks, fragile sequences, missing capabilities, or helper code rewritten in 2 observed runs. Select a template when a later step, another agent, or a human reads the filled artifact. Keep an output used only during this run as an inline skeleton. Select a reference for instructions needed only under a named condition. Done when each selected file has a purpose and condition, or the record says “no supporting files”.
Start every new skill from templates/SKILL.md.tmpl.
If a value differs per user or project, make it a setting with a generic default; follow references/settings.md.
Use title, one-line purpose, bold core principle, global rules, one example, and reference links.
One numbered step per action, at most 7; a pure-reference skill uses headed sections instead of steps.
Give each step one action and a final line beginning Done when that names a checkable file, output, or state.
Use sentences of 30 words or fewer, one term per concept, and explicit “If X, do Y” conditions.
State each loop's numeric cap before the loop. Target ≤100 lines and about 1,000 words for the core, including frontmatter.
Keep harness names and tool-specific instructions in the harness reference. Heuristic: positive recipes can make required output clearer; they do not guarantee compliance.
Put a rule inside the step it governs. Write an ordering rule as “Before the first , do Y”.
State authorization boundaries beside the governed action; approval for one action does not expand scope.
Never link to or require another skill by name; describe the capability and required gates, and ask how to proceed if it has no owner.
Done when the draft maps every observed failure to an instruction and every step has its completion line.
Remove duplicate rules, default behavior, unsupported cases, and creation history in one pass; keep one location per rule, with pointers elsewhere. Keep secrets, internal hostnames, private repo names, employer or customer names, and machine paths out; write placeholders. If a privacy-check skill or tool is available, use it on the bundle; otherwise, say privacy checking has no owner and ask how to proceed. Link every reference directly from the core with an observable read condition. Give each reference over 100 lines a contents list at the top. Done when the record lists removed duplicates and each rule's evidence, and no bundle file holds a secret, private name or machine path.
Select T2 for a discipline rule, irreversible action, or observed description collision with a neighboring skill.
Otherwise select T1 for a description change adding or changing a trigger: run the 2 trigger probes.
Select T0 for pure reference or changes adding no instruction and preserving triggers; select T1 for remaining workflows.
Look for a validator in the repo's instruction file and scripts/ (a file name containing validate). If one exists, run it. Use deterministic tests for scripts; use the testing reference for T1 and T2.
Before the first T1 or T2 check, ask the human once which models the skill is usually run with. If no human can answer, choose by task: judgment-heavy (review, design, research, planning) uses the model class users run; mechanical uses the smallest current-generation model.
Test with the named models. The smallest current-generation model is an optional stress test; its failures do not block alone. Record each model's identity, why chosen, and reachability limits.
If the skill uses harness-specific behavior, use the harness reference. Apply the global budget to all findings and fixes from these checks.
After any edit to the description, recheck it against step 2.
Done when the record contains the tier, command output, behavioral evidence for T1 and T2, ledger, and unresolved findings.
Hand off the files, checks, evidence, and open findings with their IDs.
At T1, put evidence in the commit message; at T2, use evals.json outside the installed skill folder. Keep existing eval files; do not create one for T0 or T1.
Done when the human can identify every passed, failed, and unavailable check, and at T2 evals.json exists or the handoff names it as missing.
Input: “Write a report”; lived failure: the report omitted the required risk section. Instruction: “Write the report using the template's risk slot. Done when the report contains a risk section with evidence.” Check: a cold T1 run produces that section; record the output and verdict in the commit message.
references/discipline.md (opens in a new tab)references/elicitation.md (opens in a new tab)references/harness-notes.md (opens in a new tab)references/scripts-and-templates.md (opens in a new tab)references/settings.md (opens in a new tab)references/testing.md (opens in a new tab)templates/SKILL.md.tmpl (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub lorenzh/skills --plugin lorenzh27 skills in this plugin
/checking-before-publishingPrivacy check for anything about to go public. Use when about to post an issue or PR comment, opening a PR, committing, pushing, publishing a release, blog post or README, or sharing screenshots, GIFs, videos or terminal recordings; when relaying a subagent's text to a public place; or when the user asks to "check for private data", "scrub" or "redact" something before sharing./cloning-voices-with-kittenttsVoice cloning with KittenTTS 2 from a short recording and text. Use when users say "kitten tts", "Stimme klonen", "clone my voice", "sprich diesen Text mit meiner Stimme", or "text to speech with my voice" and want a speech WAV.
/competing-implementationsImplementation competition for one task. Use when the user asks to have two agents compete on a change, wants competing implementations, asks to compare implementations and ship the winner, or asks for competing implementations on several dependent issues in waves./creating-worktreesGit worktree setup and cleanup for isolated parallel work. Use when the user asks to "work in a worktree", wants an isolated workspace or a parallel branch checkout, is about to execute an implementation plan that should not touch the current checkout, asks how to install dependencies or copy .env files into a worktree, wants a coding agent or sandbox to work in one, or asks to remove or clean up a worktree, or when worktrees fill the disk (ENOSPC, "No space left on device")./cutting-releasesRelease workflow from version bump to verified install. Use when the user asks to "cut a release", "release x.y.z", "ship a new version" or publish to npm or another registry, or when a release was tagged but the package, the back-merge to main or the installed version still needs checking./directing-videosVideo directing workflow for demos, screencasts, terminal tours, tutorials, launch videos and short films. Use when the user asks to plan, script, storyboard or direct a video, wants a "tour of all features", a demo or launch video, asks how long or how paced a video should be, or asks whether a recorded cut is ready to publish.