feat: migrate 12 personal skills + add build/install scripts

- skills/: editable sources for all 12 personal skills (caveman family,
  find-skills, project-bootstrap, task-status-wiki, using-context7,
  using-markitdown, wiki-maintainer, compress)
- dist/: built .skill archives, committed (cross-machine deploy without
  needing zip on the target)
- scripts/build.sh + build.ps1: zip skills/<name>/ into dist/<name>.skill;
  Windows fallback uses .NET ZipArchive (PS 5.1 Compress-Archive writes
  backslashes that break extraction on *nix)
- scripts/install.sh: copy skills/<name>/ into ~/.claude/skills/<name>/
  ($CLAUDE_SKILLS_DIR overrides target)
- .wiki/source/repo-layout.md, build-notes.md: design + gotchas
- .gitignore: keep dist/ tracked

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-28 10:42:33 +03:00
parent 782a00d6b8
commit 9f54068de0
51 changed files with 3243 additions and 6 deletions

View File

@@ -5,4 +5,5 @@ The agent updates this file whenever source/ changes.
## Pages
<!-- Empty for now. Pages will appear as the project progresses. -->
- [repo-layout.md](source/repo-layout.md) — how the repo is organized: `skills/` sources, `dist/` builds, `scripts/` build & install
- [build-notes.md](source/build-notes.md) — why `build.ps1` exists, ZIP layout, PowerShell 5.1 backslash gotcha

View File

@@ -0,0 +1,36 @@
# Build Notes
Practical gotchas around building `.skill` archives.
## Why `build.ps1` exists alongside `build.sh`
The user is on Windows; the install target may be Linux/macOS. So archives must be portable.
**Windows PowerShell 5.1's `Compress-Archive` (v1.0.1.0) writes ZIP entries with backslashes** (e.g. `caveman\SKILL.md`). Linux/macOS `unzip` then either fails or extracts the literal name as a single file. Verified: archives produced by `Compress-Archive` listed entries like `caveman\SKILL.md`.
Workarounds considered:
- Install `zip.exe` → adds a Windows dep we don't want.
- PowerShell 7's `Compress-Archive` is fixed → can't assume PS7 is installed.
- **Use .NET `System.IO.Compression.ZipArchive` directly** ← chosen. Walks files, adds entries with `path -replace '\\','/'`. Spec-compliant ZIPs everywhere.
`build.ps1` does that. `build.sh` prefers `zip` (one-liner, fast on *nix), and on Windows-without-`zip` it falls back to invoking `build.ps1` via `powershell.exe`.
## ZIP layout the loader expects
Looking at the canonical `~/.claude/skills/<name>/` layout, the `.skill` archive should contain a single top-level directory `<name>/` with `SKILL.md` plus optional `assets/`, `references/`, etc. inside.
`zip -qr dist/<name>.skill <name>` (run from `skills/`) does this naturally. The .NET path adds an explicit `<name>/` prefix to each entry.
## Extracting `.skill` files
A `.skill` file is just a renamed `.zip`. To extract on Windows:
```powershell
Copy-Item project-bootstrap.skill project-bootstrap.zip
Expand-Archive -Path project-bootstrap.zip -DestinationPath ~/.claude/skills/
Remove-Item project-bootstrap.zip
```
On *nix: `unzip dist/project-bootstrap.skill -d ~/.claude/skills/`.
(Our `install.sh` skips this entirely — it copies from `skills/` directly. Extraction-from-archive is only needed when you don't have the source tree, e.g. when sharing a single `.skill` file with someone else.)

View File

@@ -0,0 +1,53 @@
# Repo Layout & Skill Workflow
_Decision: 2026-04-28. Approved by Vitya in chat._
## Goal
Single-source workshop for personal Claude skills. Edit here, build `.skill` archives here, install to `~/.claude/skills/` here. Repo must roll out cleanly to multiple machines.
## Layout
```
claude-skills/
├── skills/ ← editable sources (source of truth)
│ ├── caveman/
│ ├── caveman-commit/
│ ├── caveman-compress/
│ ├── caveman-help/
│ ├── caveman-review/
│ ├── compress/
│ ├── find-skills/
│ ├── project-bootstrap/
│ ├── task-status-wiki/
│ ├── using-context7/
│ ├── using-markitdown/
│ └── wiki-maintainer/
├── dist/ ← built .skill archives (committed)
├── scripts/
│ ├── build.sh ← skills/<name>/ → dist/<name>.skill
│ └── install.sh ← skills/<name>/ → ~/.claude/skills/<name>/
├── .wiki/, .tasks/, CLAUDE.md, README.md, .gitignore
```
## Build & Install Model
- **Source of truth:** `skills/<name>/` — a regular folder with `SKILL.md` + optional `assets/`, `references/`, etc. Mirrors the on-disk format Claude expects in `~/.claude/skills/`.
- **Build:** `scripts/build.sh [name...]` zips each `skills/<name>/` into `dist/<name>.skill`. No args → builds all.
- **Install:** `scripts/install.sh [name...]` copies (not symlinks) each `skills/<name>/` into `~/.claude/skills/<name>/`, replacing any existing folder. No args → installs all.
- **`.skill` archives are committed** to `dist/`. New machine: clone → run `install.sh` and you're set. No build dependency on the install path.
- **Cross-platform:** scripts are bash (works in git-bash on Windows + native on Linux/Mac). PowerShell variant added if/when needed.
## Conventions
- One folder per skill, name = skill name.
- Skill content authority: this repo. `~/.claude/skills/` is downstream.
- `dist/*.skill` regenerated by build script — never edited by hand.
- Editing flow: edit `skills/<name>/`, run `install.sh <name>` to push to live, run `build.sh <name>` to refresh archive, commit.
## Out of scope (for now)
- Versioning of individual skills (no `version` field, no changelog per skill).
- Manifest/registry file — flat folder is enough at 12 skills; revisit at ~30+.
- CI / automated builds — manual-only.
- Plugin skills (superpowers, frontend-design, etc.) — managed by plugin system, not mirrored here.