Publish safely - check what is actually tracked for secrets and personal data, confirm the commit identity and the licence, push one named ref as its own command, and read the remote back. Use before any push, publish, deploy, package upload, repository creation or visibility change, when the user says "push", "ship it", "publish", "release", "deploy", "make it public", "open-source this", and before asking the owner whether something may go out.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Release?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/mohamedbechirkefi-release)
---
name: release
description: Publish safely - check what is actually tracked for secrets and personal data, confirm the commit identity and the licence, push one named ref as its own command, and read the remote back. Use before any push, publish, deploy, package upload, repository creation or visibility change, when the user says "push", "ship it", "publish", "release", "deploy", "make it public", "open-source this", and before asking the owner whether something may go out.
---
# Release
Publishing is the least reversible thing most projects do. A pushed secret is leaked
even if it is deleted a minute later; a public branch may be cloned or indexed before
you notice. So the order here is fixed: check, ask, push one thing, read it back.
## 1. Know exactly what would go out
```
mandatum release-check
```
It scans the files git tracks (not the working tree) for e-mail addresses, home
directory paths, tokens and keys, tracked environment files and oversized files, and
checks that the tree is clean, the branch is the release branch, and the git identity
and the author and committer of every commit about to be published are the configured
ones. The branch and identity checks run only when `release.branch` and
`release.identity` are set in `.mandatum/config.json`; set them before relying on a
pass. Its last line is `RELEASE-CHECK PASS` or `RELEASE-CHECK FAIL`. Fix every failure;
do not argue with it.
Then look yourself, because the scan only knows patterns:
- `git ls-files` for anything that should not be there. A file listed in `.gitignore`
is still published if it was committed before the rule existed.
- `git log origin/<branch>..<branch> --stat` for what the push adds, including history.
A secret removed in the latest commit is still in the earlier one.
- For a first publication, clone into a scratch directory and read what a stranger
would get.
## 2. Identity and licence
- The author and committer of every unpushed commit must be the identity in the charter
and in `release.identity`. Check before the first commit, not after. Never rewrite
history that is already public to repair an author; ask the owner.
- The licence is the owner's choice. Never assume a permissive one, and never add or
change a licence file on your own initiative. Check that third-party material in the
tree is compatible with it and credited.
- Check every public claim in the README or page has a row in `.mandatum/CLAIMS.md`.
## 3. Ask, precisely
Publishing is the PUBLIC gate. Before the first push of a piece of work, tell the owner
exactly what will happen: repository, branch, visibility, commit range, and anything the
checks flagged. Record the request with `mandatum gate PUBLIC "<exact action>"` if they
are not there to answer.
An approval covers what was described. A later push of different commits is a new ask,
unless the owner has set a standing grant (`/mandatum:grant`), which only they can do.
## 4. Push one named ref, alone
```
git push origin main:main
```
- **Name both sides.** `git push`, `git push origin HEAD` and `HEAD:main` push whatever
happens to be checked out. After a failed checkout in a chain, that has published the
wrong branch.
- **Its own command.** No `commit && push`, no push inside a loop or a script. If an
earlier step fails, the push must not be standing behind it. Reading the result
(`| tail`, a following `git status`) is fine.
- **One repository per command.** Several repositories means several asks.
- **Never force-push a shared branch** without the owner's explicit word for that push.
The gate hook refuses unnamed, chained and looped pushes. If it refuses, fix the command.
Do not look for a form it does not recognise; that would defeat the reason it exists.
## 5. Read it back
A push that printed success is not yet verified. Compare the remote head with the local:
```
git rev-parse main
git ls-remote origin refs/heads/main
```
For a deployed site or a package, load the public URL or install from the registry and
check the version. Report the hash or URL you saw.
## 6. Record
Update the gate ledger with the owner's answer and the date, add a decision for a first
publication or a licence choice, and put what was published (hash, URL) in the handoff.
## If something went out that should not have
Stop pushing. Tell the owner immediately and plainly: what, where, since when. Rotate any
exposed credential first; removal from history comes second and does not undo exposure.
Log it in `.mandatum/INCIDENTS.md`. Do not quietly repair it and move on.