Fresh clones are now fully self-contained / offline (no first-run fetch needed). Binaries (linux x64/arm64, darwin x64/arm64, win32 x64) tracked via LFS; verified against bin/checksums.txt. First-run release fetch kept as a no-lfs fallback. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1.5 KiB
Bundled ast-grep binaries
The skill ships a self-contained ast-grep binary per platform so it works with
no install step and offline. SKILL.md (Step 0) detects <os>-<arch> and runs
the matching binary; if it can't (rare arch, or macOS Gatekeeper / Windows
SmartScreen blocking an unsigned binary) it falls back to a PATH ast-grep, then to
LLM-heuristic detection.
Layout
bin/
├── linux-x64/ast-grep
├── linux-arm64/ast-grep
├── darwin-x64/ast-grep
├── darwin-arm64/ast-grep
└── win32-x64/ast-grep.exe
Populating / updating the binaries (packaging step)
These are not source; they are fetched at package time from the official releases (MIT-licensed): https://github.com/ast-grep/ast-grep/releases
For each platform, download the release archive, extract the ast-grep binary into
the matching bin/<os>-<arch>/ directory, and record its SHA-256 in checksums.txt.
Pin a single upstream version across all platforms (see VERSION).
Size note: the
ast-grepbinary is ~50 MB per platform (~250 MB total). The binaries are committed via Git LFS (.gitattributes), so a clone is fully self-contained and offline. After cloning, ensuregit lfsis installed and rungit lfs pullif the files are still pointers. As a fallback (no lfs),SKILL.mdStep 0 fetches the pinned release (VERSION) and verifies it againstchecksums.txt.
Verification
SKILL.md may verify a binary against checksums.txt before first use. Never run a
binary whose checksum does not match.