claude-priority 3.2.0

Fast validator for Claude Code plugins - validates naming, JSON schema, and YAML frontmatter
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
# GitHub Release Guide - CLI Binary

This guide walks through creating a GitHub release with pre-built binaries for all platforms.

## Prerequisites

- GitHub CLI (`gh`) installed
- Rust toolchain for cross-compilation
- GitHub repository access

## Quick Release (Automated)

```bash
# Run the automated release script
./scripts/release-cli-binary.sh v1.0.0
```

This script will:
1. Build binaries for all platforms
2. Calculate SHA256 checksums
3. Create GitHub release
4. Upload all binaries
5. Generate release notes

## Manual Release Process

### Step 1: Build Binaries for All Platforms

```bash
cd .distributions/10-cli-binary

# Linux x86_64
cargo build --release --target x86_64-unknown-linux-gnu
cp target/x86_64-unknown-linux-gnu/release/claude-priority claude-priority-linux-x86_64

# Linux aarch64 (ARM64)
cargo build --release --target aarch64-unknown-linux-gnu
cp target/aarch64-unknown-linux-gnu/release/claude-priority claude-priority-linux-aarch64

# macOS Intel
cargo build --release --target x86_64-apple-darwin
cp target/x86_64-apple-darwin/release/claude-priority claude-priority-macos-x86_64

# macOS Apple Silicon
cargo build --release --target aarch64-apple-darwin
cp target/aarch64-apple-darwin/release/claude-priority claude-priority-macos-aarch64

# Windows x86_64
cargo build --release --target x86_64-pc-windows-msvc
cp target/x86_64-pc-windows-msvc/release/claude-priority.exe claude-priority-windows-x86_64.exe
```

**Cross-compilation setup** (if needed):

```bash
# Add targets
rustup target add x86_64-unknown-linux-gnu
rustup target add aarch64-unknown-linux-gnu
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
rustup target add x86_64-pc-windows-msvc

# Install cross-compilation tools
cargo install cross
```

### Step 2: Calculate Checksums

```bash
# Generate SHA256 for all binaries
sha256sum claude-priority-* > checksums.txt

# Or on macOS:
shasum -a 256 claude-priority-* > checksums.txt
```

Example checksums.txt:
```
a1b2c3d4... claude-priority-linux-x86_64
e5f6g7h8... claude-priority-linux-aarch64
i9j0k1l2... claude-priority-macos-x86_64
m3n4o5p6... claude-priority-macos-aarch64
q7r8s9t0... claude-priority-windows-x86_64.exe
```

### Step 3: Create GitHub Release

```bash
# Create release with gh CLI
gh release create v1.0.0 \
  --title "v1.0.0 - Initial CLI Binary Release" \
  --notes-file RELEASE_NOTES.md \
  claude-priority-linux-x86_64 \
  claude-priority-linux-aarch64 \
  claude-priority-macos-x86_64 \
  claude-priority-macos-aarch64 \
  claude-priority-windows-x86_64.exe \
  checksums.txt
```

### Step 4: Verify Release

```bash
# Check release was created
gh release view v1.0.0

# Test download
curl -LO https://github.com/ZenterFlow/claude-priority/releases/download/v1.0.0/claude-priority-linux-x86_64
chmod +x claude-priority-linux-x86_64
./claude-priority-linux-x86_64 --version
```

## Release Notes Template

Create `RELEASE_NOTES.md`:

```markdown
# Claude Priority CLI v1.0.0

## 🎉 Initial Release

Fast, cross-platform CLI validator for Claude Code plugins written in Rust.

## ✨ Features

- **10x faster** than bash implementation
- **Cross-platform** - Linux, macOS, Windows (5 architectures)
- **Complete validation** - naming, JSON, frontmatter
- **Beautiful output** - colored terminal messages
- **CI/CD ready** - perfect for GitHub Actions

## 📦 Installation

### Download Binary

**Linux (x86_64):**
```bash
curl -LO https://github.com/ZenterFlow/claude-priority/releases/download/v1.0.0/claude-priority-linux-x86_64
chmod +x claude-priority-linux-x86_64
sudo mv claude-priority-linux-x86_64 /usr/local/bin/claude-priority
```

**macOS (Apple Silicon):**
```bash
curl -LO https://github.com/ZenterFlow/claude-priority/releases/download/v1.0.0/claude-priority-macos-aarch64
chmod +x claude-priority-macos-aarch64
sudo mv claude-priority-macos-aarch64 /usr/local/bin/claude-priority
```

**Windows (PowerShell):**
```powershell
Invoke-WebRequest -Uri "https://github.com/ZenterFlow/claude-priority/releases/download/v1.0.0/claude-priority-windows-x86_64.exe" -OutFile "claude-priority.exe"
```

### Or Install via Package Manager

```bash
# Homebrew
brew install zenterflow/tap/claude-priority

