/grav-skills:grav-releasefrom grav-skills
Guides cutting releases for Grav plugins or Grav core, covering git-flow vs tag-only workflows, prerelease handling, bare-numeric tagging rules, and post-release verification.
Ships in grav-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Cut a release of a Grav plugin or Grav core the way Andy does it. There are two shapes, decided by which branch the release work sits on. The version is already set in blueprints.yaml and the CHANGELOG.md before you start — your job is to verify it, tag it, and publish, not to invent a version.
Releases always happen in the source repo (~/Projects/grav/grav-plugin-<name> or the Grav core repo), never in a symlinked site copy under user/plugins/.
vTags and release titles are bare numeric: 3.4.5, 2.0.0-rc.1, 1.4.0-rc.8. Never v-prefixed. This applies to all three of:
git tag 3.4.5gh release create <tag> argument — gh release create 3.4.5--title — --title "3.4.5", NOT --title "v3.4.5"A single v-prefixed tag/release breaks git tag --sort=-v:refname and GitHub's releases/latest, so GPM and the gpm CLI stop seeing it as latest. CHANGELOG headings like # v3.4.5 are fine — that's just doc text. Only the tag, the release tag arg, and the title must be bare.
From inside the source repo:
cd ~/Projects/grav/grav-plugin-<name>
git branch --show-current # which branch? decides the shape (see below)
git status --short # MUST be clean (or only the release-prep edits)
grep -E '^version' blueprints.yaml # the version being released
head -3 CHANGELOG.md # top heading must match that version
git tag | grep -x <version> # MUST be absent — tag must not already exist
git rev-parse --abbrev-ref @{u} 2>/dev/null && git log --oneline @{u}..HEAD # unpushed commits?
gh auth status # logged in, correct account
git remote -v # confirm the repo (trilbymedia/* or getgrav/*)
Checklist before proceeding:
blueprints.yaml version: == top CHANGELOG.md heading. They should already agree. If they don't, stop and ask — don't guess which is right.## MM/DD/YYYY line under the top heading should be today's date, not whenever the block was first drafted. Fix it if stale.OK. GPM runs no composer install; the zip is the install. php ~/.claude/skills/grav-release/scripts/check-vendor.php . HEAD (after the release commit; before it, git add -A and pass $(git write-tree) as the ref). It archives the ref and fails on: a locked non-dev package not shipped, any require-dev package committed, installed.php 'dev' => true, an autoloader entry pointing at missing library code, or vendor/autoload.php required but not shipped. Fixes: rebuild with composer install --no-dev; a build-time dependency that another required plugin ships at runtime and replace can't cover (kahunacart-newsletters' db-kit, which Strauss must see to rename into KahunaCart's copy) goes in composer.json "extra": {"grav-release": {"provided-by": {"getgrav/grav-db-kit": "kahunacart"}}}, and the checker accepts it only when blueprints.yaml lists that plugin under dependencies; anything Grav core (or a required plugin) provides goes in composer "replace": {"psr/log": "*"}, never Strauss exclusions or suggest (exception: a dependency that needs a different major than core ships, like grav-plugin-github's psr/log 1.x); Andy's global ~/.gitignore ignores log/, so a bundled .../log/ dir needs a negation in the repo's .gitignore. Never tag a plugin that fails this check.tests/ or test/, phpunit.xml(.dist), a PHPUnit cache or .github/, and warns on paths that are usually development-only but that some plugins read at run time. The fix is the repo's .gitattributes (see "Keep development files out of the zip" below), added in this release's commit, so every plugin gets fixed on its next release rather than in a sweep of commits nobody tags.gh run list --limit 1), or run the repo's whole suite locally, one suite at a time across all sessions. Run it again after the version bump when nothing else changed. A bump alone can trip a test that reads blueprints.yaml, as in KahunaCart 1.3.9, where a test wanted every paywall template stamped with the current version. A handful of filtered tests is not enough.GPM installs the archive of the tag (GitHub's zipball, which is git archive), so whatever the archive exports is what every site downloads. A no-dev vendor/ keeps PHPUnit out, but the plugin's own tests/, phpunit.xml, .github/ and the like still ship unless the repo says otherwise. A CI job that runs composer install --no-dev doesn't help: nothing a workflow builds reaches GPM.
The fix is a .gitattributes at the repo root. Every plugin gets the standard block:
# Development files stay out of the release zip (GPM installs git archive of the tag)
/tests export-ignore
/test export-ignore
/phpunit.xml export-ignore
/phpunit.xml.dist export-ignore
/.phpunit.cache export-ignore
/.phpunit.result.cache export-ignore
/.github export-ignore
/.gitignore export-ignore
/.gitattributes export-ignore
Then look at whatever the checker still warns about and add a line for each path the plugin never reads at run time. These are decided per repo, never by default:
/docs, /tools, /bin: usually generator scripts and developer docs, but check first (grep the plugin's PHP, CLI and templates for the path; some plugins serve docs or feed them to MCP/llms output)./package.json, /package-lock.json, and source folders that are built into shipped assets (/desk-src, /admin-src, …): export-ignore them when the built output is committed./node_modules: keep it when the plugin loads from it (grav-plugin-presentation loads reveal.js, axios and js-base64 from there).host/ recipes and seed/, KahunaCart's classes/Testing harness and scaffold templates under classes/./crowdin.yml.Rules:
export-ignore only affects archives made after the commit, so a tag cut before it still ships everything. On Path A the .gitattributes goes into the release/X.Y.Z commit with the version bump; on Path B it has to be committed and pushed on the line branch first.export-ignore only affects archives; the files stay in the repo.OK, and every remaining WARN about development paths should be something the plugin really reads.develop? → Path A: git-flow. (standard stable plugins: tntsearch, etc.)1.4.0, an older Grav maintenance line like 1.7)? → Path B: tag-only. No merges. (Grav core's current 2.0.x stable is the exception — it's git-flow on master; see Grav core specifics.)Mark the GitHub release as --prerelease if any of:
blueprints.yaml has testing: true-rc. or -beta. (e.g. 1.4.0-rc.8, 2.0.0-beta.5)GRAV_VERSION in system/defines.php is an rc/beta (core has no blueprints.yaml)Otherwise it's a normal (latest) release — omit --prerelease.
A full, stable release can still need to stay off the releases/latest pointer — e.g. a security backport to an older maintenance line (1.7.53.4 while 2.x is current). This is not a prerelease (GRAV_VERSION/version is stable, not -rc./-beta.), so don't use --prerelease — the notes wouldn't match and GPM's ?stable=1 feed would wrongly drop it. Instead pass --latest=false to gh release create, which publishes a normal, non-draft, stable release without moving releases/latest. GitHub also won't auto-promote it when a higher-semver tag (2.2.0) already exists, but --latest=false makes it explicit and safe regardless. Verify afterward with gh api repos/getgrav/grav/releases/latest -q .tag_name — it should still return the newest line's tag, not the backport.
Per Andy's global git rules: never add Co-Authored-By: or any AI-assistant coauthor trailer. Commits are solely his.
develop)The version-prep edits (code fix, blueprints.yaml bump, CHANGELOG.md block) may be uncommitted on develop or already committed. This produces the canonical graph: a release/X.Y.Z branch merged --no-ff into master, tagged there, then the tag merged back into develop.
cd ~/Projects/grav/grav-plugin-<name>
# carries any uncommitted release-prep edits onto the release branch
git checkout -b release/<version>
git add -A
git commit -m "<short description of the release changes>" # e.g. "PHP 8.4 deprecations"
# merge into master and tag THERE (master holds the stable line)
git checkout master
git merge --no-ff release/<version> -m "Merge branch 'release/<version>'"
git tag <version>
# back-merge the tag into develop so develop carries the release commit
git checkout develop
git merge --no-ff <version> -m "Merge tag '<version>' into develop"
git branch -d release/<version>
# push everything
git push origin master develop
git push origin <version>
Merge-commit message style matches existing history: Merge branch 'release/X.Y.Z' and Merge tag 'X.Y.Z' into develop.
Then create the GitHub release (Path A/B share this — see "Create the GitHub release").
1.4.0 / 1.7)These lines (e.g. flex-objects 1.4.0, an older Grav maintenance line like 1.7) are not git-flow. The branch is the release line. The changelog + version are already committed and the branch is already pushed. You just tag the branch HEAD and publish — no master/develop merges.
cd ~/Projects/grav/grav-plugin-<name> # or the Grav core repo
git status --short # clean
git log --oneline @{u}..HEAD # should be empty — branch already pushed
git tag <version> # e.g. 1.4.0-rc.8
git push origin <version>
Then create the GitHub release with --target <branch> (the release branch name).
Release notes come from the top block of CHANGELOG.md (the block for this version). Convert its bullets into the release body, grouped by #new / #improved / #bugfix.
gh release create <version> \
--repo <org>/grav-plugin-<name> \
--title "<version>" \ # bare numeric — NO v
--target <branch> \ # master for Path A (incl. Grav core 2.0.x); the release branch (1.4.0 / 1.7) for Path B
[--prerelease] \ # include per the prerelease decision above
--notes "### New
- ...
### Bugfix
- ..."
--target matters: Path A targets master; Path B targets the release branch.
gh release view <version> --repo <org>/grav-plugin-<name> \
--json tagName,name,isPrerelease,isDraft,targetCommitish
Confirm: name is bare numeric, isDraft:false, and isPrerelease matches the decision. For git-flow, also confirm the graph: master at Merge branch 'release/X.Y.Z' (tagged), develop at Merge tag 'X.Y.Z' into develop.
system/defines.php as GRAV_VERSION, not blueprints.yaml.master — Path A, exactly like a plugin (release branch off develop → merge --no-ff into master → tag there → back-merge the tag into develop). Confirm by checking how the previous tag was cut: git log --oneline master..develop shows the prior Merge branch 'release/X' / Merge tag 'X' into develop pair when it's git-flow.2.0 is NOT the release branch — it's the old beta/rc channel branch and now sits stale, well behind develop. Ignore it for 2.0.x stable releases; target master.1.7 branch and publish with --target 1.7 — no master/develop merges. The branch name matches the line (1.7, 1.6, …).GRAV_VERSION is an rc/beta.blueprints.yaml dependencies/grav: constraint) — if a plugin RC needs an unreleased core RC, the core has to ship first or the dependency won't resolve in GPM.user/plugins/<name> in a test site may be a symlink to the source repo (release there) or a GPM-installed copy (read-only — not releasable; find its real repo under ~/Projects/grav/).--prerelease for the -rc./-beta./testing:true lines, so it stays off the ?stable=1 feed.git push is blocked by the sandbox, retry the push with the sandbox disabled — pushing is an explicitly authorized step of a release.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
grav-release, git-flow, release-management, grav-plugin, grav-core
Other plugins' skills for the same job
npx claudepluginhub getgrav/grav-skills --plugin grav-skills9 skills in this plugin
/grav-2-migrationUse when migrating an existing Grav 1.7/1.8 site to Grav 2.0 by hand — the agent-driven equivalent of what the `migrate-grav` plugin's wizard does, for sites where core is swapped in place (git checkout, deploy pipeline, rsync) rather than staged in a subdirectory and promoted. Covers the whole sequence: preflight and a restore point, swapping core, bringing plugins/themes to their 2.0 releases and replacing classic `admin` with `admin2` + `api`, translating classic `admin.*` account and group permissions into the `api.*` set 2.0 actually enforces (including the `api.access` gate no 1.x permission corresponds to), reopening the `security.twig_content` gates and seeding `security.twig_sandbox` allowlists from the site's own content, `system.images.url_actions`, the GFM `tagfilter`, and verifying the result. Trigger when the user says "migrate this site to Grav 2", "upgrade my 1.7 site to 2.0", asks to do what migrate-grav does without running the plugin, or asks why Twig in content, image resizing, raw HTML, or a user's permissions broke after moving to Grav 2.0./grav-admin-ui-polishUse when reviewing, auditing or polishing the admin UI of a Grav 2.0 plugin that renders inside Admin Next (admin2) — a plugin page in component mode, an add-on section, a dashboard widget, a custom field, or a blueprint settings form. Covers the review method (walk both themes plus a tablet width via the same-origin iframe trick, read-only, demo rows injected client-side when the seed is empty, then one code-side consistency pass against the host's own tokens), the ten design rules that repeat across every view (status registry instead of raw enums, the zero-value rule, one primary per screen with destructive neutral at rest, one entry point per row with a ⋯ menu, collapsed creation forms, effective state instead of stored flags, one date and number format, counts for the whole result set, prose into `<details>`, every "see X" a link, every editor a route with a dirty guard, sub-nav groups, empty states with a CTA), host fit against Admin Next's `--background/--muted/--border/--input/--ring/--success/--warning/--destructive` custom properties and its badge/button/card/table/tabs/segmented/input conventions, the `--kc-*`-style token block and constructable-stylesheet pattern, the primitives a plugin admin needs (`status()`, `rowActions()`, `emptyState()`, `.table-scroll`, route + dirty-guard helpers, formatting helpers), the `ctx.ui` / `ctx.sheet` / `ctx.route` / `ctx.navigate` / `ctx.setTitle` contract an add-on section is handed, blueprint label and help-text rules, a twelve-item rendering-defect checklist, and the host/API limitations to plan around. Trigger when the user says "review the admin UI", "polish this plugin page", "make it feel native", "make it look premium", "bring it in line with KahunaCart", or mentions Admin Next, admin2, plugin page, kc-view, web component admin UI, blueprint labels/help, status pills, dark mode contrast, rendering defects, or a UI review of a Kahuna add-on (subscriptions, licenses, payment providers)./grav-api-admin-next-integrationUse when integrating a Grav 2.0 plugin with Admin Next (the new SvelteKit SPA admin) and the API plugin. Covers all integration points: API endpoints (`onApiRegisterRoutes`), sidebar items, menubar/toolbar buttons, floating widgets, modal dialogs (`window.__GRAV_DIALOGS.form()`/`.open()` and the page-creation deep link), plugin pages (blueprint and component modes), custom field types, custom reports, blueprint modifications, permissions, languages, and config exposure to web components. Trigger when migrating an admin-classic plugin to Admin Next, when adding any Admin Next UI to a plugin, when working under `user/plugins/<plugin>/admin-next/` or on event handlers prefixed `onApi*`, or when the user mentions admin-next, custom field type, sidebar nav, floating widget, modal dialog, plugin page, custom report, or any of the `onApi*` events. Use the lighter `grav-api-integration` skill instead if the plugin only needs API endpoints with no admin UI./grav-api-integrationUse when adding REST API endpoints to a Grav 2.0 plugin via the first-party Grav API plugin. Covers controller setup extending AbstractApiController, route registration via `onApiRegisterRoutes`, permission checks, response helpers, exceptions, and curl-based testing. Trigger when working under `user/plugins/<plugin>/` on code that exposes plugin functionality as HTTP endpoints, or when the user mentions Grav API, AbstractApiController, ApiResponse, or onApiRegisterRoutes. Use the broader `grav-api-admin-next-integration` skill instead if the plugin also needs custom Admin Next UI (sidebar, menubar, fields, pages, widgets, panels, reports)./grav-inbox-triageUse for Andy's daily sweep of his GitHub notifications on the Grav org (getgrav/*): issues, pull requests, discussions and mentions. Trigger on "do my inbox", "triage my notifications", "daily inbox", "clear my github inbox", or a request to work through getgrav issues and PRs. Runs end to end without check-ins: reproduces each bug on a local reeve install, fixes it on the repo that actually owns the code (often not where it was filed), verifies the fix, merges contributor PRs with corrections applied on top, commits and pushes to develop with a CHANGELOG bullet, posts a short reply, closes the issue, and marks the notification done. Only items that need a decision from Andy (product or design calls, behavior or interface changes, releases, anything that couldn't be verified) stop and wait. Security advisories are left for the weekly grav-security-advisories run./grav-plugin-reviewUse when reviewing a third-party Grav 2.0 / Admin2 plugin for compatibility and security, especially a GPM (`getgrav/grav` `[add-resource]`) submission. Covers the review method (clone, map, cross-check against the real api/admin2/login plugins in the workspace), the verified API/Admin2 integration contract (which `onApi*` events exist, `AbstractApiController` shape, public-route mechanism, component-page convention, settings-panel secret-leak vector), and a findings taxonomy with concrete fixes: manifest/GPM correctness, auth granularity, secret handling, unauthenticated public writes, CSV/mail-header injection, XSS escaping, path traversal in file-serving, SVG upload, open proxies, pure-PHP SSE worker exhaustion, CSRF, message/identity spoofing, account mass-assignment, plus citizen-behavior and author-branding-in-defaults smells. Also covers how to produce a paste-ready, file:line-referenced handoff. Trigger when the user asks to review/vet/audit a Grav plugin, asks about a GPM submission, links a `grav-plugin-*` repo for review, or mentions checking a plugin for Grav 2.0 / Admin2 compatibility.