AGENT SKILL

version-bump

ACTIVATE before every `gh pr create` / `gh pr edit` in the claude-marketplace repo, and before any commit that touches files under plugins/. ACTIVATE for 'bump version', 'bump les versions', 'release plugin', 'version bump', 'semver', 'mets à jour les versions'. Classifies the pending changes per plugin into major/minor/patch from the conventional commits since that plugin's last bump, then updates plugin.json AND marketplace.json in the same PR, preserving the files' existing formatting. Claude Code caches plugins by version: a content change without a bump never reaches users. DO NOT use for: versioning application code outside this marketplace, changelog generation, or git tagging.

License 许可
MIT
最近更新
2026-10-13
Stars
★ 9
Forks
2

01 前言 Front Matter

name
version-bump
description
ACTIVATE before every `gh pr create` / `gh pr edit` in the claude-marketplace repo, and before any commit that touches files under plugins/. ACTIVATE for 'bump version', 'bump les versions', 'release plugin', 'version bump', 'semver', 'mets à jour les versions'. Classifies the pending changes per plugin into major/minor/patch from the conventional commits since that plugin's last bump, then updates plugin.json AND marketplace.json in the same PR, preserving the files' existing formatting. Claude Code caches plugins by version: a content change without a bump never reaches users. DO NOT use for: versioning application code outside this marketplace, changelog generation, or git tagging.

02 资源文件 1

03 SKILL.md 正文

version-bump — no plugin change ships without its semver bump

Claude Code caches installed plugins by version. A PR that changes a plugin's shipped content (skills, commands, agents, hooks, scripts, README) without bumping its version is invisible to every user until someone bumps it later. The bump belongs in the same PR as the change.

When this runs

Every time a PR is about to be created or updated on this repo, and every time a commit touches plugins/. The bump commit is part of the branch, never an afterthought on main.

Procedure

1. List the plugins the branch actually changes

git fetch --prune
git diff --name-only origin/main...HEAD -- plugins/ | cut -d/ -f2 | sort -u

Drop from the list any plugin whose only diff is its own plugin.json version line (already bumped).

2. Classify the bump per plugin

For each changed plugin, read the branch's commits touching it plus, if the version was already stale before the branch, the commits since its last bump:

last_bump=$(git log -1 --format=%h -- plugins/<name>/.claude-plugin/plugin.json)
git log --oneline "$last_bump"..HEAD -- plugins/<name>

Apply, in priority order:

Change Bump
Skill / command / agent renamed or removed, hook behaviour changed incompatibly, or a commit scoped to this plugin carries ! / BREAKING CHANGE major
New skill / command / agent / hook, or a feat commit adding rules to an existing skill minor
fix, docs, refactor, chore, description rewording, README-only patch

A cross-cutting ! commit (e.g. a repo-wide sweep) is major only for the plugins where its diff renames or removes something users invoke by name; for the plugins where it merely edits prose, it is a patch. Check the diff, not the subject line:

git show <sha> --stat -M -- plugins/<name>

3. Write the new version in BOTH files

The version lives in plugins/<name>/.claude-plugin/plugin.json and in the matching entry of .claude-plugin/marketplace.json. They must stay identical.

Edit only the version line (Edit tool on the "version": "x.y.z" string). Never round-trip the JSON through a serializer: it reflows inline arrays and turns a one-line bump into a formatting diff.

4. Verify before pushing

node plugins/skills/scripts/certify.ts --all
python3 - <<'EOF'
import json, pathlib
m = json.loads(pathlib.Path(".claude-plugin/marketplace.json").read_text())
bad = [e["name"] for e in m["plugins"]
       if pathlib.Path(f"plugins/{e['name']}/.claude-plugin/plugin.json").exists()
       and json.loads(pathlib.Path(f"plugins/{e['name']}/.claude-plugin/plugin.json").read_text())["version"] != e.get("version")]
print("mismatches:", bad or "none")
EOF

Both must pass. A mismatch means step 3 missed one of the two files.

Anti-patterns

  • ❌ Merge the content PR now, "bump in a follow-up". The follow-up is the commit history this skill exists to prevent: 26 plugins stale at once.
  • ❌ One global bump level for the whole PR. Each plugin gets its own level from its own diff.
  • ❌ Bump marketplace.json only. plugin.json wins silently; users still see the old version.
  • ❌ Re-serialize the JSON to change one field.

