Utility scripts for maintaining the Bitwarden AI Plugins Marketplace.
- bump-plugin-version.sh - Automate version bumping
- validate-plugin-structure.sh - Validate plugin structure
- validate-marketplace.sh - Validate marketplace.json
- validate-version-bump.sh - Validate version bumps for changed plugins
- GitHub Actions Integration
- Local Development Workflow
Automates version bumping across all required plugin files.
./scripts/bump-plugin-version.sh <plugin-name> <new-version># Bump patch version for a bug fix
./scripts/bump-plugin-version.sh bitwarden-code-review 1.3.4
# Bump minor version for new features
./scripts/bump-plugin-version.sh claude-retrospective 1.1.0
# Bump major version for breaking changes
./scripts/bump-plugin-version.sh claude-config-validator 2.0.0The script automatically updates version numbers in:
.claude-plugin/marketplace.json- Marketplace registrationplugins/<plugin-name>/.claude-plugin/plugin.json- Plugin manifestREADME.md- Plugin catalog tableplugins/<plugin-name>/agents/*/AGENT.md- All agent YAML frontmatter (if agents exist)
- Input validation: Ensures plugin name and version format are valid
- Existence checks: Verifies plugin and files exist before making changes
- Confirmation prompt: Asks for confirmation before applying changes
- Colored output: Clear visual feedback with success/error indicators
- Agent detection: Automatically finds and updates all agent files
- Helpful reminders: Reminds you to update changelog after version bump
After a successful version bump, you must:
- Update
plugins/<plugin-name>/CHANGELOG.mdwith an entry for the new version - Follow Keep a Changelog format
- Commit all changes together in the same PR
jq- JSON processor (install withbrew install jqon macOS)sed- Stream editor (usually pre-installed)bash4.0 or higher
The script validates:
- Plugin name format (alphanumeric, hyphens, underscores only)
- Semantic version format (must be X.Y.Z)
- Plugin directory existence
- Required file existence
- JSON syntax after updates
If any validation fails, the script exits with an error message and no changes are made.
Validates the structure and content of individual plugins.
bash scripts/validate-plugin-structure.sh
# or
./scripts/validate-plugin-structure.sh- Plugin directory structure - Verifies required directories exist
- Required files - Checks for:
.claude-plugin/plugin.json- Plugin manifestREADME.md- Plugin documentationCHANGELOG.md- Version history
- Optional directories - Validates
commands/,agents/,skills/,hooks/ - Agent definitions - Ensures each agent has
AGENT.mdwith valid YAML frontmatter - Skill definitions - Ensures each skill has
SKILL.mdwith valid YAML frontmatter - Command definitions - Checks for
.mdfiles in command directories - README content - Warns if missing key sections (description, usage, installation)
- CHANGELOG format - Warns if not following Keep a Changelog format
The script provides colored output:
- π Blue headers for sections
- β Green for successful validations
- β Red for errors (will fail the check)
β οΈ Yellow for warnings (won't fail the check)
0- All validations passed1- One or more validations failed
π Validating plugin structure...
π¦ Validating bitwarden-code-review...
β
Structure is valid
π¦ Validating claude-config-validator...
β Missing required file: CHANGELOG.md
β οΈ CHANGELOG.md does not exist
ββββββββββββββββββββββββββββββββββββββββββββββββββ
π Validation Summary
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Total plugins checked: 2
Total errors: 1
Total warnings: 1
β Plugin validation failed
Validates the marketplace.json file and checks consistency with actual plugins.
bash scripts/validate-marketplace.sh
# or
./scripts/validate-marketplace.sh- Marketplace structure - Validates required fields:
name- Marketplace identifierowner- Owner information (must havenamefield)plugins- Array of plugin entries
- Plugin entries - Checks each plugin has:
name- Plugin identifiersource- Path to plugin directorydescription- Plugin descriptionversion- Semantic version (X.Y.Z)
- Plugin existence - Verifies plugin directories actually exist
- Version consistency - Ensures versions match between:
marketplace.jsonplugin.jsonfiles
- Name consistency - Ensures names match in marketplace and plugin manifests
- README catalog - Verifies each plugin appears in the README.md plugin catalog table with the correct version
- Completeness - Warns if plugins exist but aren't listed in marketplace
The script provides colored output:
- π Blue headers for sections
- β Green for successful validations
- β Red for errors
0- All validations passed1- One or more validations failed
π Validating marketplace.json...
π Checking marketplace structure...
β
Structure is valid
π¦ Checking plugin entries...
β
claude-retrospective
β
claude-config-validator
β
bitwarden-code-review
π Checking consistency with plugin files...
β
All plugins are consistent
ββββββββββββββββββββββββββββββββββββββββββββββββββ
π Validation Summary
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Total plugins in marketplace: 3
Total errors found: 0
β
marketplace.json is valid
Validates that changed plugins include a version bump and changelog update.
# Compare against a base branch
./scripts/validate-version-bump.sh origin/main plugin-name
# Check multiple plugins
./scripts/validate-version-bump.sh origin/main bitwarden-code-review bitwarden-software-engineer
# Accept plugins/ path prefix
./scripts/validate-version-bump.sh origin/main plugins/bitwarden-code-review- Version bump - Compares the version in
plugin.jsonbetween the base ref and HEAD. The new version must be strictly greater than the base version (any of major, minor, or patch). - Changelog update - Verifies that
CHANGELOG.mdwas modified in the diff between the base ref and HEAD.
0- All plugins have proper version bumps1- One or more plugins are missing a version bump or changelog update
π Validating version bumps for changed plugins...
π¦ Checking bitwarden-software-engineer...
β bitwarden-software-engineer: Version not bumped (still 0.3.0). Plugin component files were changed β run ./scripts/bump-plugin-version.sh bitwarden-software-engineer <new-version>
β bitwarden-software-engineer: CHANGELOG.md not updated. Add an entry describing what changed.
ββββββββββββββββββββββββββββββββββββββββββββββββββ
π Version Bump Validation Summary
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Plugins checked: 1
Total errors: 2
β Version bump validation failed with 2 error(s)
Every plugin must include:
-
.claude-plugin/plugin.json- Plugin manifest with:{ "name": "plugin-name", "version": "X.Y.Z", "description": "Plugin description", "author": { "name": "Author Name" } } -
README.md- Documentation including:- Description/overview
- Usage examples
- Installation instructions
-
CHANGELOG.md- Version history following Keep a Changelog format
All versions must follow semantic versioning:
- Format:
MAJOR.MINOR.PATCH(e.g.,1.0.0,2.3.4) - Numbers only (no 'v' prefix)
- Must be consistent across all files
See Semantic Versioning for guidelines:
- MAJOR - Breaking changes
- MINOR - New features, backward-compatible
- PATCH - Bug fixes, documentation updates
If your plugin includes agents, each AGENT.md must have valid YAML frontmatter:
---
name: agent-name
description: Agent description
version: X.Y.Z
tools:
- tool1
- tool2
---If your plugin includes skills, each SKILL.md must have valid YAML frontmatter:
---
name: skill-name
description: Skill description
---- β No hardcoded credentials or API keys
- β No committed
.envfiles - β Proper input validation in scripts
- β Use environment variables for sensitive data
"Missing required file: plugin.json"
- Ensure
.claude-plugin/plugin.jsonexists in your plugin directory - Check the file path matches the expected structure
"Invalid version format"
- Use semantic versioning:
1.0.0notv1.0or1.0 - No prefixes or suffixes allowed
"Version mismatch"
- Ensure versions match in:
plugin.jsonmarketplace.jsonAGENT.mdfiles (if agents exist)
- Use the version bump script:
./scripts/bump-plugin-version.sh plugin-name X.Y.Z
"Version not bumped" / "CHANGELOG.md not updated"
- Plugin component files (agents, skills, hooks) were changed without a version bump
- Run
./scripts/bump-plugin-version.sh <plugin-name> <new-version>to bump all version files - Add a changelog entry under the appropriate category (Added, Changed, Fixed, etc.)
- Commit the version bump alongside your code changes
"Missing YAML frontmatter"
- Ensure files start with
---and end with--- - Include all required fields
- Validate YAML syntax at YAML Lint
"Invalid JSON"
- Validate JSON syntax using
jq:jq empty your-file.json
- Or use an online validator like JSONLint
"Plugin is not listed in the README.md plugin catalog table"
- Add a row to the plugin catalog table in
README.md - Format:
| [plugin-name](plugins/plugin-name/) | X.Y.Z | Description | - Use the version bump script to keep all files in sync:
./scripts/bump-plugin-version.sh
"README catalog version mismatch"
- Run the version bump script to update all files at once:
./scripts/bump-plugin-version.sh plugin-name X.Y.Z - Or manually update the version in the README.md plugin catalog table
"Plugin exists but not in marketplace"
- Add an entry to
.claude-plugin/marketplace.json - Ensure the
sourcepath is correct
- Claude Code Plugins Reference - Official plugin API reference
- Plugin Marketplaces - Marketplace structure
- Plugin Structure - Plugin organization
- Keep a Changelog - Changelog format
- Semantic Versioning - Version numbering
- Bitwarden Contributing Guidelines - Contribution standards
Based on research into Claude Code plugin validation and best practices:
-
Automated validation - Run lints and tests that gate every change; CI runs should be non-destructive first (Claude Code Plugin Best Practices)
-
Hooks for quality checks - Automate type checks, security validation, and code formatting using hooks (Claude Code: Part 8 - Hooks)
-
Security scanning - Scan generated code for vulnerabilities and validate against security policies (Claude Desktop Developer Best Practices)
-
Progressive constraints - Start in read-only mode; allow writes only after tests pass (Claude Code 2.0 Best Practices)
-
Schema validation - Validate against official marketplace schema at https://anthropic.com/claude-code/marketplace.schema.json (Plugin marketplaces)
When modifying validation scripts:
- Test locally before committing
- Document any new validation checks in this README
- Update workflow file if adding new checks
- Follow existing patterns for consistency
- Consider backwards compatibility
For questions or issues, refer to the main repository README or contact the maintainers.