End-to-end workflow for publishing agent skills to GitHub, ClawdHub, and skills.sh. Handles repo creation, topic tagging, ClawdHub publish, skills.sh index r...
End-to-end publishing workflow for agent skills. Covers GitHub, ClawdHub, and skills.sh — from pre-flight checks to installation verification.
Respond in the same language the user used to invoke this skill. Fall back to English if no language signal is found.
command -v gh >/dev/null || echo "CRITICAL: gh (GitHub CLI) not found — install with: brew install gh"
command -v git >/dev/null || echo "CRITICAL: git not found"
Optional (for ClawdHub publishing):
npx clawhub --help >/dev/null 2>&1 || echo "INFO: clawhub CLI not installed — needed for ClawdHub publishing"
The full publishing pipeline has 6 phases:
1. Pre-flight Check → Validate skill structure and content
2. GitHub Publish → Create repo, push, add topics
3. ClawdHub Publish → Publish to ClawdHub registry
4. skills.sh Submit → Submit index request via GitHub issue
5. Install Verify → Test all installation methods
6. Post-publish → Summary with all links and install commands
Run phases sequentially. If the user only wants a specific phase (e.g., "just submit to skills.sh"), skip to that phase.
Validate the skill directory before publishing. Check ALL of the following:
SKILL_DIR="<path-to-skill>" # Ask user or infer from context
# Required
[ -f "$SKILL_DIR/SKILL.md" ] || echo "FAIL: SKILL.md missing"
[ -f "$SKILL_DIR/LICENSE" ] || echo "FAIL: LICENSE missing"
[ -f "$SKILL_DIR/README.md" ] || echo "FAIL: README.md missing"
Read SKILL.md and verify YAML frontmatter contains:
name — required, should be kebab-casedescription — required, should be descriptive (used by search engines and skill discovery)version — required, valid semverOptional but recommended:
metadata.openclaw.emojimetadata.openclaw.homepagemetadata.openclaw.osmetadata.openclaw.requires.bins (list of required CLI tools)Check README.md for:
/Users/xxx/ or /home/xxx/ patterns.If the skill targets both Chinese and English users, check for:
README.zh-CN.md existsPresent findings:
# Pre-flight Report
## Required Files
- [x] SKILL.md
- [x] LICENSE (MIT)
- [x] README.md
- [ ] README.zh-CN.md (optional, not found)
## SKILL.md Frontmatter
- name: my-skill
- version: 1.0.0
- description: OK (127 chars)
## Issues Found
- WARNING: README contains placeholder org "nicepkg" — update before publishing
- INFO: No .gitignore found (optional but recommended)
## Ready to publish? YES / NO (with blockers listed)
cd "$SKILL_DIR"
git init
git add -A
git status # Review staged files
Before committing, scan staged files for:
/Users/xxx/)git commit -m "Initial release: <skill-name> v<version>"
Ask the user for their preferred GitHub repo name. Default: same as the skill's name field in SKILL.md frontmatter.
Important: Check if the name is already taken on ClawdHub before creating the GitHub repo, so they can be consistent:
npx clawhub inspect <proposed-name> 2>&1
If taken on ClawdHub, suggest alternatives and let the user choose a name that works on both platforms.
gh repo create <owner>/<repo-name> \
--public \
--description "<skill description from SKILL.md>" \
--source . \
--push
Add discoverable topics for skills.sh indexing and general discoverability:
gh repo edit <owner>/<repo-name> --add-topic agent-skill,claude-code-skill
Additional topic suggestions based on skill content:
productivity, devtools, security, health-check, etc.macos, linux, openclaweventkit, calendar, etc.After repo creation, update all files that reference the repo:
README.md — badge links, install commands, git clone URLREADME.zh-CN.md — sameSKILL.md — metadata.openclaw.homepagedocs/ — any user story or doc files with install commandsLICENSE — copyright holder# Verify no stale references remain
grep -r "placeholder-org\|nicepkg\|example-user" "$SKILL_DIR" --include="*.md"
Commit and push the updates.
npx clawhub whoami 2>&1 || npx clawhub login
npx clawhub inspect <slug> 2>&1
If slug is taken, suggest alternatives based on the skill name.
npx clawhub publish "$SKILL_DIR" \
--slug <slug> \
--name "<display-name>" \
--version <version> \
--changelog "<changelog text>"
Known issue (as of clawhub CLI v0.7.0): The server requires acceptLicenseTerms: true in the publish payload, but the CLI doesn't include it. If you get:
Error: Publish payload: acceptLicenseTerms: invalid value
Fix by patching the local CLI:
# Find the publish.js file
PUBLISH_JS="$(find ~/.npm/_npx -name 'publish.js' -path '*/clawhub/dist/cli/commands/*' 2>/dev/null | head -1)"
# Add acceptLicenseTerms to the payload
# In the JSON.stringify block, add: acceptLicenseTerms: true,
Then retry the publish command.
npx clawhub inspect <slug>
skills.sh does NOT auto-index skills. You must submit a request via GitHub issue.
gh issue create --repo vercel-labs/skills \
--title "Request to index skill: <owner>/<repo>" \
--body "$(cat <<'ISSUE_EOF'
## Skill Information
- **Repository:** https://github.com/<owner>/<repo>
- **Skill name:** <skill-name>
- **Install:** \`npx skills add <owner>/<repo>\`
- **License:** MIT
## Description
<2-3 sentence description of what the skill does and its key features>
ISSUE_EOF
)"
Explain that:
npx skills add <owner>/<repo> install command works immediately (it clones from GitHub directly)npx skills search / npx skills find discovery requires indexingTest all three installation methods sequentially. Back up any existing installation first.
npx skills add <owner>/<repo> -g -y
# Verify: check installation path and file completeness
ls ~/.agents/skills/<skill-name>/ || ls ~/.claude/skills/<skill-name>/
# Cleanup
npx skills remove <skill-name> -g -y
npx clawhub install <slug>
# Verify
ls ~/clawd/skills/<slug>/
# Cleanup
npx clawhub uninstall <slug> --yes
git clone https://github.com/<owner>/<repo>.git /tmp/test-skill-install
# Verify
ls /tmp/test-skill-install/
# Cleanup
rm -rf /tmp/test-skill-install
# Installation Verification
| Method | Command | Result |
|--------|---------|--------|
| skills.sh | npx skills add <owner>/<repo> -g -y | OK / FAIL |
| ClawdHub | clawhub install <slug> | OK / FAIL |
| Manual | git clone ... | OK / FAIL |
Present a final summary with all links and commands:
# Published: <skill-name> v<version>
## Links
- GitHub: https://github.com/<owner>/<repo>
- ClawdHub: https://clawhub.ai/<owner>/<slug> (if published)
- skills.sh: pending indexing (issue #NNN)
## Install Commands
# skills.sh (recommended)
npx skills add <owner>/<repo> -g -y
# ClawdHub
clawhub install <slug>
# Manual
git clone https://github.com/<owner>/<repo>.git ~/.claude/skills/<skill-name>
## Next Steps
- [ ] Wait for skills.sh indexing (issue #NNN)
- [ ] Share the GitHub link
- [ ] Consider creating a GitHub Release with tag v<version>
acceptLicenseTerms patch is needed as of CLI v0.7.0. Check if newer versions fix this before patching.ZIP package — ready to use