$npx -y skills add prompt-security/clawsec --skill claw-releaseRelease automation for Claw skills and website. Guides through version bumping, tagging, and release verification.
| 1 | # Claw Release |
| 2 | |
| 3 | Internal tool for releasing skills and managing the ClawSec catalog. |
| 4 | |
| 5 | **An internal tool by [Prompt Security](https://prompt.security)** |
| 6 | |
| 7 | --- |
| 8 | |
| 9 | ## Vercel Skills Installation |
| 10 | |
| 11 | Install with the Vercel Skills CLI for this harness: |
| 12 | |
| 13 | ```bash |
| 14 | npx skills add prompt-security/clawsec --skill claw-release -a openclaw -y |
| 15 | ``` |
| 16 | |
| 17 | ## Operational Notes |
| 18 | |
| 19 | - Internal maintainer workflow only. |
| 20 | - Required runtime: `bash`, `git`, `jq`, `gh` |
| 21 | - Required credentials: authenticated GitHub CLI with permission to create releases |
| 22 | - Side effects: creates commits, tags, pushes to remote, and publishes GitHub Releases |
| 23 | - Trust model: run only from a trusted checkout with a clean working tree and maintainer approval |
| 24 | |
| 25 | ## Release Artifact Verification |
| 26 | |
| 27 | For standalone installs, verify the signed release manifest before trusting `SKILL.md`, `skill.json`, or the archive. The `skill.json` file is the package metadata/SBOM source, and the release pipeline signs `checksums.json` with the ClawSec release key. |
| 28 | |
| 29 | ```bash |
| 30 | set -euo pipefail |
| 31 | |
| 32 | SKILL_NAME="claw-release" |
| 33 | VERSION="0.0.4" |
| 34 | REPO="prompt-security/clawsec" |
| 35 | TAG="${SKILL_NAME}-v${VERSION}" |
| 36 | BASE="https://github.com/${REPO}/releases/download/${TAG}" |
| 37 | ZIP_NAME="${SKILL_NAME}-v${VERSION}.zip" |
| 38 | TMP_DIR="$(mktemp -d)" |
| 39 | trap 'rm -rf "$TMP_DIR"' EXIT |
| 40 | |
| 41 | RELEASE_PUBKEY_SHA256="711424e4535f84093fefb024cd1ca4ec87439e53907b305b79a631d5befba9c8" |
| 42 | |
| 43 | curl -fsSL "$BASE/checksums.json" -o "$TMP_DIR/checksums.json" |
| 44 | curl -fsSL "$BASE/checksums.sig" -o "$TMP_DIR/checksums.sig" |
| 45 | curl -fsSL "$BASE/signing-public.pem" -o "$TMP_DIR/signing-public.pem" |
| 46 | curl -fsSL "$BASE/$ZIP_NAME" -o "$TMP_DIR/$ZIP_NAME" |
| 47 | curl -fsSL "$BASE/SKILL.md" -o "$TMP_DIR/SKILL.md" |
| 48 | curl -fsSL "$BASE/skill.json" -o "$TMP_DIR/skill.json" |
| 49 | |
| 50 | ACTUAL_PUBKEY_SHA256="$(openssl pkey -pubin -in "$TMP_DIR/signing-public.pem" -outform DER | shasum -a 256 | awk '{print $1}')" |
| 51 | if [ "$ACTUAL_PUBKEY_SHA256" != "$RELEASE_PUBKEY_SHA256" ]; then |
| 52 | echo "ERROR: signing-public.pem fingerprint mismatch" >&2 |
| 53 | exit 1 |
| 54 | fi |
| 55 | |
| 56 | openssl base64 -d -A -in "$TMP_DIR/checksums.sig" -out "$TMP_DIR/checksums.sig.bin" |
| 57 | openssl pkeyutl -verify -rawin -pubin \ |
| 58 | -inkey "$TMP_DIR/signing-public.pem" \ |
| 59 | -sigfile "$TMP_DIR/checksums.sig.bin" \ |
| 60 | -in "$TMP_DIR/checksums.json" >/dev/null |
| 61 | |
| 62 | hash_file() { |
| 63 | if command -v shasum >/dev/null 2>&1; then |
| 64 | shasum -a 256 "$1" | awk '{print $1}' |
| 65 | else |
| 66 | sha256sum "$1" | awk '{print $1}' |
| 67 | fi |
| 68 | } |
| 69 | |
| 70 | verify_manifest_file() { |
| 71 | asset="$1" |
| 72 | path="$2" |
| 73 | expected="$(jq -r --arg asset "$asset" '.files[$asset].sha256 // empty' "$TMP_DIR/checksums.json")" |
| 74 | if [ -z "$expected" ]; then |
| 75 | echo "ERROR: checksums.json missing $asset" >&2 |
| 76 | exit 1 |
| 77 | fi |
| 78 | actual="$(hash_file "$path")" |
| 79 | if [ "$actual" != "$expected" ]; then |
| 80 | echo "ERROR: checksum mismatch for $asset" >&2 |
| 81 | exit 1 |
| 82 | fi |
| 83 | } |
| 84 | |
| 85 | expected_archive="$(jq -r '.archive.sha256 // empty' "$TMP_DIR/checksums.json")" |
| 86 | if [ -z "$expected_archive" ]; then |
| 87 | echo "ERROR: checksums.json missing archive.sha256" >&2 |
| 88 | exit 1 |
| 89 | fi |
| 90 | actual_archive="$(hash_file "$TMP_DIR/$ZIP_NAME")" |
| 91 | if [ "$actual_archive" != "$expected_archive" ]; then |
| 92 | echo "ERROR: archive checksum mismatch" >&2 |
| 93 | exit 1 |
| 94 | fi |
| 95 | |
| 96 | verify_manifest_file "SKILL.md" "$TMP_DIR/SKILL.md" |
| 97 | verify_manifest_file "skill.json" "$TMP_DIR/skill.json" |
| 98 | |
| 99 | echo "Signed release manifest, archive, SKILL.md, and skill.json verified." |
| 100 | ``` |
| 101 | |
| 102 | Only install or extract the archive after this verification succeeds. |
| 103 | |
| 104 | ## Quick Reference |
| 105 | |
| 106 | | Release Type | Command | Tag Format | |
| 107 | |-------------|---------|------------| |
| 108 | | Skill release | `./scripts/release-skill.sh <name> <version>` | `<name>-v<version>` | |
| 109 | | Pre-release | `./scripts/release-skill.sh <name> 1.0.0-beta1` | `<name>-v1.0.0-beta1` | |
| 110 | |
| 111 | --- |
| 112 | |
| 113 | ## Release Workflow |
| 114 | |
| 115 | ### Step 1: Determine Version Type |
| 116 | |
| 117 | Ask what changed: |
| 118 | - **Bug fixes only** → Patch (1.0.0 → 1.0.1) |
| 119 | - **New features, backward compatible** → Minor (1.0.0 → 1.1.0) |
| 120 | - **Breaking changes** → Major (1.0.0 → 2.0.0) |
| 121 | - **Testing/unstable** → Pre-release (1.0.0-beta1, 1.0.0-rc1) |
| 122 | |
| 123 | ### Step 2: Pre-flight Checks |
| 124 | |
| 125 | ```bash |
| 126 | # Check for uncommitted changes |
| 127 | git status |
| 128 | |
| 129 | # Verify skill directory exists |
| 130 | ls skills/<skill-name>/skill.json |
| 131 | |
| 132 | # Get current version |
| 133 | jq -r '.version' skills/<skill-name>/skill.json |
| 134 | ``` |
| 135 | |
| 136 | ### Step 3: Run Release Script |
| 137 | |
| 138 | ```bash |
| 139 | ./scripts/release-skill.sh <skill-name> <new-version> |
| 140 | ``` |
| 141 | |
| 142 | The script will: |
| 143 | 1. Validate version format (semver) |
| 144 | 2. Check tag doesn't already exist |
| 145 | 3. Update skill.json version |
| 146 | 4. Update SKILL.md frontmatter version (if file exists) |
| 147 | 5. Update hardcoded version URLs (feed_url) |
| 148 | 6. Commit changes |
| 149 | 7. Create annotated git tag |
| 150 | |
| 151 | ### Step 4: Push Release |
| 152 | |
| 153 | ```bash |
| 154 | git push && git push o |