| name | cpv-setup-plugin-repo |
| description | Create and configure Claude Code plugin GitHub repositories with CI/CD, hooks, and marketplace notification. Use when setting up a new plugin repo. Used dynamically via cpv-the-skills-menu (TRDD-478d9687).
|
| tags | ["plugin","github","setup","ci-cd"] |
| user-invocable | false |
Setup Plugin Repository
Overview
Creates a Claude Code plugin GitHub repo with CI/CD, git hooks, and marketplace notification.
Prerequisites
gh CLI authenticated, git, uv, and uvx on PATH
- GitHub PAT with
repo scope (optional, for marketplace)
Note: the CPV validator is fetched remotely from GitHub via uvx. Downstream
plugins do NOT vendor scripts/validate_plugin.py — the canonical pipeline
runs cpv-remote-validate plugin . --strict which pulls the current CPV
release automatically.
Instructions
- Create GitHub repo:
gh repo create <owner>/<name> --public --clone, then cd into it
- Initialize plugin: create standard files from plugin-repo-templates (see Resources)
- (Layout C only) Add self-marketplace: also create the marketplace manifest with a single self-entry, source
"./". Both manifests share the same name and version.
- Install workflows: copy
ci.yml and release.yml from plugin-workflows. Skip notify-marketplace.yml for Layout B/C (no separate marketplace repo).
- Install git hooks:
uv run python scripts/publish.py --install-hook
- Configure marketplace (Layout A only):
uv run python scripts/set_marketplace_pat.py <owner>/<repo>. Skip for B/C.
- Validate:
uvx --from git+https://github.com/Emasoft/claude-plugins-validation --with pyyaml cpv-remote-validate plugin . --strict. Layout C also runs validate_marketplace.py --strict for name/version sync.
- Commit and push: stage, commit "Initial plugin scaffold", push to
main
Copy this checklist and track your progress:
Output
Report: repo URL, VALID/INVALID + severity counts, installed workflows/hooks, skipped steps.
Error Handling
| Error | Resolution |
|---|
gh auth fails | gh auth login and retry |
| Repo exists | Ask user: clone or new name |
| Unfilled placeholders | Re-read templates, fill <placeholder-for-...> values |
| INVALID validation | Fix ALL issues (CRITICAL, MAJOR, MINOR, NIT), re-validate |
| No PAT | Skip marketplace, warn user |
Examples
Input: Plugin: my-plugin | Owner: my-org
Output: [DONE] Repo: github.com/my-org/my-plugin | VALID | Hooks: pre-push | Marketplace: ok
Resources
- Plugin Repo Templates
plugin.json Template · pyproject.toml Template · .gitignore Template · README.md Template · Placeholder Reference
- Plugin Workflows
ci.yml -- Consolidated CI (lint + validate + test) · release.yml -- GitHub Release on Tag · notify-marketplace.yml -- Marketplace Notification · Placeholder Reference · Setup Instructions
- Plugin Hooks and Scripts
pre-push Hook Template · publish.py Pipeline Template · setup_git_hooks.py Template · Placeholder Reference
- Plugin Binary Builds
When to Add a Build Phase · Source/Binary Separation · build-binaries.yml — Cross-Platform Compilation Workflow (FALLBACK) · Binary Distribution Pattern · Platform Detection Wrapper · Extending the Python Pre-Push Hook · Extending publish.py for Binary Builds · Extending ci.yml for Binary Builds · Cargo Release Profile (Rust Optimization) · Placeholder Reference
- Pipeline Rules
Pre-Push Hook: The Quality Gate · Fix-All Mandate · Running CPV Scripts · Processing Validation Output · GitHub Secrets · CI Workflow Dependencies · Marketplace Notification · All Scripts Are Python · Binary Plugins · README Requirements · Pre-Publish Local Dry-Run · Post-Push CI Verification · Mega-Linter Configuration · Common Fixes Reference
- v2.1.80+ Plugin Features
Monitor tool · userConfig (plugin.json) · channels (plugin.json) · CLAUDE_PLUGIN_OPTION_ env vars · Inline marketplace (settings.json) · managed-settings.d/ drop-in directory · Plugin skill name field (v2.1.98)
- Parallel scanning (v2.103.0+) — scaffolded plugins inherit the CPV ~11.6× speedup via the
uvx --from git+... remote-mode in their generated ci.yml / release.yml / publish.py; no template re-scaffold needed when upstream CPV ships new parallelism wins
Table of contents · Performance summary · Environment knobs (disable selectively for debugging) · Scaffolded plugins (created via cpv-create-plugin / cpv-setup-plugin-repo) · Batch commands (cpv-batch-*) · Remote validation (cpv remote-mode + scaffolded publish.py) · When to disable parallelism · See also
Token Optimization
Use LLM Externalizer MCP for template analysis to save context tokens.