agentleFS
daikitigogodaikitigogo/dtg-claude-plugins/.claude/skills/release-flow/SKILL.md

release-flow

Skill0 starsChanged 7 months agoMITView on GitHub

Drive the full dev→main release flow for release-please based monorepos. Use when the user says "リリースフローを進めて", "release flow", "dev を main に リリース", or otherwise asks to ship a release. Creates the dev→main PR, waits for CI, auto-merges with a merge commit, waits for release-please to open the Release PR, asks the user to approve, squash-merges on approval, waits for post-release jobs (build-and-commit / sync-dev), and syncs local dev. Assumes the project uses release-please with Conventional Commits.

  • Commits and pushes

5 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions5 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 5

    1. tw93/Mole★ 74ksame name
    2. jyje/hermes-agent-helm★ 17same name
    3. JarvusInnovations/agent-skills★ 1same name
    4. mavrovde/thekotlin.com★ 0same name
    5. pankaj-mahaur/Agent-Daemon★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 3 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before starting, scan the commits in dev vs main.

    line 30
  2. Distinctive:

    Check and stop if any condition fails (unless noted):

    line 34
  3. Very specific:

    No conflicting open dev→main PR that belongs to a different flow (reuse if it exists for this release).

    line 40
  4. Very specific:

    If an open PR from dev to main already exists, reuse it.

    line 44
  5. Very specific:

    If $CLOSES is empty, omit the ## Closes section.

    line 89
  6. Very specific:

    Use --merge, never --squash — release-please must see individual Conventional Commits on main.

    line 101
  7. Very specific:

    Do not delete dev (long-lived branch).

    line 107
  8. Distinctive:

    If no Release PR appears:

    line 118
  9. Distinctive:

    All commits were non-releasing prefixes → expected, inform and stop.

    line 119
  10. Very specific:

    If autorelease: pending is missing, ask the user before adding it (do not auto-edit without confirmation).

    line 140

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Release Flow

Drive the end-to-end release flow. Only one explicit user approval is required: merging the Release PR (CLAUDE.md mandates manual review). Everything else runs automatically after the pre-flight checks pass.

Release trigger conditions (Conventional Commits)

release-please routes commits to packages by scope and file path. The commit prefix determines the bump:

PrefixBumpExample
feat(scope):minorfeat(runnel): add agent
fix(scope):patchfix(silo): handle empty topic
feat(scope)!: / fix(scope)!: / BREAKING CHANGE: footermajor (minor while 0.x when bump-minor-pre-major: true is set)feat(runnel)!: rename skill prefix
chore: / docs: / refactor: / test: / style: / ci: / build: / perf:no release by defaultchore: bump deps

Scope MUST match a package component (e.g. runnel, silo) declared in release-please-config.json. Commits lacking matching scope or a file path under packages/<scope>/ will not trigger a release for that package.

Before starting, scan the commits in dev vs main. If none carry a release-triggering prefix (feat / fix / ! / BREAKING CHANGE), stop and tell the user no release will be generated.

Step 1: Pre-flight

Check and stop if any condition fails (unless noted):

  • Current branch is dev. If not, ask before switching.
  • Working tree is clean.
  • dev is ahead of origin/main (git fetch origin main && git log origin/main..dev --oneline --no-merges).
  • At least one commit has a release-triggering prefix.
  • No conflicting open dev→main PR that belongs to a different flow (reuse if it exists for this release).

Step 2: Create (or reuse) the dev→main PR

If an open PR from dev to main already exists, reuse it. Otherwise:

Step 2.1: Collect closing keywords from dev-only PRs

GitHub's auto-close only fires for closing keywords in the default branch merge PR body. Feature PRs carry Closes #N in their own body, but those never reach main directly. Aggregate them into the dev→main PR body so referenced issues auto-close on merge.

# Extract PR numbers from commits in origin/main..dev (merge commit "#NNN" and squash "(#NNN)")
PRS=$(git log origin/main..dev --oneline | grep -oE "#[0-9]+" | sort -u | tr -d '#')

# Pull closing keywords from each PR body and normalize to "Closes #N"
CLOSES=$(for pr in $PRS; do
  gh pr view "$pr" --json body --jq '.body' \
    | grep -oiE "(close[sd]?|fix(e[sd])?|resolve[sd]?) +#[0-9]+" \
    | grep -oE "#[0-9]+"
done | sort -u | sed 's/^/Closes /')

Inspect $CLOSES before embedding — exclude any issue that should stay open (e.g. tracking issues referenced informally).

Step 2.2: Create the PR

gh pr create --base main --head dev --title "release: dev → main" --body "$(cat <<EOF
## Summary

<one line per non-merge commit, grouped by package>

## Release Notes

<expected version bumps, or "no bumps expected">

## Closes

$CLOSES

## Test plan

- [x] dev CI green
- [ ] main PR CI green
- [ ] release-please Release PR generated
EOF
)"

If $CLOSES is empty, omit the ## Closes section.

Step 3: Wait for CI on the dev→main PR

gh pr checks <pr-number> --watch

On failure, stop and report — do not retry blindly.

Step 4: Merge the dev→main PR (merge commit)

Use --merge, never --squash — release-please must see individual Conventional Commits on main.

gh pr merge <pr-number> --merge

Do not delete dev (long-lived branch).

Step 5: Wait for release-please to open the Release PR

The Release workflow runs on push to main and (if releasable commits exist) opens a chore: release main PR.

gh run watch <release-workflow-run-id> --exit-status
gh pr list --base main --state open --label "autorelease: pending"

If no Release PR appears:

  • All commits were non-releasing prefixes → expected, inform and stop.
  • Otherwise → inspect the Release workflow logs and report.

Step 6: Present the Release PR and ask for approval (REQUIRED)

Show the PR title, body (CHANGELOG preview), and changed files. Explicitly ask the user to approve before merging. Never auto-merge even if CI is green — CLAUDE.md requires manual review.

gh pr view <release-pr-number> --json title,body,files

Step 6.1: Verify autorelease: pending label

The post-release workflow (tag generation / build-and-commit / sync-dev) uses the autorelease: pending label on the squash-merge commit to recognize it as a Release PR merge. Without this label, post-release jobs do not run and no tag / GitHub Release is generated.

release-please-action usually attaches the label when creating the Release PR, but it can silently fail (e.g. GitHub API errors resolving old PR global IDs). Verify before Step 7:

gh pr view <release-pr-number> --json labels --jq '.labels[].name'

If autorelease: pending is missing, ask the user before adding it (do not auto-edit without confirmation). On approval:

gh pr edit <release-pr-number> --add-label "autorelease: pending"
gh pr view <release-pr-number> --json labels --jq '.labels[].name'

Re-confirm the label is present before proceeding to Step 7.

Step 7: Merge the Release PR (squash)

After user approval:

gh pr merge <release-pr-number> --squash

Step 8: Wait for post-release jobs

The Release workflow runs again on the squash-merge commit and executes three jobs in sequence:

  1. release-please — creates tags + GitHub Releases
  2. build-and-commit — rebuilds dist/ and commits to main
  3. sync-dev — merges main → dev (opens a PR if conflicts arise)
gh run watch <workflow-run-id> --exit-status
gh run view <workflow-run-id> --json jobs --jq '.jobs[] | {name, conclusion}'

Confirm all three succeeded. If sync-dev opened a conflict PR instead of fast-forwarding, surface it to the user.

Step 9: Sync local dev

git checkout dev
git pull --ff-only origin dev

Final report

  • Released packages and versions (gh release list --limit 5)
  • Any follow-up PRs (sync-dev conflicts, etc.)
  • Local dev state

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.