ci: package skill as installable zip via Gitea Actions

Add a reproducible way to build the Claude-skill package and publish it:

- scripts/build-skill-zip.sh: stages SKILL.md + README + references/ + assets/
  into a zip whose single top-level cycling-training/ folder is the layout
  Claude Desktop / claude.ai import expects. Validates SKILL.md frontmatter.
- .gitea/workflows/release-skill.yml: on tag v* builds the zip and attaches it
  to a Gitea release (via the API using the automatic token); on manual
  dispatch uploads it as a run artifact.
- README: document the packaging/release flow and Claude Desktop zip-import.
- .gitignore: ignore dist/ build output.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TqrhBhC3GEcKyaw8RTk8G6
This commit is contained in:
2026-07-20 19:23:37 -04:00
parent 517986781f
commit 6310b56f26
4 changed files with 166 additions and 1 deletions
+25 -1
View File
@@ -64,11 +64,35 @@ git clone <this-repo> .claude/skills/cycling-training
Claude auto-discovers any `SKILL.md` under a `skills/` directory. The `description` field in the
frontmatter is what Claude matches against to decide when to load the skill, so keep it intact.
**Claude.ai / Claude Desktop:** upload or sync the folder as a skill per the current skills UI.
**Claude Desktop / claude.ai (import a zip):** the skill ships as a packaged `.zip` whose single
top-level `cycling-training/` folder holds `SKILL.md` and the docs — the layout Claude expects. Get
the zip one of two ways, then import it in **Settings → Skills**:
- **From a release:** download `cycling-training-<version>.zip` from the repo's Releases (produced
automatically — see *Packaging & releases* below).
- **Build it yourself:**
```bash
scripts/build-skill-zip.sh v1.0.0 # -> dist/cycling-training-v1.0.0.zip
```
Once installed, this skill loads automatically when you ask cycling-training questions, and it
pairs with your connected Intervals.icu MCP server for the live data.
## Packaging & releases
`scripts/build-skill-zip.sh [version]` stages the installable files and produces
`dist/cycling-training-<version>.zip` (validating that `SKILL.md` carries `name`/`description`
frontmatter). A Gitea Actions workflow, `.gitea/workflows/release-skill.yml`, runs it:
- **Push a tag `v*`** (e.g. `git tag v1.0.0 && git push origin v1.0.0`) → builds the zip and
**attaches it to a Gitea release** for that tag.
- **Run the workflow manually** (workflow_dispatch) → builds the zip and uploads it as a run
artifact you can download.
The workflow needs a registered Actions runner, Actions enabled for the repo, and the automatic
`GITHUB_TOKEN` to have `contents:write` (granted via the workflow's `permissions` block on
Gitea ≥ 1.20).
## How to read the docs
- **`SKILL.md` is a router, not a manual.** It points to the one reference doc that answers the