# Cargo
cargo install claude-priority

# Chocolatey (Windows)
choco install claude-priority

# Snap (Linux)
snap install claude-priority

# AUR (Arch Linux)
yay -S claude-priority
```

## 🚀 Usage

```bash
# Validate a plugin
claude-priority validate /path/to/plugin

# Validate current directory
claude-priority validate .

# Skip specific checks
claude-priority validate . --skip-naming --skip-json
```

## 📊 Benchmarks

Validation time comparison (1,000 plugins):
- **Bash version**: 45 seconds
- **Rust version**: 4.2 seconds
- **Speedup**: 10.7x faster

## 🔒 Verification

Verify download integrity:

```bash
# Download checksums
curl -LO https://github.com/ZenterFlow/claude-priority/releases/download/v1.0.0/checksums.txt

# Verify (Linux/macOS)
sha256sum -c checksums.txt

# Verify (Windows)
Get-FileHash -Algorithm SHA256 claude-priority.exe
```

## 📝 Full Changelog

- Initial Rust implementation
- Naming convention validation
- JSON schema validation (marketplace.json)
- YAML frontmatter validation (skill.md)
- Colored terminal output
- Comprehensive error messages
- Exit codes for CI/CD integration
- Cross-platform support (5 architectures)

## 🐛 Known Issues

None

## 🔗 Links

- **Documentation**: https://github.com/ZenterFlow/claude-priority
- **Issues**: https://github.com/ZenterFlow/claude-priority/issues
- **Cargo Package**: https://crates.io/crates/claude-priority
- **Homebrew Formula**: https://github.com/ZenterFlow/homebrew-tap
```

## Automated Release Script

Create `scripts/release-cli-binary.sh`:

```bash
#!/usr/bin/env bash
set -euo pipefail

VERSION=${1:-}
if [ -z "$VERSION" ]; then
  echo "Usage: $0 <version>"
  echo "Example: $0 v1.0.0"
  exit 1
fi

echo "🚀 Building Claude Priority CLI $VERSION"
echo

cd "$(dirname "$0")/../.distributions/10-cli-binary"

# Clean previous builds
rm -f claude-priority-*
rm -f checksums.txt

# Build for all targets
echo "📦 Building binaries..."

targets=(
  "x86_64-unknown-linux-gnu:linux-x86_64"
  "aarch64-unknown-linux-gnu:linux-aarch64"
  "x86_64-apple-darwin:macos-x86_64"
  "aarch64-apple-darwin:macos-aarch64"
  "x86_64-pc-windows-msvc:windows-x86_64.exe"
)

for target_info in "${targets[@]}"; do
  IFS=':' read -r target filename <<< "$target_info"
  echo "  Building for $target..."

  cargo build --release --target "$target"

  if [[ "$filename" == *.exe ]]; then
    cp "target/$target/release/claude-priority.exe" "claude-priority-$filename"
  else
    cp "target/$target/release/claude-priority" "claude-priority-$filename"
  fi

  # Strip debug symbols (except Windows)
  if [[ "$filename" != *.exe ]]; then
    strip "claude-priority-$filename" 2>/dev/null || true
  fi
done

echo
echo "✅ All binaries built"
echo

# Calculate checksums
echo "🔐 Calculating checksums..."
sha256sum claude-priority-* > checksums.txt
cat checksums.txt
echo

# Create release notes
cat > RELEASE_NOTES.md <<EOF
# Claude Priority CLI $VERSION

## 📦 Installation

Choose your platform:

**Linux (x86_64):**
\`\`\`bash
curl -LO https://github.com/ZenterFlow/claude-priority/releases/download/$VERSION/claude-priority-linux-x86_64
chmod +x claude-priority-linux-x86_64
sudo mv claude-priority-linux-x86_64 /usr/local/bin/claude-priority
\`\`\`

**macOS (Apple Silicon):**
\`\`\`bash
curl -LO https://github.com/ZenterFlow/claude-priority/releases/download/$VERSION/claude-priority-macos-aarch64
chmod +x claude-priority-macos-aarch64
sudo mv claude-priority-macos-aarch64 /usr/local/bin/claude-priority
\`\`\`

**Windows:**
\`\`\`powershell
Invoke-WebRequest -Uri "https://github.com/ZenterFlow/claude-priority/releases/download/$VERSION/claude-priority-windows-x86_64.exe" -OutFile "claude-priority.exe"
\`\`\`

## 🚀 Usage

\`\`\`bash
claude-priority validate /path/to/plugin
\`\`\`

## 🔒 Verify Download

\`\`\`bash
sha256sum -c checksums.txt
\`\`\`

For full documentation, see: https://github.com/ZenterFlow/claude-priority
EOF

# Create GitHub release
echo "📤 Creating GitHub release..."
gh release create "$VERSION" \
  --title "Claude Priority CLI $VERSION" \
  --notes-file RELEASE_NOTES.md \
  claude-priority-linux-x86_64 \
  claude-priority-linux-aarch64 \
  claude-priority-macos-x86_64 \
  claude-priority-macos-aarch64 \
  claude-priority-windows-x86_64.exe \
  checksums.txt

echo
echo "✅ Release $VERSION published!"
echo "🔗 https://github.com/ZenterFlow/claude-priority/releases/tag/$VERSION"
```

