Skip to main content

Overview

These are Trail of Bits house standards on top of Anthropic’s requirements. Following these practices ensures your skills are discoverable, maintainable, and effective.

Description Quality

Your skill competes with 100+ others. The description must trigger correctly.

Third-Person Voice

Claude reads descriptions to decide which skills to invoke. Third-person descriptions integrate better with this selection process.

Include Trigger Keywords

Why it matters: Specific triggers increase the chances Claude will invoke your skill at the right time.

Be Specific About Capabilities

Value-Add: Behavioral Guidance Over Reference Dumps

Skills should provide guidance Claude doesn’t already have, not duplicate reference material.

Teach How to Look Things Up

Don’t paste entire specs. Teach when and how to look things up.
Instead of:
Do this:

Explain WHY, Not Just WHAT

Include trade-offs, decision criteria, and judgment calls:

Document Anti-Patterns WITH Explanations

Say why something is wrong, not just that it’s wrong:

Scope Boundaries

Prescriptiveness should match task risk:

Strict for Fragile Tasks

Security audits, crypto implementations, and compliance checks need rigid step-by-step enforcement:

Flexible for Variable Tasks

Code exploration, documentation, and refactoring can offer options:

Required Sections

Every SKILL.md must include:

When to Use

Specific scenarios where this skill applies:

When NOT to Use

Scenarios where another approach is better:

Security Skills: Rationalizations to Reject

For audit/security skills, include common shortcuts to reject:

Content Organization

Progressive Disclosure Pattern

Start simple, then provide depth:

Keep SKILL.md Under 500 Lines

Split into supporting files when needed:

One Level Deep

SKILL.md can link to files, but those files shouldn’t chain to more files.
Good: SKILL.md → advanced.md (one level) Bad: SKILL.md → advanced.md → expert.md (chained)
Directory depth is fine (references/guides/topic.md). The restriction is on reference chains, not nested folders.

Hooks Best Practices

PreToolUse hooks run on every Bash command—performance is critical.

Prefer Shell + jq Over Python

Why: Interpreter startup (Python + tree-sitter) adds noticeable latency. Shell + jq is instant.

Fast-Fail Early

Exit immediately for non-matching commands:

Favor Regex Over AST Parsing

Accept rare false positives if performance gain is significant:
Trade-off: Regex might trigger on grep python.py but Claude can rephrase. The speed gain is worth it.

Anticipate False Positive Patterns

Don’t trigger on diagnostic commands:

Document Trade-offs in PRs

Explain deliberate design choices in PR descriptions:

Examples and Concreteness

Provide Concrete Input/Output

Show Decision Criteria

Help Claude make judgment calls:

Quality Checklist

Before submitting, verify: Description:
  • Third-person voice
  • Includes trigger keywords
  • Specific about capabilities
Content:
  • Explains WHY, not just WHAT
  • Includes trade-offs and decision criteria
  • Documents anti-patterns with explanations
  • Concrete examples with input/output
Structure:
  • “When to use” section present
  • “When NOT to use” section present
  • Security skills have “Rationalizations to reject”
  • SKILL.md under 500 lines
  • References are one level deep
Technical:
  • No hardcoded paths (use {baseDir})
  • Python scripts use PEP 723 metadata
  • Hooks are performance-optimized
  • All referenced files exist

Next Steps

Skill Authoring

Detailed skill authoring guide

Plugin Structure

Required directory structure

Examples

Real-world skill examples

Getting Started

Start contributing