Skip to content

Commit 803096d

Browse files
borisno2claude
andauthored
Add plugin-version skill and bump plugin versions to 0.2.1 (#379)
* Add plugin-version skill and bump plugin versions to 0.2.1 Adds a new `plugin-version` skill for bumping Claude plugin semver versions whenever plugins or the marketplace are modified. Updates CLAUDE.md to reference the skill. Bumps all plugin versions to 0.2.1 and marketplace metadata to 1.1.1 as the initial versioned release. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * format * update plugins * update local plugins --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4651d1c commit 803096d

File tree

9 files changed

+287
-28
lines changed

9 files changed

+287
-28
lines changed

.claude-plugin/marketplace.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
},
77
"metadata": {
88
"description": "Official OpenSaaS Stack plugin marketplace for development and migration tools",
9-
"version": "1.1.0",
9+
"version": "1.1.1",
1010
"homepage": "https://stack.opensaas.au/"
1111
},
1212
"plugins": [
1313
{
1414
"name": "opensaas-stack",
1515
"source": "./claude-plugins/opensaas-stack",
1616
"description": "Feature-driven development assistant for OpenSaaS Stack. Build complete applications by describing what you want to build instead of configuring infrastructure.",
17-
"version": "0.2.0",
17+
"version": "0.2.2",
1818
"author": {
1919
"name": "OpenSaaS",
2020
"url": "https://opensaas.au"
@@ -29,7 +29,7 @@
2929
"name": "opensaas-migration",
3030
"source": "./claude-plugins/opensaas-migration",
3131
"description": "OpenSaaS Stack migration assistant with AI-guided configuration, schema analysis, and code generation support",
32-
"version": "0.2.0",
32+
"version": "0.2.2",
3333
"author": {
3434
"name": "OpenSaaS Team",
3535
"url": "https://github.com/OpenSaasAU/stack"
Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
---
2+
name: plugin-version
3+
description: Bump plugin versions in the OpenSaaS Stack monorepo. Invoke whenever any file under claude-plugins/* or .claude-plugin/ is modified — skills, commands, agents, or marketplace config. Plugin versions must be bumped before committing so users who install the plugin get the updated version. Note: this is separate from pr-changeset, which handles npm packages — plugin versions are managed directly in plugin.json and marketplace.json.
4+
allowed-tools: Read, Edit, Bash, Grep, Glob
5+
---
6+
7+
# Plugin Version Skill
8+
9+
This skill bumps version numbers for Claude plugins and the marketplace manifest. Plugin versions live directly in JSON files (not changesets) — bumping them is what signals to the marketplace that something changed and triggers users to get the update.
10+
11+
## Files This Skill Manages
12+
13+
| Changed directory | Files to update |
14+
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
15+
| `claude-plugins/opensaas-stack/` | `claude-plugins/opensaas-stack/.claude-plugin/plugin.json` (version) AND `.claude-plugin/marketplace.json` (plugins[name="opensaas-stack"].version) |
16+
| `claude-plugins/opensaas-migration/` | `claude-plugins/opensaas-migration/.claude-plugin/plugin.json` (version) AND `.claude-plugin/marketplace.json` (plugins[name="opensaas-migration"].version) |
17+
| `.claude-plugin/` root files only | `.claude-plugin/marketplace.json` (metadata.version only) |
18+
19+
## Versioning Rules
20+
21+
### Patch (bug fixes only)
22+
23+
- **Use for**: Bug fixes, typo corrections, documentation fixes, minor wording improvements in skill descriptions
24+
- **Bump**: `x.y.Z``x.y.Z+1`
25+
- **Description**: Maximum 2 lines
26+
27+
### Minor (features or enhancements)
28+
29+
- **Use for**: New skills, new commands, new agents, new MCP tools, enhancements to existing capabilities
30+
- **Bump**: `x.Y.z``x.Y+1.0` (reset patch to 0)
31+
- **Description**: Describe the new capability
32+
33+
### Major (breaking changes)
34+
35+
- **Use for**: Removed skills/commands/tools, changed invocation patterns, incompatible changes
36+
- **ONLY when explicitly requested by the user**
37+
- **Bump**: `X.y.z``X+1.0.0` (reset minor and patch to 0)
38+
39+
## Instructions
40+
41+
### Step 1: Identify Changed Plugin Directories
42+
43+
Run git commands to detect which plugin areas changed:
44+
45+
```bash
46+
git diff --name-only HEAD
47+
# or for staged changes:
48+
git diff --name-only --cached
49+
# or for all changes relative to main:
50+
git diff --name-only origin/main...HEAD
51+
```
52+
53+
Look for paths starting with:
54+
55+
- `claude-plugins/opensaas-stack/` → opensaas-stack plugin changed
56+
- `claude-plugins/opensaas-migration/` → opensaas-migration plugin changed
57+
- `.claude-plugin/` → marketplace root changed (check if any file other than version fields changed)
58+
59+
### Step 2: Determine Version Bump Type
60+
61+
For each changed plugin:
62+
63+
- **Is this a bug fix or correction?** → Use `patch`
64+
- **Is this a new skill, command, agent, or capability?** → Use `minor`
65+
- **Does this remove or rename something users depend on?** → Use `major` only if user explicitly requested it; otherwise ask
66+
67+
### Step 3: Read Current Versions
68+
69+
For each affected plugin, read the current version:
70+
71+
```
72+
Read: claude-plugins/<plugin-name>/.claude-plugin/plugin.json
73+
```
74+
75+
The version is in the top-level `"version"` field.
76+
77+
For the marketplace:
78+
79+
```
80+
Read: .claude-plugin/marketplace.json
81+
```
82+
83+
The marketplace metadata version is at `metadata.version`. Each plugin's marketplace entry version is at `plugins[i].version` where `plugins[i].name` matches the plugin name.
84+
85+
### Step 4: Calculate New Version
86+
87+
Given the current version string `"x.y.z"`:
88+
89+
- **patch**: increment z → `"x.y.(z+1)"`
90+
- `"0.2.0"``"0.2.1"`
91+
- `"1.3.4"``"1.3.5"`
92+
- **minor**: increment y, reset z to 0 → `"x.(y+1).0"`
93+
- `"0.2.0"``"0.3.0"`
94+
- `"1.3.4"``"1.4.0"`
95+
- **major**: increment x, reset y and z to 0 → `"(x+1).0.0"`
96+
- `"0.2.0"``"1.0.0"`
97+
- `"1.3.4"``"2.0.0"`
98+
99+
### Step 5: Edit the JSON Files
100+
101+
For each changed plugin, make two targeted edits using the Edit tool.
102+
103+
**Edit 1 — The plugin's own plugin.json:**
104+
105+
Find the `"version"` field near the top of the file and replace just that value.
106+
107+
Example in `claude-plugins/opensaas-stack/.claude-plugin/plugin.json`:
108+
109+
```
110+
"version": "0.2.0",
111+
```
112+
113+
114+
115+
```
116+
"version": "0.2.1",
117+
```
118+
119+
**Edit 2 — The matching entry in marketplace.json:**
120+
121+
The `plugins` array in `.claude-plugin/marketplace.json` has one object per plugin. Find the object where `"name"` matches the plugin name and edit its `"version"` field.
122+
123+
Example: find the block for `"name": "opensaas-stack"` and edit:
124+
125+
```
126+
"version": "0.2.0",
127+
```
128+
129+
130+
131+
```
132+
"version": "0.2.1",
133+
```
134+
135+
**Edit 3 (conditional) — Marketplace metadata.version:**
136+
137+
Only bump `metadata.version` if files in the `.claude-plugin/` root directory were directly changed (e.g., `MARKETPLACE.md`, new fields added to `marketplace.json` structure, owner/metadata fields edited). Do NOT bump it just because plugin versions changed.
138+
139+
### Step 6: Verify the Edits
140+
141+
After editing, read back the affected files to confirm:
142+
143+
- The version field shows the new version
144+
- No other fields were accidentally changed
145+
- Both plugin.json and the matching marketplace.json entry show the same new version number
146+
147+
## Examples
148+
149+
### Example 1: Patch — Fix a typo in a skill description
150+
151+
Changed files: `claude-plugins/opensaas-stack/skills/some-skill/SKILL.md`
152+
153+
Current version: `"0.2.0"` → New version: `"0.2.1"`
154+
155+
Edit `claude-plugins/opensaas-stack/.claude-plugin/plugin.json`:
156+
157+
- `"version": "0.2.0"``"version": "0.2.1"`
158+
159+
Edit `.claude-plugin/marketplace.json` (in the `opensaas-stack` plugins entry):
160+
161+
- `"version": "0.2.0"``"version": "0.2.1"`
162+
163+
Do NOT change `metadata.version` — the marketplace structure itself did not change.
164+
165+
### Example 2: Minor — Add a new skill to opensaas-migration
166+
167+
Changed files: `claude-plugins/opensaas-migration/skills/new-skill/SKILL.md` (new file)
168+
169+
Current version: `"0.2.0"` → New version: `"0.3.0"`
170+
171+
Edit `claude-plugins/opensaas-migration/.claude-plugin/plugin.json`:
172+
173+
- `"version": "0.2.0"``"version": "0.3.0"`
174+
175+
Edit `.claude-plugin/marketplace.json` (in the `opensaas-migration` plugins entry):
176+
177+
- `"version": "0.2.0"``"version": "0.3.0"`
178+
179+
### Example 3: Changes to both plugins
180+
181+
Changed files include both `claude-plugins/opensaas-stack/...` and `claude-plugins/opensaas-migration/...`
182+
183+
Determine bump type independently for each plugin based on the nature of its changes. They can be bumped to different versions.
184+
185+
Edit `claude-plugins/opensaas-stack/.claude-plugin/plugin.json` with its new version.
186+
Edit `claude-plugins/opensaas-migration/.claude-plugin/plugin.json` with its new version.
187+
Edit `.claude-plugin/marketplace.json` twice — once for each plugin's entry.
188+
189+
### Example 4: Marketplace-only change
190+
191+
Changed files: `.claude-plugin/marketplace.json` (added a new top-level field) or `.claude-plugin/MARKETPLACE.md`
192+
193+
The marketplace structure itself changed, so bump `metadata.version`.
194+
195+
Current: `"version": "1.1.0"` → New: `"version": "1.1.1"` (patch)
196+
197+
Edit `.claude-plugin/marketplace.json` `metadata.version` field only.
198+
Do NOT change any plugin.json files — no plugin logic changed.
199+
200+
## Common Mistakes to Avoid
201+
202+
1. **Don't bump metadata.version just because plugin versions changed**
203+
- Plugin version entries in marketplace.json are synced from plugin.json
204+
- Only bump metadata.version when the marketplace file's own structure changed
205+
206+
2. **Don't forget the marketplace.json plugin entry**
207+
- When you bump a plugin.json, always also update the matching entry in marketplace.json
208+
- The two must stay in sync
209+
210+
3. **Don't use major unless explicitly requested**
211+
- New skills and commands are minor, not major
212+
- Ask the user if you think a major bump is warranted
213+
214+
4. **Don't reset patch to 0 on a patch bump**
215+
- patch: `0.2.3``0.2.4` (not `0.2.0`)
216+
- minor: `0.2.3``0.3.0` (reset patch)
217+
- major: `0.2.3``1.0.0` (reset both)
218+
219+
5. **Don't edit unrelated fields**
220+
- Use Edit tool with precise old_string/new_string targeting just the version line
221+
- Verify after editing that only the version changed
222+
223+
6. **Don't create changeset files**
224+
- This skill edits JSON files directly
225+
- Plugin versions are NOT managed by the npm changeset system
226+
227+
## Workflow
228+
229+
When working on plugin changes:
230+
231+
1. Make your plugin code changes
232+
2. Before committing, invoke this skill to bump versions
233+
3. Verify the JSON files show the correct new versions
234+
4. Commit all changed files together (plugin code + plugin.json + marketplace.json)
235+
236+
## Troubleshooting
237+
238+
**Q: Both plugins changed but for very different reasons — do I use the same bump type?**
239+
A: No. Evaluate each plugin independently. One might be a patch and the other a minor bump.
240+
241+
**Q: I added a new skill AND fixed a bug in the same plugin. Which bump type?**
242+
A: Use minor (the higher of the two).
243+
244+
**Q: How do I know if marketplace metadata.version should be bumped?**
245+
A: Ask: "Did I change marketplace.json itself beyond just updating plugin version entries?" If you edited owner, metadata.description, added new top-level fields, or changed MARKETPLACE.md — yes. If you only updated plugin version numbers — no.
246+
247+
**Q: What if I only changed README.md inside a plugin directory?**
248+
A: Still bump the plugin version (patch). Documentation is part of the plugin release.
249+
250+
**Q: Should this skill be used alongside pr-changeset?**
251+
A: These are independent. `pr-changeset` handles npm packages in `packages/*`. This skill handles Claude plugins in `claude-plugins/*`. If a PR changes both, use both skills.
252+
253+
## Important Notes
254+
255+
- Plugin versions are semver strings stored directly in JSON — there is no automated tooling managing them
256+
- The marketplace.json `plugins[].version` fields must always match the corresponding plugin.json `version` fields
257+
- marketplace.json `metadata.version` is independent and tracks the marketplace manifest itself
258+
- Both plugin.json files and marketplace.json must be committed together in the same commit as the plugin changes

.claude/skills/pr-changeset/SKILL.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
---
22
name: pr-changeset
3-
description: Create changesets for package changes in pull requests. Use whenever you modify code in any package (packages/*). Required before committing changes to packages. Handles versioning with patch for bug fixes, minor for features, and major only when explicitly requested.
3+
description: Create changesets for package changes in pull requests. Invoke whenever any file under packages/* is modified — including bug fixes, new features, and even documentation or typo changes. Changesets are required before committing; without one, the release pipeline won't know what changed or how to version it. Also trigger when the user asks about versioning, what changeset to create, or whether a change needs a changeset.
44
allowed-tools: Write, Read, Bash, Grep, Glob
55
---
66

77
# PR Changeset Skill
88

9-
This skill helps you create proper changeset files when making changes to packages in the monorepo. **You MUST use this skill whenever you modify code in any package.**
10-
11-
## When to Use
12-
13-
- **ALWAYS** when modifying files in `packages/*`
14-
- Before committing changes to any package
15-
- When creating or updating a pull request that affects packages
16-
- Even for small changes (typo fixes, documentation updates in packages)
9+
This skill creates the changeset file that tells the release pipeline what changed and how to version it. Every change to a package needs one — even small fixes — because changesets are how versions get bumped and changelogs get generated automatically.
1710

1811
## Versioning Rules
1912

CLAUDE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
99
- **README files:** Each package and example has its own README for specific usage instructions
1010
- **Claude Skills:** Specialized skills for common tasks are in `.claude/skills/`
1111
- `pr-changeset`: **REQUIRED** - Use when modifying any package code to create proper changeset files
12+
- `plugin-version`: **REQUIRED** - Use when modifying any Claude plugin code to bump plugin and marketplace versions
1213

1314
## Project Overview
1415

@@ -1311,6 +1312,20 @@ Then follow the prompts to select packages and version bumps.
13111312
2. Commit changes including the changeset file.
13121313
Version bumping and publishing is handled automatically by changesets during release in a GitHub Action.
13131314
1315+
## Publishing Plugins
1316+
1317+
Claude plugins in `claude-plugins/*` use direct semver versioning in JSON files. Whenever you modify plugin code, skills, commands, agents, or marketplace root files, you must bump the version using the `plugin-version` skill.
1318+
1319+
**IMPORTANT:** When working with Claude Code, you MUST use the `plugin-version` skill to bump plugin versions. It handles both the plugin's own `plugin.json` and the matching entry in `.claude-plugin/marketplace.json`.
1320+
1321+
The `plugin-version` skill:
1322+
1323+
- Detects which plugin directories changed (`claude-plugins/opensaas-stack/`, `claude-plugins/opensaas-migration/`, `.claude-plugin/`)
1324+
- Determines patch vs minor bump (patch for fixes, minor for new capabilities, major only when explicitly requested)
1325+
- Directly edits version fields in JSON — no changeset files
1326+
- Keeps `plugin.json` and `marketplace.json` plugin entries in sync
1327+
- Only bumps `marketplace.metadata.version` when the marketplace structure itself changed (not just plugin version numbers)
1328+
13141329
- Data passed in as props to a component that is marked with `"use client"` must be serialised and must only contain the minimum data required to make that component work
13151330
- Avoid the use of the `any` type, and do not use type casting. All types must be strongly typed to ensure type satefy - the `unkown` and `any` types must never exposed as an exteral type and are only to be used internally (within a package) where absolutely necessary
13161331

claude-plugins/opensaas-migration/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "opensaas-migration",
33
"description": "OpenSaaS Stack migration assistant with AI-guided configuration, schema analysis, and code generation support",
4-
"version": "0.2.0",
4+
"version": "0.2.2",
55
"author": {
66
"name": "OpenSaaS Team",
77
"url": "https://github.com/OpenSaasAU/stack"

claude-plugins/opensaas-migration/skills/migrate-document-fields/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Write a comment in the code for any document fields that had existing content so
102102
```typescript
103103
// NOTE: This field was migrated from Keystone document format.
104104
// Existing content may not render correctly until re-saved in the Tiptap editor.
105-
// See specs/keystone-image-migration.md for data migration guidance.
105+
// See specs/keystone-document-migration.md for data migration guidance.
106106
content: richText()
107107
```
108108

claude-plugins/opensaas-migration/skills/opensaas-migration/SKILL.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
---
22
name: opensaas-migration
3-
description: Expert knowledge for migrating projects to OpenSaaS Stack. Use when discussing migration strategies, access control patterns, or OpenSaaS Stack configuration best practices.
3+
description: Expert knowledge for migrating projects to OpenSaaS Stack. Invoke whenever the user mentions migrating from KeystoneJS, Prisma, or an existing Next.js project; asks about access control patterns or opensaas.config.ts; or is troubleshooting any aspect of an OpenSaaS Stack migration. Don't wait for the user to say "migration" — trigger whenever the conversation touches these areas.
44
---
55

66
# OpenSaaS Stack Migration
77

88
Expert guidance for migrating existing projects to OpenSaaS Stack.
99

10-
## When to Use This Skill
11-
12-
Use this skill when:
13-
14-
- Planning a migration from Prisma, KeystoneJS, or Next.js
15-
- Designing access control patterns
16-
- Configuring `opensaas.config.ts`
17-
- Troubleshooting migration issues
18-
- Explaining OpenSaaS Stack concepts
19-
2010
## Migration Process
2111

2212
### 1. Install Required Packages

claude-plugins/opensaas-stack/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "opensaas-stack",
3-
"version": "0.2.0",
3+
"version": "0.2.2",
44
"description": "Feature-driven development assistant for OpenSaaS Stack. Build complete applications by describing what you want to build instead of configuring infrastructure.",
55
"author": {
66
"name": "OpenSaaS",

claude-plugins/opensaas-stack/skills/opensaas-builder/SKILL.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
# OpenSaaS App Builder Skill
1+
---
2+
name: opensaas-builder
3+
description: Build applications and features on the OpenSaaS Stack. Use this whenever a user describes building an app, adding functionality, implementing a feature, or asks "how do I implement X" in an OpenSaaS Stack project. Also trigger when the user describes business requirements, data models, or use cases — even if they don't say "OpenSaaS" explicitly.
4+
---
25

3-
**When to invoke**: User describes wanting to build an application or add functionality to their OpenSaaS Stack app
6+
# OpenSaaS App Builder Skill
47

58
## Pattern Recognition
69

0 commit comments

Comments
 (0)