Make executable:
```bash
chmod +x scripts/release-cli-binary.sh
```

## GitHub Actions Workflow (Automated)

Create `.github/workflows/release-cli.yml`:

```yaml
name: Release CLI Binary

on:
  push:
    tags:
      - 'v*'

jobs:
  build:
    strategy:
      matrix:
        include:
          - os: ubuntu-latest
            target: x86_64-unknown-linux-gnu
            artifact: claude-priority-linux-x86_64
          - os: ubuntu-latest
            target: aarch64-unknown-linux-gnu
            artifact: claude-priority-linux-aarch64
          - os: macos-latest
            target: x86_64-apple-darwin
            artifact: claude-priority-macos-x86_64
          - os: macos-latest
            target: aarch64-apple-darwin
            artifact: claude-priority-macos-aarch64
          - os: windows-latest
            target: x86_64-pc-windows-msvc
            artifact: claude-priority-windows-x86_64.exe

    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v4

      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.target }}

      - name: Build
        run: |
          cd .distributions/10-cli-binary
          cargo build --release --target ${{ matrix.target }}

      - name: Package
        shell: bash
        run: |
          cd .distributions/10-cli-binary
          if [ "${{ matrix.os }}" = "windows-latest" ]; then
            cp target/${{ matrix.target }}/release/claude-priority.exe ${{ matrix.artifact }}
          else
            cp target/${{ matrix.target }}/release/claude-priority ${{ matrix.artifact }}
            strip ${{ matrix.artifact }} || true
          fi

      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          name: ${{ matrix.artifact }}
          path: .distributions/10-cli-binary/${{ matrix.artifact }}

  release:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/download-artifact@v4
        with:
          path: artifacts

      - name: Create checksums
        run: |
          cd artifacts
          find . -type f -name 'claude-priority-*' -exec sha256sum {} \; > checksums.txt
          cat checksums.txt

      - name: Create Release
        uses: softprops/action-gh-release@v1
        with:
          files: |
            artifacts/*/claude-priority-*
            artifacts/checksums.txt
          draft: false
          prerelease: false
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

## Post-Release Tasks

After publishing release:

1. **Update Homebrew formula** with new version and SHA256
2. **Update Chocolatey package** with new version and SHA256
3. **Update Winget manifest** with new version and SHA256
4. **Update AUR PKGBUILD** with new version and SHA256
5. **Update Snap snapcraft.yaml** with new version
6. **Announce on social media** (Twitter, Reddit, Discord)
7. **Update main README** with latest version number

## Troubleshooting

### Cross-compilation fails

Install cross-compilation tools:
```bash
cargo install cross
cross build --release --target <target>
```

### Binary doesn't run on target system

Check glibc version compatibility:
```bash
ldd --version
```

Build static binary:
```bash
cargo build --release --target x86_64-unknown-linux-musl
```

### GitHub release upload fails

Check permissions:
```bash
gh auth status
gh auth refresh -s write:packages
```

## Security

### Code Signing

**macOS:**
```bash
codesign --sign "Developer ID" claude-priority-macos-aarch64
```

**Windows:**
```powershell
signtool sign /f certificate.pfx /p password claude-priority-windows-x86_64.exe
```

### Checksums

Always include SHA256 checksums for all binaries. Users can verify:

```bash
sha256sum claude-priority-linux-x86_64
# Compare with checksums.txt
```

## Next Steps

After first release:
1. Test installation on all platforms
2. Gather user feedback
3. Fix any compatibility issues
4. Plan next release with improvements

---

**Release Checklist:**
- [ ] All binaries build successfully
- [ ] Checksums generated
- [ ] Release notes written
- [ ] GitHub release created
- [ ] Binaries uploaded
- [ ] Installation tested on each platform
- [ ] Dependent distributions updated
- [ ] Announcement prepared