Commit 5621b95
authored
refactor(plugin-dev): make plugin self-contained and migrate commands to skills (#256)
* refactor(plugin-dev): make plugin self-contained and migrate commands to skills
Move the multi-format generator into plugin-dev so the plugin no longer
depends on repo-root scripts/, add $schema fields to the Claude and
generated Antigravity manifests, and consolidate the 5 slash commands
into 3 skills with a shared references/ folder.
- Move scripts/multi-format.ts and scripts/multi-format.test.ts into
plugins/plugin-dev/scripts/. Add scripts/run.ts as the CLI entry
point holding the generateMultiFormat() orchestration previously in
scripts/cli.ts, which now re-exports it so
`bun scripts/cli.ts multi-format` keeps working. Extend
vitest.config.ts to discover the relocated test file.
- Add "$schema" to plugin-dev's .claude-plugin/plugin.json (Claude
source) and to the generator's Antigravity output (root plugin.json),
with a new generator test covering the emitted schema URL.
- Fix a pre-existing bug: plugin-dev previously shipped only a
root-level plugin.json with no .claude-plugin/plugin.json, which
fails `claude plugin validate`. Migrate the manifest to
.claude-plugin/plugin.json as the Claude source of truth, with the
generator producing the root plugin.json as the Antigravity manifest
— matching the pattern already used by the bun plugin.
- Replace commands/{scaffold,multi-format,validate,best-practices,
migrate-gemini}.md with three skills modeled on the Codex
plugin-creator and Cursor create-plugin reference skills:
skills/plugin-authoring (scaffold + multi-format + best practices,
with references/{plugin-json-spec,multi-runtime-manifests,
best-practices}.md), skills/validating-plugins, and
skills/migrating-gemini-extensions. Update README.md's Commands
section to Skills and fix the stale claude-at-root comment in the
generator.
All 132 tests pass; `claude plugin validate plugins/plugin-dev` passes.
* chore(plugin-dev): apply AI code review suggestions
- declare skills path in manifest so Codex exposes them (Greptile P1)
- rename skill names to lowercase-hyphen matching directories (cubic P1)
- correct $schema and Codex-marketplace-scope wording in reference (cubic P3)
- extract helpers so generateMultiFormat stays under the function-length guideline (Gemini)1 parent 289183b commit 5621b95
20 files changed
Lines changed: 731 additions & 1039 deletions
File tree
- plugins/plugin-dev
- .claude-plugin
- .codex-plugin
- commands
- scripts
- skills
- migrating-gemini-extensions
- plugin-authoring
- references
- validating-plugins
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | | - | |
| 36 | + | |
36 | 37 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
65 | 46 | | |
66 | | - | |
67 | | - | |
| 47 | + | |
68 | 48 | | |
69 | | - | |
| 49 | + | |
70 | 50 | | |
71 | | - | |
| 51 | + | |
| 52 | + | |
72 | 53 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 54 | + | |
80 | 55 | | |
81 | | - | |
82 | | - | |
83 | | - | |
| 56 | + | |
84 | 57 | | |
85 | | - | |
86 | | - | |
| 58 | + | |
| 59 | + | |
87 | 60 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 61 | + | |
126 | 62 | | |
127 | 63 | | |
128 | 64 | | |
| |||
194 | 130 | | |
195 | 131 | | |
196 | 132 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 133 | + | |
201 | 134 | | |
202 | 135 | | |
203 | 136 | | |
204 | 137 | | |
| 138 | + | |
205 | 139 | | |
206 | 140 | | |
207 | | - | |
| 141 | + | |
208 | 142 | | |
209 | | - | |
| 143 | + | |
210 | 144 | | |
211 | 145 | | |
212 | | - | |
| 146 | + | |
213 | 147 | | |
214 | | - | |
| 148 | + | |
215 | 149 | | |
216 | 150 | | |
217 | 151 | | |
| |||
251 | 185 | | |
252 | 186 | | |
253 | 187 | | |
254 | | - | |
| 188 | + | |
255 | 189 | | |
256 | 190 | | |
257 | 191 | | |
| |||
274 | 208 | | |
275 | 209 | | |
276 | 210 | | |
277 | | - | |
| 211 | + | |
278 | 212 | | |
279 | 213 | | |
280 | 214 | | |
| |||
This file was deleted.
0 commit comments