当前位置: 首页 > Skill >

skill-release-plus

skill-release-plus

skill-release-plus

Multi-hub skill publisher. Sign → Audit (placeholder) → Pack (clean tar.gz with exclude rules) → Publish to clawhub.com, skillhub.cn (Tencent Cloud), or GitHub Releases, all in one command. Pluggable adapter framework — add your own hub via a user-hook script (subprocess + JSON envelope). Single source of truth: one exclude.json, one signing pass, one package, fan out to N targets. Default target: clawhub only. Use --target all for all three real hubs, or --target user-hook:./my-script.sh for cu

1.1.1 2026.11.25 209
获取Skill文件查看使用说明
作 者:许禾 许可证: 更新时间:2026.11.25
本文目录展开

skill-release-plus

Author: Evan Song <github.com/Songhonglei> Repo: https://github.com/Songhonglei/build-better-skills/tree/main/skills/skill-release-plus License: MIT (this repo) — clawhub mirror auto-uses MIT-0 (platform-enforced)

Sign → Pack → Publish to multiple skill hubs in one command. Supports clawhub.com, skillhub.cn (Tencent Cloud), GitHub Releases, and any custom hub via a user-hook script.

Quick start

# Default: publish to clawhub only
python3 scripts/release.py --slug my-skill -m "first release" --version 1.0.0

# Publish to all three real hubs at once
python3 scripts/release.py --slug my-skill -m "ship it" --version 1.0.0 --target all

# Custom hub via user hook
python3 scripts/release.py --slug my-skill -m "v1" --version 1.0.0 
    --target user-hook:/path/to/my-publish.sh

# Check token readiness before publishing
python3 scripts/release.py --check --target all

# Dry-run (sign + pack, skip publish)
python3 scripts/release.py --slug my-skill -m "test" --version 1.0.0 --dry-run

# Inspect current exclude rules
python3 scripts/release.py --show-exclude

Supported targets

Target Status Auth Notes
clawhub ✅ SRP_CLAWHUB_TOKEN (env) or clawhub login Wraps the clawhub CLI
skillhub-cn ✅ SRP_SKILLHUB_CN_TOKEN (env) Tencent Cloud — POST /api/v1/community/skills/publish (multipart). Rate-limit 3 publish/min/token. Auto-retries on 429.
github-release ✅ SRP_GITHUB_TOKEN (env) Pure git + GitHub REST API (no gh CLI required). Supports owner/repo[/subdir] for monorepo layouts.
user-hook:<path> ✅ Hook-defined Your script receives metadata via env vars + JSON stdin, returns {"ok": true, "url": "..."} on stdout

Not supported: cn.clawhub-mirror.com (ByteDance Volcano) is a read-only public mirror of clawhub.com — publishing to clawhub automatically syncs there. There is no separate publish endpoint.

Installation

# Install Python 3.8+ (standard library only, no pip install needed)
git clone https://github.com/Songhonglei/build-better-skills.git
cd build-better-skills/skills/skill-release-plus

# Or install via clawhub:
clawhub install skill-release-plus

Dependencies:

  • Python 3.8+ (standard library only — urllib, subprocess, tarfile, json, argparse, dataclasses, pathlib)
  • git 2.x (for github-release target only)
  • clawhub CLI (for clawhub target only — auto-detected from $PATH)
  • skill-sign (optional — for content signing; skipped if not installed)
  • PyYAML (optional — improves SKILL.md frontmatter parsing for edge cases; stdlib fallback handles description: "..." single-line and description: > folded scalar without it)

Configuration

Resolution priority (highest → lowest):

  1. CLI args (--slug, --target, --version, etc.)
  2. Process env vars (SRP_* private namespace)
  3. Project-local ./.env
  4. Global ~/.config/skill-release-plus/.env
  5. Missing required key → onboarding prompt (interactive)

Environment variables (all SRP_* prefixed)

