agentleFS
jessepinkman9900jessepinkman9900/claude-second-brain/.claude/skills/package-release/SKILL.md

package-release

Skill46 starsChanged 7 months agoMITView on GitHub

Bump the claude-second-brain npm package version and open a release PR. Analyzes changes vs main, suggests a semver bump, updates package.json, commits, pushes, and opens the PR. Does NOT touch docs — for a full release including docs + ship log, use /release. Trigger phrases: /package-release, bump the npm version, bump the package version, open a package release PR.

  • Commits and pushes

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run each step in order. Stop and report if any step fails.

    line 33
  2. Distinctive:

    Run these commands to understand what's changed:

    line 37
  3. Very specific:

    Read the current version from package.json.

    line 79
  4. Very specific:

    Use the Edit tool to update the "version" field in package.json to the new version.

    line 97
  5. Distinctive:

    Create a PR targeting main.

    line 121
  6. Distinctive:

    After the PR is created, tell the user:

    line 149

“Common” is measured: kept by at least 6 in 10 of the 6 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

/package-release

Bumps the npm package version and opens a release PR for claude-second-brain. Does not publish to npm directly — publishing happens automatically via GitHub Actions after the PR is merged.

This skill only touches package.json. If you also want the docs ship log updated in the same PR, run /release instead — it orchestrates /update-docs and this skill together.

When to use

  • You've already synced docs (or don't need to) and just want to cut a version.
  • The current branch must have commits relative to main.
  • For the full combined flow (docs + version), prefer /release.

Argument

Pass a version bump type to skip the confirmation prompt:

ArgumentEffect
(none)Analyze changes and suggest a bump; ask user to confirm
patchBump patch version (e.g. 0.1.0 → 0.1.1)
minorBump minor version (e.g. 0.1.0 → 0.2.0)
majorBump major version (e.g. 0.1.0 → 1.0.0)
0.3.0Use this exact version

Steps

Run each step in order. Stop and report if any step fails.

Step 1 — Capture current state

Run these commands to understand what's changed:

# Current branch
git branch --show-current

# Commits on this branch not yet in main
git log main..HEAD --oneline

# File-level diff summary vs main
git diff main...HEAD --stat

# Current version
cat package.json | grep '"version"'

Record: the branch name, current version, list of commits, and all files changed.

Step 2 — Summarize changes

Categorize all changes from Step 1 into this format:

## Changes in this release

**New features:**
- (e.g. new skill added, new CLI flag, new template file)

**Bug fixes:**
- (e.g. correctness fix in bin/create.ts, template fix)

**Refactors / cleanup:**
- (e.g. code reorganization, no behavior change)

**Docs:**
- (e.g. README updates, CLAUDE.md edits)

Show this changelog to the user. Skip empty categories.

Step 3 — Determine version bump

Read the current version from package.json. Apply semver logic to suggest the next version:

SignalBump
Changes to CLI interface, template structure that would break existing vaults, or commits containing "breaking"major
New skills added, new CLI flags, new template sections, or new behaviorminor
Bug fixes, docs, refactors onlypatch

State clearly:

  • Current version: X.Y.Z
  • Suggested next version: A.B.C (reason)

If the user passed an argument (/package-release patch, /package-release 0.2.0, etc.), use that directly and skip asking.

If no argument, ask the user to confirm the suggested version before continuing. Do not proceed to Step 4 until confirmed.

Step 4 — Update package.json

Use the Edit tool to update the "version" field in package.json to the new version. Do not reformat the file.

Verify:

cat package.json | grep '"version"'

Step 5 — Commit the version bump

git add package.json
git commit -m "chore: bump version to X.Y.Z"

Replace X.Y.Z with the confirmed new version.

Step 6 — Push and open PR

Push the current branch:

git push origin HEAD

Create a PR targeting main. Use the changelog from Step 2 in the body:

gh pr create \
  --title "release: vX.Y.Z" \
  --body "$(cat <<'EOF'
## Release vX.Y.Z

### Changes

[changelog from Step 2]

### What happens after merge

1. GitHub Action creates tag `vX.Y.Z` and a GitHub Release with auto-generated notes
2. GitHub Action publishes `claude-second-brain@X.Y.Z` to npm automatically

### Checklist

- [ ] Changelog accurately reflects all changes
- [ ] `package.json` version is correct
EOF
)" \
  --base main

Step 7 — Report to user

After the PR is created, tell the user:

PR opened: [url]

Pipeline after merge:

  1. release-publish.yml creates tag vX.Y.Z, a GitHub Release, and publishes claude-second-brain@X.Y.Z to npm

To verify after merge: https://www.npmjs.com/package/claude-second-brain

What can go wrong

  • gh not authenticated — run gh auth login first
  • Nothing to release — git log main..HEAD is empty; make sure you're on the right branch
  • Merge conflicts with main — rebase on main before running /package-release
  • Pack-test version mismatch — Step 5 handles this; the grep verify confirms it

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.