一键导入
release-manager
Automate Blogr package releases: version bumping, CHANGELOG updates, tagging, and publishing to GitHub.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Automate Blogr package releases: version bumping, CHANGELOG updates, tagging, and publishing to GitHub.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Analyzes Git changes, proposes CHANGELOG.md entries (user validation required), creates atomic Conventional Commits, places work on a type-named branch (feat, fix, docs…), and proposes a GitHub Pull Request. Use when the user asks to commit changes, update the changelog, prepare a branch/PR, or finalize work with atomic commits.
Orchestrates the full cycle from a need or bug to pull request: GitHub issue creation, code analysis, development generation, then calls the git-changelog workflow for atomic commits and PR. Use when the user reports a bug, requests a feature, or describes a need without specifying the implementation steps.
Audits all quality axes of the Blogr package (tests, static analysis, code style, JS/CSS linting, CI, coverage, pre-commit hooks) and proposes one improvement at a time, validated by the human before execution. Use when starting a new development phase, after a sprint, or when the user asks to review or improve the project's quality infrastructure.
Apply a fix from a feature branch already merged to main when main has advanced. Use `git cherry-pick` to port a fix commit without rebasing the entire branch.
Detects and resolves Git merge conflicts typical of a Laravel package project with parallel feature branches. Covers conflicts on service providers, Filament Schema components, Translation-First models, and config files.
Runs a static OWASP Top 10 security audit on Blogr (Laravel 12.x, FilamentPHP v4, SQLite, blocks-based content, Translation-First). Covers only the five most critical categories: A01 access control, A02 cryptographic failures, A03 injection, A05 misconfiguration, A07 authentication failures. Use when the user asks for a security audit, OWASP review, vulnerability scan of package code, or to refresh SECURITY-AUDIT.md.
| name | release-manager |
| description | Automate Blogr package releases: version bumping, CHANGELOG updates, tagging, and publishing to GitHub. |
Trigger phrases: "release", "tag a new version", "publish vX.Y.Z", "cut a release", "bump version".
Before any release work, verify that no open PRs target main:
git fetch origin main
OPEN_PRS=$(gh pr list --base main --state open --json number,title --jq '.[] | "\(.number) \(.title)"')
If $OPEN_PRS is not empty, abort immediately and display:
## ⛔ Release blocked — open PRs detected
The following PRs must be merged into `main` before releasing:
| # | Title |
|---|-------|
| 12 | feat: ... |
| 14 | fix: ... |
Options:
1. Merge them now (`gh pr merge <number> --squash`)
2. Cancel the release and come back later
Do not proceed until all open PRs targeting main are merged.
This ensures the release captures the intended changes and avoids
accidental version bumps with unmerged work.
git log $(git describe --tags --abbrev=0)..HEAD --oneline --no-decorategit log --oneline --no-decorateRead current version from composer.json ("version": "0.x.y")
Ask user for bump type: patch, minor, major, or an explicit version like 0.19.0
Compute the new version using semver rules correctly:
| Current | patch (Z+1) | minor (Y+1, Z=0) | major (X+1, Y=Z=0) |
|---|---|---|---|
0.22.0 | 0.22.1 | 0.23.0 | 1.0.0 |
0.22.5 | 0.22.6 | 0.23.0 | 1.0.0 |
1.0.0 | 1.0.1 | 1.1.0 | 2.0.0 |
⚠️ Common mistake: patch is NOT 0.22.0 → 0.23.0 — that is a minor bump. Patch only increments the last digit.
Present the computed version to the user for confirmation
Run git status --short to list changed/new files
If there are no uncommitted changes, skip this step
If there are uncommitted changes, group files by feature area using path heuristics:
| Pattern | Suggested commit message |
|---|---|
src/Services/LocaleService*, src/Traits/ClearsLocaleCache*, src/Helpers/LocaleHelper*, view composer changes, route pattern changes in provider | feat: locale auto-detection with cache invalidation |
config/blogr.php (disabled keys), CmsPageController*, src/Models/CmsPage* (availableLocales) | feat: disabled locales return 404 on frontend |
src/Filament/Pages/BlogrSettings* | feat: redesign multilingual settings UI |
src/Filament/Resources/CmsPage*, CmsBlockBuilder* (non-import/export) | feat: per-translation CMS page editing |
resources/views/components/* (flag emojis) | feat: flag emojis in navigation and language-switcher |
resources/views/cms/pages/*, resources/views/layouts/* | feat: CMS content rendering |
src/Commands/*Import* | fix: CLI import delegates to CmsPageImportExportService |
INSTALL.md, storage/app/blogr-exports/* | docs: install guide and install page translations |
tests/* | test: add tests for new features (attach to relevant feature commit if possible, otherwise a single test commit) |
Heuristics:
chore: update configchore(deps): update dependenciesFor each group, stage and commit:
git add <file1> <file2> ...
git commit -m "<type>(<scope>): <description>"
question tool with a simple question like "Do you approve these release notes?" and options ["Yes, proceed", "No, cancel"].vendor/bin/pest --parallel (takes 4-5s)Tests: 56 skipped, 911 passed (2720 assertions)
composer.json: Edit the "version" fieldsrc/Blogr.php: Edit const VERSION = '...'git add composer.json src/Blogr.php
git commit -m "chore: bump version to v{version}"
Insert the new entry in correct semver descending order (highest version first), NOT at the top of the file.
Algorithm:
Read CHANGELOG.md and find all ## [vX.Y.Z] headers with their line numbers
Parse each version into (major, minor, patch) tuples
Compare the new version against existing versions:
[Unreleased] if present)Format the entry exactly as:
## [v{version}](https://github.com/happytodev/blogr/compare/v{version}...v{previous}) - {date}
### ✨ Features (or 🐛 Bug Fixes | ⬆️ Dependencies)
- **{title}**: {description}
[Unreleased] section at the topgit add CHANGELOG.md
git commit -m "docs(changelog): v{version}"
git fetch origin main to get the latest remote state.main matches origin/main:
if [ "$(git rev-parse HEAD)" != "$(git rev-parse origin/main)" ]; then
echo "⚠️ Local and remote main diverge. Run 'git pull --rebase origin main' first."
exit 1
fi
git pull --rebase origin main and git push origin main before proceeding.if git tag -l "v{version}" | grep -q . || git ls-remote --tags origin "refs/tags/v{version}" | grep -q .; then
echo "⚠️ Tag v{version} already exists. Create a new patch version instead."
exit 1
fi
git push origin main
git tag v{version}
# Verify tag points to HEAD:
if [ "$(git rev-parse v{version})" != "$(git rev-parse HEAD)" ]; then
echo "⚠️ Tag does not match HEAD. Delete and re-tag."
git tag -d v{version}
exit 1
fi
git push origin v{version}
➡ Push main BEFORE creating the tag. This prevents the tag from pointing to a stale commit after a rebase.
RELEASE_NOTES to the exact markdown the user approved in step 4 (the body of the CHANGELOG entry, without the heading/date line)gh release create v{version} --title "v{version}" --notes "$RELEASE_NOTES"