# Plugin Publish

> Stage, commit, push, and open a PR for plugin changes. Validates the commit message against conventional-commits (required by validate-pr-title CI check), runs Layer 1 structural tests first, and reminds the user to run /plugin marketplace update after merge. Triggers on "publish plugin", "push plugin changes", "ship this plugin", "release this branch".

- Skill: `racecraft-lab/plugin-publish` (Agent Skill)
- Install (CLI): `npx skillmds@latest add racecraft-lab/plugin-publish`
- Raw SKILL.md: https://api.skillmd.com/api/skills/racecraft-lab/plugin-publish/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: MIT
- Author: racecraft-lab (https://skillmd.com/u/racecraft-lab)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/racecraft-lab/plugin-publish

---


# plugin-publish

User-invocable. Stops Claude from auto-running this — it has side effects (push, PR).

## What this does

Walks through the publish flow documented in `CLAUDE.md`, but enforces the parts that are easy to forget:

1. **Pre-flight check** — `python3 tests/speckit-pro/run-all.py --layer 1` must pass (catches missing frontmatter and invalid JSON).
2. **Detect remote** — `git remote -v` (per global CLAUDE.md "Git Operations" rule — don't assume `origin`).
3. **Stage selectively** — list candidate files, ask user which to include. NEVER `git add -A` or `git add .`.
4. **Commit with conventional-commits prefix** — required types: `feat`, `fix`, `chore`, `docs`, `refactor`, `test`. Validate before writing.
5. **Push and open PR** — `gh pr create` with the same prefix in the title (the `validate-pr-title` CI check enforces this).
6. **Remind user** — after PR is merged (squash-only), tell them to run:
   ```
   /plugin marketplace update racecraft-plugins-public
   ```

## When NOT to use

- For a release (release-please handles version bumps automatically — do not manually edit `plugin.json` versions)
- For docs-only PRs touching `CLAUDE.md` or `README.md` (the `detect` CI job skips test matrix anyway; just commit + push, no skill needed)
- For the marketplace.json/release-please-config.json triplet — those have their own PreToolUse guard hook

## Hard rules

- Never merge the PR (only humans merge — see global memory)
- Never use `--no-verify` to skip hooks
- Never push to `main` directly (branch protection blocks it; use a feature branch + PR)
- Conventional-commit title format: `<type>(<scope>): <description>` (scope optional)

## Output

When complete, report:

- Branch name pushed
- PR URL
- The marketplace-update command the user needs to run post-merge

