Guide creating Claude Code skills with TDD and persuasion principles. Use for new skill development.
npx skills add https://github.com/athola/claude-night-market --skill skill-authoring
abstract:skills-eval)abstract:hook-authoring)abstract:subagent-testing)Writing effective Claude Code skills requires Test-Driven Development (TDD) and persuasion principles from compliance research. We treat skill writing as process documentation that needs empirical validation rather than just theoretical instruction. Skills are behavioral interventions designed to change model behavior in measurable ways.
By using TDD, we ensure skills address actual failure modes identified through testing. Optimized descriptions improve discovery, while a modular structure supports progressive disclosure to manage token usage. This framework also includes anti-rationalization patterns to prevent the assistant from bypassing requirements.
NO SKILL WITHOUT A FAILING TEST FIRST
Every skill must begin with documented evidence of Claude failing without it. This validates that you are solving a real problem. No implementation should proceed without a failing test, and no completion claim should be accepted without evidence. Detailed enforcement patterns for adversarial verification and coverage gates are available in imbue:proof-of-work.
We categorize skills into three types: Technique skills for specific methods, Pattern skills for recurring solutions, and Reference skills for quick lookups and checklists. This helps organize interventions into the most effective format for the task.
\\\`bash
python scripts/skill_analyzer.py
python scripts/token_estimator.py
\\\`
\\\`bash
python scripts/abstract_validator.py --check
\\\`
Verification: Run analysis and review token estimates before proceeding.
Skill descriptions must be optimized for semantic search and explicit triggering. Follow the formula [What it does] + [When to use it] + [Key triggers]. Use a third-person voice (e.g., "Guides...", "Provides...") and include specific, concrete use cases. Avoid marketing language or vague phrases like "helps with coding."
Skill description character budgets now scale with context window at 2% of available context. This means:
| Context Window | Description Budget |
|---------------|-------------------|
| 200K (Sonnet/Haiku) | ~4,000 characters |
| 1M (Opus 4.6 GA) | ~20,000 characters |
Previously constrained skills can use more descriptive text on larger windows. However, keep descriptions concise regardless: longer is not better. The scaling primarily prevents truncation for skills with legitimately complex trigger conditions, not as an invitation to add verbose content.
Plugin names are now automatically shown alongside skill descriptions in the /skills menu. Do not repeat the plugin name in skill descriptions: it is redundant and wastes character budget. Focus descriptions on what the skill does and when to use it.
Establish empirical evidence that an intervention is needed. Create at least three pressure scenarios that combine time pressure and ambiguity. Run these in a fresh instance without the skill active and document the exact failures, such as skipped error handling or missing validation.
Create the smallest intervention that addresses the documented failures. Write the SKILL.md with required frontmatter and content that directly counters the baseline failures. Include one example of correct behavior and verify that the same pressure scenarios now show measurable improvement.
Eliminate the ability for Claude to explain away requirements. Run pressure scenarios with the skill active to identify common rationalizations, such as claiming a task is "too simple" for the full process. Add explicit counters, such as exception tables and red flag lists, until rationalizations stop.
Skills must explicitly counter patterns where Claude attempts to bypass requirements. Common excuses include claiming a task is "too simple" or that a "spirit vs letter of the law" approach is sufficient. Skills should include red flag lists for self-checking, such as "Stop if you think: this is too simple for the full process." When exceptions are necessary, document them explicitly to prevent unauthorized shortcuts.
For detailed implementation guidance:
Core authoring cycle:
modules/tdd-methodology.md for RED-GREEN-REFACTOR cycle detailsmodules/persuasion-principles.md for compliance research and techniquesmodules/description-writing.md for discovery optimizationmodules/progressive-disclosure.md for file structure patternsmodules/anti-rationalization.md for bulletproofing techniquesmodules/graphviz-conventions.md for process diagram standardsWorking with concrete skills (load when implementing or debugging):
modules/examples.md for walk-throughs of well-authored skills in this repomodules/advanced-patterns.md for skill-to-skill coordination, conditional behavior, and scaling across activation contextsmodules/authentication.md for skills that invoke gh, glab, MCP servers, or other authenticated toolsmodules/error-handling.md for missing tools, timeouts, partial subagent results, and permission denialsmodules/troubleshooting.md for diagnosing skills that do not behave as the test corpus says they shouldValidation and deployment (load when shipping):
modules/validation.md for frontmatter parsing, reference resolution, and structural checks before mergemodules/testing-with-subagents.md for running the Iron Law test in a fresh subagent (and abstract:subagent-testing for the broader pressure-testing methodology)modules/deployment-checklist.md for final validation before promoting a skillBefore deploying, verify that the RED, GREEN, and REFACTOR phases are complete and documented. Frontmatter must be valid, descriptions optimized, and line counts kept under 500 lines. Ensure all module references are valid and at least one concrete example is included.
All markdown files must pass scribe validation. This includes a slop scan to ensure a score under 2.5 and doc verification to confirm all file paths and command examples work. Bullet-to-prose ratios must remain under 60% to maintain readability. Use Skill(scribe:slop-detector) and Agent(scribe:doc-verifier) for these checks.
Individual skills are created using skill-authoring, while modular-skills handles the architecture of larger structures. skills-eval provides ongoing quality assessment. Avoid the common pitfall of writing skills based on theoretical behavior; always use documented failures to guide development. Use progressive disclosure to prevent monolithic files and ensure that each intervention remains focused and token-efficient.
Skill(superpowers:writing-skills): the upstream superpowers take onauthoring Claude Code skills. Load it as a complementary reference for
skill structure and craft alongside this guide's TDD cycle.
Skills can reference their own directory using
${CLAUDE_SKILL_DIR} in SKILL.md content. This
variable resolves to the absolute path of the
directory containing the SKILL.md file. Use it for
referencing sibling files, data assets, or module
paths without hardcoding absolute paths:
See `${CLAUDE_SKILL_DIR}/modules/advanced-patterns.md`
for detailed patterns.
Run: `python3 ${CLAUDE_SKILL_DIR}/scripts/check.py`
This is especially useful for skills that ship
alongside scripts or data files and need portable
path references that work regardless of where the
plugin is installed.
Skill descriptions containing colons (e.g.,
description: "Triggers include: X, Y, Z") previously
failed to load from SKILL.md frontmatter. This is
fixed in 2.1.69. Skills without a description: field
also now appear in the available skills list (previously
they were silently excluded).
Skill not loading
Check YAML frontmatter syntax and required fields.
As of 2.1.69, skills without a description: field
still appear in the skills list, but descriptions
with colons must be quoted in YAML frontmatter.
Token limits exceeded
Use progressive disclosure - move details to modules
Modules not found
Verify module paths in SKILL.md are correct
without the skill, with exact failure descriptions recorded before implementation begins.
required name field) that loads without error in Claude Code.
explicit counter to the skill (exception table, red-flag list, or banned excuse list).
python scripts/abstract_validator.py --check exits 0 and SKILL.md is under 500 lines.Multi-agent autonomous startup system for Claude Code. Triggers on "Loki Mode". Orchestrates 100+ specialized agents across engineering, QA, DevOps, security, data/ML, business operations, marketing, HR, and customer success. Takes PRD to fully deployed, revenue-generating product with zero human intervention. Features Task tool for subagent dispatch, parallel code review with 3 specialized reviewers, severity-based issue triage, distributed task queue with dead letter handling, automatic deployment to cloud providers, A/B testing, customer feedback loops, incident response, circuit breakers, and self-healing. Handles rate limits via distributed state checkpoints and auto-resume with exponential backoff. Requires --dangerously-skip-permissions flag.
Use when working with error debugging multi agent review
Build evaluation frameworks for agent systems. Use when testing agent performance systematically, validating context engineering choices, or measuring improvements over time.
Diagnoses and debugs A2A agent communication issues including agent status, message routing, transport connectivity, and log analysis. Use when agents aren't responding, messages aren't being delivered, routing is incorrect, or when debugging orchestrator, coder-agent, tester-agent communication problems.
Use when working with error debugging multi agent review
Rapidly creates atomic, focused skills optimized with evidence-based prompting, specialist agents, and systematic testing. Each micro-skill does one thing exceptionally well using self-consistency, program-of-thought, and plan-and-solve patterns. Enhanced with agent-creator principles and functionality-audit validation. Perfect for building composable workflow components.
Ultimate multi-agent framework for Google Antigravity. Orchestrates specialized domain agents (PM, Frontend, Backend, Mobile, QA, Debug) via Serena Memory.
This skill should be used when the user asks to "evaluate agent performance", "build test framework", "measure agent quality", "create evaluation rubrics", or mentions LLM-as-judge, multi-dimensional evaluation, agent testing, or quality gates for agent pipelines.
Take athola/skill-authoring from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.