04 同仓库更多 Skills

FabienSalles
FabienSalles/claude-marketplace

vitest-test-conventions

ACTIVATE when writing Vitest tests, creating test files, using vi.fn()/vi.mock()/vi.spyOn(), or test factories. ACTIVATE for 'Vitest', 'it.each', 'NestJS testing module', 'supertest', 'vi.fn', 'vi.mock', 'spyOn'. Provides Vitest/NestJS-specific testing patterns; cross-language testing principles (DAMP, AAA, spy over mock, what NOT to test) live in craft:testing-principles. DO NOT use for: node:test files (a file importing node:test) or a project whose tests run under node --test (see node-test:node-test-conventions), TDD workflow/iterations (see vitest:vitest-tdd-workflow), PHP/PHPUnit tests (see phpunit:php-test-conventions).

★ 9
FabienSalles
FabienSalles/claude-marketplace

vitest-tdd-workflow

ACTIVATE when building new features, endpoints, or user stories using TDD with Vitest in a TypeScript/NestJS context. ACTIVATE for '/feature-tdd-dev', 'TDD', 'red-green-refactor' in TS context. Provides Vitest/NestJS-specific TDD examples and commands; cross-language TDD workflow (cross-layer iterations, RED-GREEN-REFACTOR, working app, bug-fix-first-test, mocks-hiding-bugs) lives in craft:tdd-workflow-principles. DO NOT use for: node:test files (a file importing node:test) or a project whose tests run under node --test (see node-test:node-test-conventions), test writing conventions (see vitest:vitest-test-conventions), PHP TDD (see phpunit:php-tdd-workflow).

★ 9
FabienSalles
FabienSalles/claude-marketplace

ts-refactoring

ACTIVATE when refactoring TypeScript code. ACTIVATE for 'refactor', 'extract', 'redesign', 'simplify', or 'clean up' in a TypeScript / Node / NestJS context. This skill provides TS-specific examples for the cross-language refactoring rules defined in craft:refactoring-principles. DO NOT use for: writing new features from scratch, general OOP patterns (see ts-oop).

★ 9
FabienSalles
FabienSalles/claude-marketplace

ts-ports-adapters

ACTIVATE when a TypeScript codebase with no dependency-injection container has to declare a port and wire its adapter — a repository, a clock, an id generator, an event dispatcher the domain depends on. ACTIVATE for 'port', 'adapter', 'SPI', 'dependency inversion' or 'composition root' in a codebase that wires its dependencies by hand. Covers: the port as a type of functions in the domain layer, the adapter as an object literal annotated with it, the handler that takes its dependencies first and its data second, the composition root in the infrastructure layer, and the in-memory stub that substitutes for the adapter in a unit test. DO NOT use for: NestJS, or any container-based DI with decorators and tokens (see nest-ddd-conventions), aggregate operations and smart constructors (see ddd-ts-fp), the Result type itself (see ts-functional).

★ 9
FabienSalles
FabienSalles/claude-marketplace

ts-oop

ACTIVATE when designing TypeScript classes, and the value objects or collections modelled as classes, or when the user asks about object design, encapsulation, Tell Don't Ask, or Symbol.iterator. Provides TS-specific examples for the cross-language OOP rules defined in craft:oop-principles, plus TS-specific patterns (Symbol.iterator, branded types for primitive identifiers). DO NOT use for: a value object or an aggregate modelled as an immutable record rather than a class (see ddd-ts-fp), refactoring methodology (see ts-refactoring).

★ 9
FabienSalles
FabienSalles/claude-marketplace

ts-layer-boundaries

ACTIVATE when wiring a Worker entry point, a Router, a controller, or a domain event consumer in a TypeScript CQRS codebase, or when deciding where a port belongs. ACTIVATE for 'composition root', 'layer boundary', 'ESLint zones', 'domain must not import infrastructure'. Covers: the *Worker.ts composition root, the curried consumer, Router wiring of command endpoints, the five-gesture controller, the domain-to-infrastructure import boundary enforced by ESLint, infrastructure-only ports, in-memory doubles for every port, the read-can-reach-write asymmetry, and read endpoints going through a domain handler. DO NOT use for: the port's own shape and adapter binding (see ts-ports-adapters), the Result type (see ts-functional), domain event structure (see ts-ddd-events).

★ 9