claude-code/examples/skill-template/SKILL.md
Example Claude Code skill template for creating new skills
npx skillsauth add siddarthvader/agentic-stuff example-skillInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This is a template for creating new Claude Code skills that work with AI coding assistants.
Skills should be organized as:
.claude/skills/
└── skill-name/
└── SKILL.md
Each skill should include YAML frontmatter:
---
name: skill-name
description: Brief description of when to use this skill
---
Fields:
name - Skill identifier (defaults to folder name if not provided)description - When to trigger this skill (shown to AI)Focus on concrete patterns, not generic advice:
// GOOD - Specific pattern
function handleApiError(error: ApiError): Result<void, string> {
return { ok: false, error: error.message };
}
// BAD - Generic advice
// "Always handle errors properly"
Include clear triggers in the description:
description: Use when user says "write tests", "add tests", "create test"
Show what NOT to do alongside correct patterns:
// BAD - loses reactivity
let { theme } = editor;
// GOOD - keeps reactivity
let { theme } = $derived(editor);
Use headers that AI can easily parse:
## Core Concepts - Main principles## Patterns - Common code patterns## Anti-Patterns - What to avoid## Examples - Concrete use cases## Quick Reference - Cheat sheet formatsvelte-runes - Svelte 5 reactivity patternsreact-hooks - React hook patternsvue-composition - Vue 3 composition APIangular-signals - Angular signals patternstesting - Testing strategies and patternse2e-testing - End-to-end testing approachesunit-testing - Unit test patternsmocking-patterns - Mock strategiestypescript-patterns - TypeScript best practicespython-patterns - Python idiomsrust-patterns - Rust ownership patternsgo-patterns - Go concurrency patternsapi-design - REST/GraphQL designdatabase-patterns - Schema and query designstate-management - Global state patternserror-handling - Error boundaries and recoverygit-workflow - Branching strategiesdocker-patterns - Containerization practicesci-cd-patterns - Pipeline best practicesdeployment-strategies - Release patternsWhen AI assistants load this skill:
Here's a minimal working example:
---
name: error-handling
description: Use when handling errors, exceptions, or failure cases
---
# Error Handling Patterns
## Core Principle
Always use Result types, never throw exceptions in business logic.
## Pattern: Result Type
\`\`\`typescript
type Result<T, E = string> =
| { ok: true; data: T }
| { ok: false; error: E };
function processUser(id: string): Result<User> {
const user = findUser(id);
if (!user) {
return { ok: false, error: "User not found" };
}
return { ok: true, data: user };
}
\`\`\`
## Usage Pattern
\`\`\`typescript
const result = processUser("123");
if (result.ok) {
console.log(result.data.name);
} else {
console.error(result.error);
}
\`\`\`
## Anti-Pattern
\`\`\`typescript
// DON'T throw in business logic
function processUser(id: string): User {
const user = findUser(id);
if (!user) {
throw new Error("User not found"); // BAD
}
return user;
}
\`\`\`
## Quick Reference
- Use Result<T, E> for operations that can fail
- Return errors as data, don't throw
- Handle Results with if (result.ok) pattern
- Keep error messages user-friendly
This skill would trigger when AI encounters error handling scenarios and guide it to use Result types consistently.
Begin with one specific pattern you use repeatedly.
Explain WHY the pattern is better, not just HOW to use it.
Pull actual code from your projects (anonymized).
Use the skill with Claude Code or pi to verify it works as expected.
Refine based on how well the AI applies the patterns.
Skills work best when shared across team projects for consistency.
development
Example Claude Code skill template for creating new skills
development
Use when working with TypeScript, type definitions, or type errors
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.