What are Plugins?
Plugins are the fundamental packaging unit in Trail of Bits Skills. A plugin is a directory containing one or more of the following components:- Skills - Knowledge and guidance that Claude can invoke
- Commands - Slash commands that trigger specific workflows
- Agents - Autonomous agents that handle complex multi-step tasks
- Hooks - Event listeners that intercept and modify tool execution
Plugins can contain any combination of these components. A plugin might have only skills, only commands, or a mix of all four.
Plugin Structure
Plugin Metadata
Every plugin must include aplugin.json file in the .claude-plugin/ directory:
.claude-plugin/plugin.json
Required Fields
Plugin name in kebab-case. Must be unique across the repository.
Semantic version (e.g., “0.1.0”). Increment when making substantive changes - clients only update when version numbers increase.
Brief description of what the plugin provides.
Author information with
name and optional url fields.Plugin Examples by Complexity
Basic Plugin
ask-questions-if-underspecified - Minimal frontmatter, simple guidance Structure:- Single skill with straightforward workflow
- No scripts or complex dependencies
- Clear when-to-use guidance
Intermediate Plugin
constant-time-analysis - Python package, references/, language-specific docs Structure:- Skill with multiple reference files
- Python scripts with PEP 723 inline metadata
- Slash command integration
- Language-specific guidance files
Advanced Plugin
culture-index - Scripts, workflows/, templates/, PDF extraction, multiple entry points Structure:- Complex skill with 10+ reference files
- Multiple workflow files for different use cases
- Python package with dependencies
- Template files for report generation
- Advanced PDF extraction scripts
Naming Conventions
Use kebab-case
Use kebab-case
Always use kebab-case for plugin and component names:
- ✅
constant-time-analysis - ❌
constantTimeAnalysis - ❌
constant_time_analysis
Prefer gerund form
Prefer gerund form
Use verbs ending in -ing to describe actions:
- ✅
analyzing-contracts - ✅
processing-pdfs - ❌
contract-analyzer - ❌
pdf-processor
Avoid vague names
Avoid vague names
Be specific about what the plugin does:
- ❌
helper - ❌
utils - ❌
tools - ❌
misc
Avoid reserved words
Avoid reserved words
Don’t use brand names or reserved keywords:
- ❌
anthropic - ❌
claude
Path Handling
Correct:- Use forward slashes (
/) even on Windows - Use
{baseDir}for all paths to plugin resources {baseDir}resolves to the plugin root directory at runtime
Development Workflow
Add components
Create one or more component directories:
skills/for knowledge and guidancecommands/for slash commandsagents/for autonomous agentshooks/for event interception
Publishing and Distribution
Plugins in the Trail of Bits Skills repository are registered in the root.claude-plugin/marketplace.json:
Version numbers must match between the plugin’s
plugin.json and the root marketplace.json. Clients only download updates when version numbers increase.Best Practices
Modular Design
Keep plugins focused on a single domain or task. Split large functionality across multiple plugins.
Progressive Disclosure
Start with essential guidance in SKILL.md, link to detailed references for advanced users.
Clear Documentation
Include README.md with examples, use cases, and setup instructions.
Version Control
Increment versions for substantive changes. Document breaking changes clearly.
Next Steps
Skills
Learn how to create knowledge and guidance for Claude
Commands
Create slash commands that trigger workflows
Agents
Build autonomous agents for complex tasks
Quick Start
Build your first plugin in 5 minutes