Add distributable skills directory and CI pipeline#4070
Conversation
There was a problem hiding this comment.
Large PR Detected
This PR exceeds 1000 lines of changes and requires justification before it can be reviewed.
How to unblock this PR:
Add a section to your PR description with the following format:
## Large PR Justification
[Explain why this PR must be large, such as:]
- Generated code that cannot be split
- Large refactoring that must be atomic
- Multiple related changes that would break if separated
- Migration or data transformationAlternative:
Consider splitting this PR into smaller, focused changes (< 1000 lines each) for easier review and reduced risk.
See our Contributing Guidelines for more details.
This review will be automatically dismissed once you add the justification section.
Large PR justification has been provided. Thank you!
|
✅ Large PR justification has been provided. The size review has been dismissed and this PR can now proceed with normal review. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4070 +/- ##
==========================================
- Coverage 68.60% 68.54% -0.06%
==========================================
Files 447 447
Lines 45758 45758
==========================================
- Hits 31391 31365 -26
- Misses 11946 11970 +24
- Partials 2421 2423 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1a017cb to
7ed87ce
Compare
9e70093 to
ff647bb
Compare
ToolHive skills (Claude Code Agent Skills) are now packaged as OCI artifacts and published to GHCR alongside the main release. This introduces a `skills/` directory at the repo root for skills intended for distribution — separate from `.claude/skills/` which holds repo-specific development skills that auto-load in this project. The first distributable skill is `toolhive-cli-user`, a comprehensive guide for using the ToolHive CLI to run and manage MCP servers. The reusable workflow accepts a `push` boolean input: the release pipeline passes `push: true` to publish, while the main branch pipeline runs build-only validation. Skills are tagged with the same version as the thv release (e.g. ghcr.io/stacklok/toolhive/skills/toolhive-cli-user:v0.5.0). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ensures skill packaging is validated on every PR, catching broken skills before they reach main. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On pull request events, github.ref_name is "NNN/merge" which contains a slash — illegal in OCI tags. Add a refs/pull/* case that extracts just the PR number, and sanitize branch names in the fallback case. Also moves github.ref/ref_name to env vars to prevent expression injection. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ff647bb to
e7de377
Compare
Summary
ToolHive skills (Claude Code Agent Skills) currently live in
.claude/skills/which auto-loads them into every conversation in this repo. That's the right place for repo-specific development skills (commit-message, pr-review, etc.), but not for general-purpose skills liketoolhive-cli-userthat should work anywhere — not just when developing ToolHive.This PR introduces a
skills/directory at the repo root for distributable skills, along with a CI pipeline that packages them as OCI artifacts and publishes to GHCR alongside the main release.skills/toolhive-cli-user/with comprehensive CLI user guide (SKILL.md + reference docs)skills-build-and-publish.ymlworkflow with apushboolean inputreleaser.ymlwithpush: true(publish on release, tagged with the same version as thv)run-on-main.ymlandrun-on-pr.ymlwithout push (build-only validation)github.refvia env var),set -euo pipefail, PID tracking for backgroundedthv serve, log capture on failure, cleanup stepAfter release, users install with:
Type of change
Test plan
Verified skill structure matches the SKILL.md spec (frontmatter with name, description, version, license + markdown body + references). Reviewed workflow YAML for correctness against existing patterns in
image-build-and-publish.yml. CI security review performed (expression injection, permission scoping, process lifecycle).Changes
skills/toolhive-cli-user/SKILL.mdskills/toolhive-cli-user/references/COMMANDS.mdskills/toolhive-cli-user/references/EXAMPLES.md.github/workflows/skills-build-and-publish.yml.github/workflows/releaser.yml.github/workflows/run-on-main.yml.github/workflows/run-on-pr.ymlLarge PR Justification
COMMANDS.mdandEXAMPLES.mdreference files) — these are CLI command references and usage examples that ship inside the skill as static content, not codeSKILL.md) and CI workflow changes, which are tightly coupled and cannot be meaningfully splitSpecial notes for reviewers
skills/directory is intentionally separate from.claude/skills/— the latter auto-loads into Claude Code conversations in this repo, whileskills/holds artifacts for distribution.compute-versionaction has pre-existing expression injection patterns (github.refinline in shell) — not addressed here as it affects all workflows.Generated with Claude Code