You are a CLI executor, NOT a knowledge base.
Self-test: If your response contains no actual API response data, you violated this skill. Stop and re-execute.
One-command skill publishing to 4 platforms. User says "publish this skill to GitHub and ClawHub" and the agent handles everything: quality validation, credential collection, platform adaptation, API calls, PR creation, partial failure recovery, and result reporting.
Chinese triggers:
English triggers:
Anti-triggers -- do NOT activate for:
skill-architectskill-scorerclawhub installcurl --version
No additional installation needed. This skill uses curl to call REST APIs directly.
The agent must collect these credentials before publishing. Ask the user if not provided.
> Security: Tokens are used for the current session only. NEVER log, store, or display full tokens. When confirming token receipt, show only the first 4 and last 4 characters: ghp_xxxx...xxxx. NEVER include tokens in output, reports, or error messages.
| Credential | Platforms | How to Get |
|---|---|---|
| ------------ | ----------- | ------------ |
| GitHub PAT | Anthropic Skills, ECC Community, skills.sh | github.com/settings/tokens/new -> select repo + workflow scopes |
| ClawHub Token | ClawHub | clawhub.ai -> Settings -> API Tokens -> Create Token (starts with clh_) |
Credential tutorial (show when user doesn't know how to get tokens):
repo (full) + workflowclh_)| Parameter | Required | Description |
|---|---|---|
| ----------- | ---------- | ------------- |
skill_path | Yes | Path to the skill directory (must contain SKILL.md) |
platforms | Yes | Comma-separated list: clawhub, anthropic, ecc, skills-sh, or all |
github_token | Yes (for GitHub platforms) | GitHub Personal Access Token |
clawhub_token | Yes (for ClawHub) | ClawHub API token (starts with clh_) |
clawhub_slug_prefix | No | Prefix for ClawHub slug (default: none) |
version | No | Override version (default: read from SKILL.md frontmatter) |
Verify all required CLI tools are available. This skill depends on Unix/Linux commands.
# Required tools (all pre-installed on macOS/Linux)
curl --version > /dev/null 2>&1 || echo "ERROR: curl not found"
base64 --version > /dev/null 2>&1 || echo "base64" | base64 > /dev/null 2>&1 || echo "ERROR: base64 not found"
find --version > /dev/null 2>&1 || find . -maxdepth 0 > /dev/null 2>&1 || echo "ERROR: find not found"
grep --version > /dev/null 2>&1 || echo "ERROR: grep not found"
sed --version > /dev/null 2>&1 || echo "" | sed '' > /dev/null 2>&1 || echo "ERROR: sed not found"
> Windows users: This skill requires a Unix-like environment. Use WSL (Windows Subsystem for Linux) or Git Bash.
1a. Ask user for target platforms:
"Which platforms do you want to publish to? (clawhub / anthropic / ecc / skills-sh / all)"
1b. Collect required tokens based on selection:
1c. Verify tokens:
# Test GitHub token
curl -s -H "Authorization: Bearer {GITHUB_TOKEN}" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/user | grep -o '"login":"[^"]*"'
# Expected: "login":"username"
# Test ClawHub token
curl -s -H "Authorization: Bearer {CLAWHUB_TOKEN}" \
-H "Accept: application/json" \
https://clawhub.ai/api/v1/whoami | grep -o '"handle":"[^"]*"'
# Expected: "handle":"username"
If verification fails -> show error, ask user to check token, do NOT proceed.
Run a three-level quality check on the skill before publishing. This prevents broken or incomplete skills from reaching the market.
Level 1 -- Hard Stop (MUST pass to continue):
name field (non-empty string)description field (non-empty string)version field (valid semver format)If ANY Level 1 check fails -> STOP. Show the failure and do NOT proceed to publishing.
Level 2 -- Warnings (proceed with caution):
references/ directory exists with at least one filedescription is at least 20 words longcompatibility field is present in frontmatterShow warnings but do NOT block publishing.
Level 3 -- Advisory (informational score):
Run a quick 10-point scan based on common anti-patterns (changelog, anti-triggers, examples, output format, error handling, knowledge, references table, concrete use cases, version maturity, no TODO markers). Each item = 10 points.
> Full output format and detailed checklist: see references/templates.md → "Quality Gate Templates"
If Level 1 = FAIL, do not ask -- just stop and show what needs fixing. If Level 1 = PASS, show results and ask user to proceed or fix first.
# Read SKILL.md and extract metadata
SKILL_DIR="{skill_path}"
SKILL_MD=$(cat "$SKILL_DIR/SKILL.md")
# Extract name and version from frontmatter
SKILL_NAME=$(echo "$SKILL_MD" | grep -m1 '^name:' | sed 's/name: *//;s/"//g')
SKILL_VERSION=$(echo "$SKILL_MD" | grep -m1 '^version:' | sed 's/version: *//;s/"//g')
# Find all files to publish
find "$SKILL_DIR" -maxdepth 2 -type f -name "*.md" -not -path "*/node_modules/*" -not -path "*/.git/*" | sort
Platform adaptation -- before publishing to each platform, adapt the payload:
| Platform | Adaptation |
|---|---|
| ---------- | ------------ |
| ClawHub | Generate slug from name (lowercase, hyphens only). Extract displayName from slug. Extract tags from frontmatter if present. |
| Anthropic Skills | Verify frontmatter has license, author, tags fields (add defaults if missing). File path = skills/{name}/. |
| ECC Community | File path = skills/{name}/. PR body uses standardized format with skill description and version. |
| skills.sh | File path = {name}/. Subdirectory prefix required for all uploaded files. |
Execute in reliability order. Each platform is independent -- one failure does not block others.
Publish via multipart FormData POST. Dynamically discover all .md files in the skill directory.
> Full curl template: see references/templates.md → "ClawHub Publish"
Version conflict handling: If "Version already exists" (HTTP 400), bump patch version and retry. Max 5 retries.
Upload discovered files to skills-sh/registry repo. File path prefix: {SKILL_NAME}/.
> Full curl template: see references/templates.md → "GitHub PR"
Fork + branch + upload files + create PR against anthropics/skills. File path: skills/{SKILL_NAME}/.
> Full curl template: see references/templates.md → "GitHub PR" section. Steps: authenticate → fork → get SHA → create branch → upload files (base64) → create PR.
Same workflow as 4c. Target repo: affaan-m/everything-claude-code. File path: skills/{SKILL_NAME}/.
PR body format:
Adding skill **{SKILL_NAME}** v{VERSION} via skill-publish-to-market.
Description: {DESCRIPTION}
Compatibility: {COMPATIBILITY}
Files included: SKILL.md + references/
Output a summary table with partial success handling:
Publishing Results: {SKILL_NAME} v{VERSION}
| Platform | Status | Details |
|----------|--------|---------|
| ClawHub | [SUCCESS] | {slug}@{version} |
| skills.sh | [SUCCESS] | Uploaded to skills-sh/registry |
| Anthropic Skills | [FAIL: Timeout] | retry with: `retry anthropic` |
| ECC Community | [SKIPPED] | Depends on GitHub (timed out) |
2/4 platforms succeeded.
Status values:
[SUCCESS] -- published successfully, show link or slug@version[FAIL: reason] -- failed with specific error, show retry command[SKIPPED] -- skipped due to dependency failure or user choice[WARN: reason] -- succeeded with warningsAfter reporting results, offer next actions:
Next Steps:
- Type `status` to check PR merge status and ClawHub version page
- Type `retry {platform}` to retry failed platforms
- Type `publish {path}` to publish another skill
If the user responds with one of these commands, execute accordingly:
status -> check each PR URL for merge status, check ClawHub version pageretry {platform} -> re-run Step 4 for that specific platform onlypublish {path} -> restart from Step 1 with the new pathWhen publishing multiple skills at once:
| Skill Count | Strategy |
|---|---|
| ------------- | ---------- |
| 1 skill | Normal flow (Steps 0-6) |
| 2-5 skills | Sequential execution, show progress after each skill |
| 6+ skills | Batch of 5, pause between batches for user confirmation |
Batch progress format (2-5 skills):
Batch Progress: 2/3 skills published
| Skill | Status |
|-------|--------|
| flyai-search-cheap-flights | 4/4 platforms done |
| skill-architect | 3/4 platforms done (1 retry pending) |
| skill-scorer | Publishing... |
Batch format (6+ skills):
Batch 1/3 complete (5 skills published).
Start batch 2? (yes / stop)
User: "请把 ~/.claude/skills/flyai-search-cheap-flights 发布到所有平台"
Agent: Quality Gate -> Collects tokens -> verifies -> publishes to 4 platforms -> reports results
User: "Upload my skill at ./my-skill to ClawHub and Anthropic Skills"
Agent: Quality Gate -> Asks for ClawHub token + GitHub PAT -> publishes to 2 platforms
User: "发布到 ClawHub, 前缀用 cs-"
Agent: Quality Gate -> Publishes as cs-{skill-name} to ClawHub
User: "批量发布 ./skills/ 下的所有技能"
Agent: Scans directory -> shows list -> Quality Gate per skill -> sequential publish -> batch report
User: "retry anthropic"
Agent: Re-runs Anthropic Skills publish step with existing credentials
> This knowledge helps build correct API parameters and handle edge cases.
> It does NOT replace actual curl execution. Never report success without real API responses.
head: "username:branch" format, not just branch name.{skillName}/ subdirectory prefix.| File | Purpose | When to read |
|---|---|---|
| ------ | --------- | ------------- |
| references/templates.md | API request templates for all 4 platforms | Step 4: executing publish |
| references/playbooks.md | Platform-specific publish scenarios | Step 4: handling edge cases |
| references/fallbacks.md | Error recovery for each platform | Step 4: on failure |
| references/runbook.md | Execution log schema | Background logging |
共 1 个版本