plugin.json Schema Reference¶
Complete technical reference for the plugin.json configuration file used in Claude Code plugins.
Overview¶
The plugin.json file contains essential metadata and configuration for a Claude Code plugin. It is required for every plugin and must be located in the .claude-plugin/ directory.
Location¶
| Text Only | |
|---|---|
Required: Yes (every plugin must have this file)
Schema¶
Required Fields¶
| Field | Type | Description | Example |
|---|---|---|---|
name | string | Plugin identifier (lowercase, hyphen-separated) | "git-workflow" |
version | string | Semantic version number | "2.0.0" |
description | string | Brief plugin description | "Professional git workflow tools" |
author | object | Author information | See below |
Optional Fields¶
| Field | Type | Description | Example |
|---|---|---|---|
displayName | string | Human-readable plugin name | "Git Workflow" |
keywords | array | Search tags for discoverability | ["git", "workflow"] |
license | string | License identifier | "MIT" |
homepage | string | Plugin homepage URL | "https://example.com" |
repository | string | Source code repository URL | "https://github.com/..." |
Author Object¶
| JSON | |
|---|---|
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Author or organization name |
email | string | No | Contact email address |
url | string | No | Author website URL |
Complete Example¶
Validation Rules¶
Name Field¶
- Format: Lowercase letters, numbers, and hyphens only
- Pattern:
^[a-z0-9][a-z0-9-]*$ - Examples:
- ✅
git-workflow - ✅
code-quality - ✅
project-management - ❌
Git-Workflow(uppercase) - ❌
git_workflow(underscore) - ❌
-git-workflow(starts with hyphen)
- ✅
Version Field¶
- Format: Semantic versioning (MAJOR.MINOR.PATCH)
- Pattern:
^\d+\.\d+\.\d+$ - Examples:
- ✅
1.0.0 - ✅
2.1.3 - ❌
1.0(missing patch) - ❌
v2.0.0(prefix not allowed) - ❌
2.0.0-beta(pre-release not supported)
- ✅
Description Field¶
- Length: 10-200 characters recommended
- Content: Clear, concise explanation of plugin purpose
- Style: Sentence case, no period at end
Keywords Array¶
- Count: 3-10 keywords recommended
- Format: Lowercase, hyphen-separated
- Purpose: Improves plugin discoverability
- Examples:
["git", "workflow", "commits", "automation"]
Best Practices¶
Naming¶
✅ Do:
- Use descriptive, memorable names
- Follow kebab-case convention
- Keep names short (2-3 words max)
- Use common terminology
❌ Don't:
- Use generic names like
utilsortools - Include "plugin" in the name
- Use abbreviations unless widely known
- Mix naming conventions
Versioning¶
Follow Semantic Versioning:
- MAJOR (1.0.0 → 2.0.0): Breaking changes
- MINOR (1.0.0 → 1.1.0): New features (backward compatible)
- PATCH (1.0.0 → 1.0.1): Bug fixes (backward compatible)
Examples:
| Text Only | |
|---|---|
Description¶
✅ Good descriptions:
- "Professional git workflow with automated pre-commit checks"
- "Comprehensive project management with PRD generation and Linear integration"
- "Code quality tools with Python linting and expert agents"
❌ Poor descriptions:
- "Git stuff" (too vague)
- "This plugin helps you with git workflows and commits and PRs" (too long)
- "The best git plugin ever!" (marketing language)
Keywords¶
Choose keywords that users would search for:
Development: git, workflow, commits, pull-requests, automation Languages: python, java, javascript, typescript Tools: linting, formatting, testing, review Domains: education, project-management, productivity
Common Patterns¶
Minimal Plugin¶
| JSON | |
|---|---|
Full-Featured Plugin¶
Troubleshooting¶
Validation Errors¶
Error: "Invalid plugin name format"
Solution: Ensure name uses only lowercase letters, numbers, and hyphens
Error: "Invalid version format"
Solution: Use semantic versioning (MAJOR.MINOR.PATCH)
Error: "Missing required field: author"
Solution: Add author object with at least a name
Related Resources¶
- marketplace.json - Marketplace catalog schema
- Command Format - Command definition format
- Agent Format - Agent definition format
- Plugin Development - Complete development guide