Skip to content

smarks26/claude-plugin-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Claude Code Plugin Template

Create and distribute Claude Code plugins for your team or community. This GitHub template provides everything you need to build a plugin — from scaffolding and validation to CI/CD automation.

GitHub stars GitHub forks License: MIT

Why Use This Template?

  • Skip the boilerplate — Pre-configured marketplace structure and plugin manifests.
  • Full plugin development toolkit — Commands for scaffolding plugins, adding components (commands, skills, agents, hooks), and validating before release
  • Best practices built-in — Comprehensive documentation, examples, and guided workflows

What's Included

Component Description
Plugin Development Toolkit plugin-dev plugin with a core SKILL.md (1,619 words), 3 example structures (minimal, standard, advanced), and 2 reference docs
Example Plugin example-plugin plugin demonstrating proper structure and best practices
Documentation Complete guides for plugins, hooks, settings, commands, skills, and sub-agents

Quick Start

1. Create Your Marketplace

Click "Use this template" on GitHub, then clone your new repository:

git clone [https://github.com/your-org/your-marketplace-name.git](https://github.com/your-org/your-marketplace-name.git)
cd your-marketplace-name

2. Customize the Marketplace

Update .claude-plugin/marketplace.json with your organization details:

{
  "name": "my-team-marketplace",
  "owner": {
    "name": "Your Organization",
    "email": "[email protected]"
  },
  "metadata": {
    "description": "A curated collection of Claude Code plugins for our team",
    "version": "1.0.0"
  },
  "plugins": []
}

3. Install the Plugin Development Toolkit

# Start Claude Code
claude

# Add your local marketplace
/plugin marketplace add .

# Install the development toolkit
/plugin install plugin-development@my-team-marketplace

4. Create Your First Plugin

  1. Plan your plugin structure:
  • Ask: "What's the best directory structure for a plugin with commands and MCP integration?"
  • The plugin-structure skill will guide you
  1. Add MCP integration (if needed):
  • Ask: "How do I add an MCP server for database access?"
  • The mcp-integration skill provides examples and patterns
  1. Implement hooks (if needed):
  • Ask: "Create a PreToolUse hook that validates file writes"
  • The hook-development skill gives working examples and utilities

Development Workflow

The plugin-development toolkit supports your entire plugin development lifecycle:

┌─────────────────────┐
│  Design Structure   │ ──> plugin-structure skill
│  (manifest, layout) │
└──────────┬──────────┘
           │
┌──────────▼──────────┐
│    Add Components   │ ──> All skills provide guidance
│ (commands, agents,  │
│    skills, hooks)   │
└──────────┬──────────┘
           │
┌──────────▼──────────┐
│ Integrate Services  │ ──> mcp-integration skill
│    (MCP servers)    │
└──────────┬──────────┘
           │
┌──────────▼──────────┐
│   Add Automation    │ ──> hook-development skill
│ (hooks, validation) │     + utility scripts
└──────────┬──────────┘
           │
┌──────────▼──────────┐
│   Test & Validate   │ ──> hook-development utilities:
│                     │     - validate-hook-schema.sh
└─────────────────────┘     - test-hook.sh
                            - hook-linter.sh

Documentation Standards

All skills follow consistent standards:

  • Third-person descriptions ("This skill should be used when...")
  • Strong trigger phrases for reliable loading
  • Imperative/infinitive form throughout
  • Based on official Claude Code documentation
  • Security-first approach with best practices

Use Cases

Building a Database Plugin

1. "What's the structure for a plugin with MCP integration?"
   → plugin-structure skill provides layout

2. "How do I configure an stdio MCP server for PostgreSQL?"
   → mcp-integration skill shows configuration

3. "Add a Stop hook to ensure connections close properly"
   → hook-development skill provides pattern

Creating a Validation Plugin

1. "Create hooks that validate all file writes for security"
   → hook-development skill with examples

2. "Test my hooks before deploying"
   → Use validate-hook-schema.sh and test-hook.sh

3. "Organize my hooks and configuration files"
   → plugin-structure skill shows best practices

Integrating External Services

1. "Add Asana MCP server with OAuth"
   → mcp-integration skill covers SSE servers

2. "Use Asana tools in my commands"
   → mcp-integration tool-usage reference

3. "Structure my plugin with commands and MCP"
   → plugin-structure skill provides patterns

Best Practices

✅ Security First

  • Input validation in hooks
  • HTTPS/WSS for MCP servers
  • Environment variables for credentials
  • Principle of least privilege

✅ Portability

  • Use ${CLAUDE_PLUGIN_ROOT} everywhere
  • Relative paths only
  • Environment variable substitution

✅ Testing

  • Validate configurations before deployment
  • Test hooks with sample inputs
  • Use debug mode (claude --debug)

✅ Documentation

  • Clear README files
  • Documented environment variables
  • Usage examples

Official Claude Code Documentation

Acknowledgments

Built for Claude Code by Anthropic.

License

MIT License — see LICENSE for details.

Resources

About

Build and distribute custom Claude Code plugins.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages