xonecas.io
6615
Yc

yoctoselect / commit 3d23d9b

feat: add release skill

xonecas2026-03-22 3d23d9b61eec18e013d010956010936642711f46 parent 46fdccb

1 file changed

.agents/skills/release/SKILL.md+31−0
@@ -0,0 +1,31 @@
1+---
2+name: release
3+description: Create a new tagged npm release (patch/minor/major)
4+---
5+
6+Create a new npm release for this repo. The bump type is: $1 (default to "patch" if not provided).
7+
8+Steps to follow exactly:
9+
10+1. Normalize bump type to one of `patch|minor|major`; if empty, use `patch`.
11+2. Verify git state before doing anything:
12+ - current branch must be `main`
13+ - working tree must be clean
14+ - run `git fetch origin --tags` and ensure `HEAD` equals `origin/main`
15+ If any check fails, stop and report.
16+3. Run the full repo check suit — stop and report failures.
17+4. Read `package.json` and capture both `name` and current `version`.
18+5. Compute the next semver version by bumping the selected part.
19+6. Guardrails before mutating files:
20+ - ensure git tag `v<new-version>` does not exist locally or on origin
21+ - ensure npm version does not already exist: `npm view <package-name>@<new-version> version`
22+ If either exists, stop and report.
23+7. Update the `version` field in `package.json` to `<new-version>`.
24+8. Commit all staged and unstaged changes with message: `chore: release v<new-version>`.
25+9. Create annotated tag: `git tag -a v<new-version> -m "<small-changelog>"`.
26+10. Push explicitly to main and the exact tag:
27+ - `git push origin main`
28+ - `git push origin v<new-version>`
29+11. Post-push verification: run `npm view <package-name>@<new-version> version`.
30+ - If it already exists, report that publish already happened and do **not** ask user to publish again.
31+ - If it does not exist, run `npm publish`.