/plugin-authoring
The authoring procedures for this marketplace: how to create a skill, how to
create a plugin, what to update when either changes, and how to delete one
without leaving dangling metadata.
Promoted out of CLAUDE.md (issue #2140) because all four are procedures with
a clear trigger — they do not need to be resident when the user is debugging a
hook. CLAUDE.md keeps only the repo blurb, the rules index, and the gotchas.
Detailed patterns live in the rules this skill names; it is the sequence, not a
second copy of them.
Creating New Skills
See .claude/rules/skill-development.md for detailed patterns.
Note (Claude Code 2.1.157): plugins placed in .claude/skills are now auto-loaded without a marketplace entry — handy for local or quick one-off plugins. This repo's published plugins still use the full marketplace + release-please lifecycle described in Plugin Lifecycle below.
Quick Start
- Create skill directory:
mkdir -p <plugin>/skills/<skill-name>
- Create
skill.md with YAML frontmatter:---
name: <Skill Name>
description: <1-2 sentence description>
allowed-tools: Bash, Read, Grep, Glob, TodoWrite
created: YYYY-MM-DD
modified: YYYY-MM-DD
reviewed: YYYY-MM-DD
---
- Follow content structure: Core Expertise → Commands → Patterns → Quick Reference
- Include agentic optimizations table
- Update all metadata files (see Plugin Lifecycle section)
Skill Granularity Decision
| Choose... |
When... |
| Single skill |
Operations are related and share context |
| Multiple skills |
Distinct workflows, different user intents |
Example: bun-package-manager (deps) vs bun-development (run/test/build)
Creating User-Invocable Skills
Skills are invocable via /plugin:skill-name syntax. See .claude/rules/skill-naming.md for naming conventions.
- Create skill directory:
mkdir -p <plugin>/skills/<skill-name>
- Create
SKILL.md with YAML frontmatter:---
name: <skill-name>
description: What it does. Use when...
args: <arg-spec>
allowed-tools: Bash, Read
argument-hint: human hint
created: YYYY-MM-DD
modified: YYYY-MM-DD
reviewed: YYYY-MM-DD
---
- Include: Context → Execution → Post-actions
Plugin Lifecycle
Files to Update
When creating, modifying, or deleting a plugin, update these files:
| File |
Location |
Action |
plugin.json |
<plugin>/.claude-plugin/plugin.json |
Create/update plugin manifest |
README.md |
<plugin>/README.md |
Create/update plugin documentation |
marketplace.json |
.claude-plugin/marketplace.json |
Add/update/remove plugin entry |
release-please-config.json |
Root |
Add/remove plugin package config |
.release-please-manifest.json |
Root |
Add/remove plugin version entry |
PLUGIN-MAP.md |
docs/PLUGIN-MAP.md |
Add/remove plugin from navigation map |
settings.json |
.claude/settings.json |
Add/remove the plugin in enabledPlugins (<plugin>@laurigates-claude-plugins) — enforced by the Plugin: Enablement drift check |
Creating a New Plugin
Quick scaffold (Claude Code 2.1.157): claude plugin init <name> scaffolds a new plugin in .claude/skills (auto-loaded, no marketplace entry needed). Use it for local/quick plugins; for plugins published from this repo, follow the full marketplace + release-please steps below.
- Create plugin directory structure (see Project Structure in
CLAUDE.md)
- Create
.claude-plugin/plugin.json with required fields
- Create
README.md with plugin documentation
- Add entry to
.claude-plugin/marketplace.json (under the plugins array):{
"name": "new-plugin",
"source": "./new-plugin",
"description": "Plugin description",
"version": "1.0.0",
"keywords": ["keyword1", "keyword2"],
"category": "category-name"
}
Note: marketplace.json has structure { "name": "...", "plugins": [...] } — add to the plugins array.
- Add to
release-please-config.json:"new-plugin": {
"component": "new-plugin",
"release-type": "simple",
"extra-files": [
{"type": "json", "path": ".claude-plugin/plugin.json", "jsonpath": "$.version"}
],
"changelog-sections": [
{"type": "feat", "section": "Features"},
{"type": "fix", "section": "Bug Fixes"},
{"type": "perf", "section": "Performance"},
{"type": "refactor", "section": "Code Refactoring"},
{"type": "docs", "section": "Documentation"}
]
}
- Add to
.release-please-manifest.json:"new-plugin": "1.0.0"
- Enable it in
.claude/settings.json so the repo dogfoods it:"enabledPlugins": { "new-plugin@laurigates-claude-plugins": true }
The Plugin: Enablement drift check (scripts/check-enabled-plugins-drift.sh) fails CI if a marketplace plugin is left disabled.
Deleting a Plugin
- Remove plugin directory
- Remove entry from
.claude-plugin/marketplace.json
- Remove package from
release-please-config.json
- Remove version from
.release-please-manifest.json
- Remove the
<plugin>@laurigates-claude-plugins key from .claude/settings.json enabledPlugins
Development Workflow
- Research documentation - Use context7, web search
- Plan skill structure - Decide granularity, scope
- Write skills - Follow standard structure
- Update all metadata files - See Plugin Lifecycle section
- Commit early - Use conventional commit format (see
.claude/rules/conventional-commits.md)
- Test - Verify skills load and work
- Create PR - Use conventional commit format for title (drives automation)
Verify
After a plugin add or delete, the two guards that catch dangling metadata:
bash scripts/check-docs-index.sh
bash scripts/plugin-compliance-check.sh
check-docs-index.sh cross-checks the plugin set and per-plugin skill/agent
counts against disk across README.md, docs/PLUGIN-MAP.md, and the d2
diagram — use /docs-refresh to repair count drift it reports. It also gates
two name-level invariants at ERROR severity (--strict therefore fails CI):
the committed docs/diagrams/plugin-relationships.svg must render the same
per-plugin labels its .d2 source states (re-render with
d2 docs/diagrams/plugin-relationships.d2 docs/diagrams/plugin-relationships.svg
— never hand-edit the .svg), and every leading-cell /<ns>:<name> row in a
plugin README must resolve to a skill directory (#2453).
Related
.claude/rules/skill-development.md — skill creation patterns
.claude/rules/skill-naming.md — namespace conventions for user-invocable skills
.claude/rules/skill-quality.md — size limits, required sections, quality checklist
.claude/rules/plugin-structure.md — plugin.json schema and directory layout
.claude/rules/release-please.md — version management and changelog automation
.claude/rules/conventional-commits.md — the commit/PR-title format that drives release-please
.claude/rules/skill-consolidation.md — merging or deleting skills (distinct from the plugin-level checklist here)
/docs-refresh — repairs catalog count drift after a skill or plugin lands
1---
2name: plugin-authoring
3description: Add, modify, or delete a skill or plugin in this repo — frontmatter shape, the seven metadata files a plugin touches, and the create/delete checklists. Use when creating a new skill or plugin, removing one, or asking which files a plugin change must update.
4allowed-tools: Read, Edit, Write, Grep, Glob, Bash(mkdir *), Bash(jq *), Bash(git log *), Bash(bash scripts/check-docs-index.sh *), Bash(bash scripts/plugin-compliance-check.sh *), TodoWrite
5argument-hint: (no args)
6created: 2026-07-29
7modified: 2026-07-29
8reviewed: 2026-07-29
9---
10
11# /plugin-authoring
12
13The authoring procedures for this marketplace: how to create a skill, how to
14create a plugin, what to update when either changes, and how to delete one
15without leaving dangling metadata.
16
17Promoted out of `CLAUDE.md` (issue #2140) because all four are **procedures with
18a clear trigger** — they do not need to be resident when the user is debugging a
19hook. `CLAUDE.md` keeps only the repo blurb, the rules index, and the gotchas.
20
21Detailed patterns live in the rules this skill names; it is the sequence, not a
22second copy of them.
23
24## Creating New Skills
25
26See `.claude/rules/skill-development.md` for detailed patterns.
27
28> **Note (Claude Code 2.1.157):** plugins placed in `.claude/skills` are now auto-loaded without a marketplace entry — handy for local or quick one-off plugins. This repo's *published* plugins still use the full marketplace + release-please lifecycle described in Plugin Lifecycle below.
29
30### Quick Start
31
321. Create skill directory: `mkdir -p <plugin>/skills/<skill-name>`
332. Create `skill.md` with YAML frontmatter:
34 ```yaml
35 ---
36 name: <Skill Name>
37 description: <1-2 sentence description>
38 allowed-tools: Bash, Read, Grep, Glob, TodoWrite
39 created: YYYY-MM-DD
40 modified: YYYY-MM-DD
41 reviewed: YYYY-MM-DD
42 ---
43 ```
443. Follow content structure: Core Expertise → Commands → Patterns → Quick Reference
454. Include agentic optimizations table
465. Update all metadata files (see Plugin Lifecycle section)
47
48### Skill Granularity Decision
49
50| Choose... | When... |
51|-----------|---------|
52| Single skill | Operations are related and share context |
53| Multiple skills | Distinct workflows, different user intents |
54
55Example: `bun-package-manager` (deps) vs `bun-development` (run/test/build)
56
57## Creating User-Invocable Skills
58
59Skills are invocable via `/plugin:skill-name` syntax. See `.claude/rules/skill-naming.md` for naming conventions.
60
611. Create skill directory: `mkdir -p <plugin>/skills/<skill-name>`
622. Create `SKILL.md` with YAML frontmatter:
63 ```yaml
64 ---
65 name: <skill-name>
66 description: What it does. Use when...
67 args: <arg-spec>
68 allowed-tools: Bash, Read
69 argument-hint: human hint
70 created: YYYY-MM-DD
71 modified: YYYY-MM-DD
72 reviewed: YYYY-MM-DD
73 ---
74 ```
753. Include: Context → Execution → Post-actions
76
77## Plugin Lifecycle
78
79### Files to Update
80
81When creating, modifying, or deleting a plugin, update these files:
82
83| File | Location | Action |
84|------|----------|--------|
85| `plugin.json` | `<plugin>/.claude-plugin/plugin.json` | Create/update plugin manifest |
86| `README.md` | `<plugin>/README.md` | Create/update plugin documentation |
87| `marketplace.json` | `.claude-plugin/marketplace.json` | Add/update/remove plugin entry |
88| `release-please-config.json` | Root | Add/remove plugin package config |
89| `.release-please-manifest.json` | Root | Add/remove plugin version entry |
90| `PLUGIN-MAP.md` | `docs/PLUGIN-MAP.md` | Add/remove plugin from navigation map |
91| `settings.json` | `.claude/settings.json` | Add/remove the plugin in `enabledPlugins` (`<plugin>@laurigates-claude-plugins`) — enforced by the `Plugin: Enablement drift` check |
92
93### Creating a New Plugin
94
95> **Quick scaffold (Claude Code 2.1.157):** `claude plugin init <name>` scaffolds a new plugin in `.claude/skills` (auto-loaded, no marketplace entry needed). Use it for local/quick plugins; for plugins published from this repo, follow the full marketplace + release-please steps below.
96
971. Create plugin directory structure (see Project Structure in `CLAUDE.md`)
982. Create `.claude-plugin/plugin.json` with required fields
993. Create `README.md` with plugin documentation
1004. Add entry to `.claude-plugin/marketplace.json` (under the `plugins` array):
101 ```json
102 {
103 "name": "new-plugin",
104 "source": "./new-plugin",
105 "description": "Plugin description",
106 "version": "1.0.0",
107 "keywords": ["keyword1", "keyword2"],
108 "category": "category-name"
109 }
110 ```
111 Note: marketplace.json has structure `{ "name": "...", "plugins": [...] }` — add to the `plugins` array.
1125. Add to `release-please-config.json`:
113 ```json
114 "new-plugin": {
115 "component": "new-plugin",
116 "release-type": "simple",
117 "extra-files": [
118 {"type": "json", "path": ".claude-plugin/plugin.json", "jsonpath": "$.version"}
119 ],
120 "changelog-sections": [
121 {"type": "feat", "section": "Features"},
122 {"type": "fix", "section": "Bug Fixes"},
123 {"type": "perf", "section": "Performance"},
124 {"type": "refactor", "section": "Code Refactoring"},
125 {"type": "docs", "section": "Documentation"}
126 ]
127 }
128 ```
1296. Add to `.release-please-manifest.json`:
130 ```json
131 "new-plugin": "1.0.0"
132 ```
1337. Enable it in `.claude/settings.json` so the repo dogfoods it:
134 ```json
135 "enabledPlugins": { "new-plugin@laurigates-claude-plugins": true }
136 ```
137 The `Plugin: Enablement drift` check (`scripts/check-enabled-plugins-drift.sh`) fails CI if a marketplace plugin is left disabled.
138
139### Deleting a Plugin
140
1411. Remove plugin directory
1422. Remove entry from `.claude-plugin/marketplace.json`
1433. Remove package from `release-please-config.json`
1444. Remove version from `.release-please-manifest.json`
1455. Remove the `<plugin>@laurigates-claude-plugins` key from `.claude/settings.json` `enabledPlugins`
146
147## Development Workflow
148
1491. **Research documentation** - Use context7, web search
1502. **Plan skill structure** - Decide granularity, scope
1513. **Write skills** - Follow standard structure
1524. **Update all metadata files** - See Plugin Lifecycle section
1535. **Commit early** - Use conventional commit format (see `.claude/rules/conventional-commits.md`)
1546. **Test** - Verify skills load and work
1557. **Create PR** - Use conventional commit format for title (drives automation)
156
157## Verify
158
159After a plugin add or delete, the two guards that catch dangling metadata:
160
161```
162bash scripts/check-docs-index.sh
163bash scripts/plugin-compliance-check.sh
164```
165
166`check-docs-index.sh` cross-checks the plugin set and per-plugin skill/agent
167counts against disk across `README.md`, `docs/PLUGIN-MAP.md`, and the d2
168diagram — use `/docs-refresh` to repair count drift it reports. It also gates
169two name-level invariants at ERROR severity (`--strict` therefore fails CI):
170the **committed** `docs/diagrams/plugin-relationships.svg` must render the same
171per-plugin labels its `.d2` source states (re-render with
172`d2 docs/diagrams/plugin-relationships.d2 docs/diagrams/plugin-relationships.svg`
173— never hand-edit the `.svg`), and every leading-cell `/<ns>:<name>` row in a
174plugin README must resolve to a skill directory (#2453).
175
176## Related
177
178- `.claude/rules/skill-development.md` — skill creation patterns
179- `.claude/rules/skill-naming.md` — namespace conventions for user-invocable skills
180- `.claude/rules/skill-quality.md` — size limits, required sections, quality checklist
181- `.claude/rules/plugin-structure.md` — plugin.json schema and directory layout
182- `.claude/rules/release-please.md` — version management and changelog automation
183- `.claude/rules/conventional-commits.md` — the commit/PR-title format that drives release-please
184- `.claude/rules/skill-consolidation.md` — merging or deleting skills (distinct from the plugin-level checklist here)
185- `/docs-refresh` — repairs catalog count drift after a skill or plugin lands