Variable Required for Description
SRP_CLAWHUB_TOKEN clawhub target clawhub API token (or run clawhub login)
SRP_SKILLHUB_CN_TOKEN skillhub-cn target Tencent skillhub.cn personal token (starts with skh_)
SRP_GITHUB_TOKEN github-release target GitHub PAT with repo scope
SRP_GITHUB_OWNER github-release (optional) Default repo owner (defaults to authenticated user)
SRP_GITHUB_REPO github-release (optional) Default repo name (defaults to slug)
SRP_GITHUB_BRANCH github-release (optional) Default branch (default: main)
SRP_GITHUB_BASIC_AUTH_HEADER github-release (optional) If true, use HTTP Basic Auth header instead of URL-embedded token
SRP_DEFAULT_TARGETS optional Comma-separated default target list (default: clawhub)
SRP_OUTPUT_DIR optional Package output directory (default: <cwd>/output/skill-release)
SRP_SIGN_OPTIONAL optional If true, skip signing when skill-sign not installed (default: true)
SRP_SIGN_SCRIPT optional Explicit path to sign.py (overrides auto-detection of skill-sign)

Architecture

release.py (dispatcher, 352 LOC)
  ├─ _lib_config.py         (4-layer config + parse_targets, 289 LOC)
  ├─ _lib_package.py        (sign / pack / exclude rules / multipart, 305 LOC)
  ├─ _lib_adapters_base.py  (BaseAdapter ABC, 98 LOC)
  └─ _adapter_*.py:
       ├─ clawhub          (CLI wrap, 185 LOC)
       ├─ github-release   (git + GitHub REST API, 392 LOC)
       ├─ skillhub-cn     (Tencent Cloud HTTP/multipart, 308 LOC)
       └─ user-hook       (subprocess + JSON envelope, 140 LOC)

Design principles:

  • Single source of truth: One config/exclude.json, one signing pass, one tar.gz, fan out to N targets
  • Adapter independence: Each adapter is a separate Python module subclassing BaseAdapter; no cross-adapter coupling
  • Fail-open by default: One target failing does not block others (dispatcher reports per-target status)
  • Protocol-agnostic base: BaseAdapter doesn't assume HTTP / multipart / git — adapters own their protocol

Writing a custom adapter (user-hook)

Create an executable script:

#!/bin/bash
# my-publisher.sh
set -e

# Hook receives:
#   $SRP_HOOK_SLUG, $SRP_HOOK_VERSION, $SRP_HOOK_CHANGELOG,
#   $SRP_HOOK_TAR_PATH, $SRP_HOOK_SKILL_DIR, $SRP_HOOK_DISPLAY_NAME

curl -sf -F "package=@$SRP_HOOK_TAR_PATH" 
     -F "version=$SRP_HOOK_VERSION" 
     "https://my-private-hub.example.com/publish"

# Print JSON envelope on stdout for the dispatcher to parse
echo '{"ok": true, "url": "https://my-private-hub.example.com/skills/'"$SRP_HOOK_SLUG"'"}'

Then invoke:

chmod +x my-publisher.sh
python3 scripts/release.py --slug my-skill -m "v1" --version 1.0.0 
    --target user-hook:./my-publisher.sh

Exclude rules

Default config/exclude.json strips:

  • VCS: .git, .svn, .hg
  • IDE: .idea, .vscode, .DS_Store, Thumbs.db
  • Build artifacts: __pycache__, *.pyc, node_modules, dist, build
  • Secrets: .env, .secrets, *.pem, *.key, .token
  • Test/dev: tests/__pycache__, .pytest_cache, .tox
  • See full list: python3 scripts/release.py --show-exclude

Command reference

usage: release.py [-h] [--slug SLUG] [--changelog CHANGELOG]
                  [--version VERSION] [--display-name DISPLAY_NAME]
                  [--skill-dir SKILL_DIR] [--target TARGET] [--dry-run]
                  [--show-exclude] [--check]

options:
  -h, --help            show this help message and exit
  --slug SLUG           skill slug (lowercase, digits, hyphens)
  --changelog, -m       release changelog
  --version VERSION     explicit version (semver); default: auto-bump patch
  --display-name        human-readable display name (default: slug)
  --skill-dir SKILL_DIR  path to skill source directory (default: ./<slug>)
  --target TARGET       comma-separated targets, or "all". Default: clawhub.
                        Special: user-hook:<path> for custom hooks.
  --dry-run             sign + pack but skip publish
  --show-exclude        print current exclude rules and exit
  --check               check token readiness for selected targets

Exit codes:

  • 0 — all targets succeeded
  • 1 — at least one target failed (others may have succeeded)
  • 2 — invalid arguments or config error

Triggers

This skill should be used when the user says:

  • "publish skill X to clawhub / skillhub.cn / GitHub"
  • "ship my skill to multiple hubs"
  • "release X.Y.Z of my skill"
  • "发布 skill 到 clawhub"
  • "把 skill 推到 skillhub.cn"
  • "skill 同时发到三个 hub"
  • "用 user-hook 发到我自己的 hub"

Limitations

  • skillhub-cn rate limit: 3 publish/minute/token. Dispatcher waits and retries on 429.
  • github-release requires explicit --version: No auto-tag-bump (would require parsing existing tags reliably across owner/repo combos).
  • skillhub-cn requires description in SKILL.md frontmatter (≤1024 bytes). YAML folded (>) scalar is supported.
  • No rollback: If 2/3 targets succeed and 1 fails, you must manually clean up the 2 successes or accept partial state.

License

MIT (this repo). See LICENSE.

Note: when this skill is published to clawhub.com, the platform enforces MIT-0 license metadata on hub mirror — original repo MIT license is unchanged.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,034
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,018
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,017
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,013
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,013
Skill 文件
  • SKILL.md
    • skill-release-plus
    • Quick start
    • Supported targets
    • Installation
    • Configuration
      • Environment variables (all SRP_* prefixed)
    • Architecture
    • Writing a custom adapter (user-hook)
    • Exclude rules
    • Command reference
    • Triggers
    • Limitations
    • License
  • 项目或源文件

相关 Skill

更多
OpenClaw 成功流程沉淀发布器 / OpenClaw Success Skill Publisher OpenClaw 成功流程沉淀发布器 / OpenClaw Success Skill Publisher 捕获成功的OpenClaw交互,转化为可重用技能并生成优化执行路径摘要,然后发布至ClawHub并分发。
Skill Publisher Skill Publisher 自动化将OpenClaw技能发布到GitHub和ClawHub,处理ZIP解压、文件准备(README、.gitignore、SkillBoss链接)、Git操作等。
Skill Build Wizard Skill Build Wizard End-to-end guided workflow for building production-quality agent skills. Walks users through 4 stages: pre-flight checks → spec confirmation (3 musts) → coding quality acceptance (4 checks) → release prep (5 requirements). Use when the user says "create a skill", "build a skill", "write an agent skill", "skill-build-wizard", "做个 skill", "帮我创建一个 skill", "skill 全流程向导". Calls skill-creator for actual scaffolding and routes to glic-check / skill-release-audit / skill-release-plus / skill-regression
Open-source a Local Skill to GitHub (+ optional clawhub.com) Open-source a Local Skill to GitHub (+ optional clawhub.com) Quickly open-source a local skill to GitHub (primary) and optionally clawhub.com. Workflow: slug pre-check, fork to opensourceskills, strip internal info, normalize SKILL.md, generate LICENSE/README, init git, push to GitHub with configurable token source, and optionally publish to clawhub. Use when the user says "open-source this skill", "把这个 skill 开源", "发到 github", "publish skill publicly", or "把本地 skill 发开源". Hard rules: never modify the original skill in place, never auto-add force/yes flags
publish-audit publish-audit Audit a skill folder before you publish to ClawHub. Catches the frontmatter-vs-code mismatches, missing metadata, leaked secrets, and file-limit problems that hide or reject a release — so it passes the scan on first upload. Not for vetting a skill you're about to install (see skill-vetter).