← ClaudeAtlas

opensource-skill-to-githublisted

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, never write tokens to git/remote/memory, and ask the user at decision points.
Songhonglei/build-better-skills · ★ 1 · AI & Automation · score 74
Install: claude install-skill Songhonglei/build-better-skills
# Open-source a Local Skill to GitHub (+ optional clawhub.com) - **Version**: 1.0.13 - **License**: MIT - **Author**: Evan Song · [github.com/Songhonglei](https://github.com/Songhonglei) - **Repository**: https://github.com/Songhonglei/opensource-skill-to-github > 把一个本地 skill 端到端开源到 **GitHub**(主)+ **clawhub.com**(可选)。 > 基于多个 skill 开源实践沉淀的完整方法论(见 `references/opensource_playbook.md`)+ 11 条剔除清单 + 16 项 checklist。 > **质量优先**:每个决策点(LICENSE / slug 冲突 / 内网信息残留 / token)必须等用户拍板。 ## 设计哲学 - **副本而非演进**:原 skill 一行不动;副本放 `opensourceskills/<slug>/`,独立 commit / 版本号 / sign。 - **混合形态**:能脚本化的(剔除扫描、git init、frontmatter 校验)走脚本;需要决策的(LICENSE、slug rename、token、敏感部门 visibility)走对话。 - **首版 v1.0.0**:clawhub 用户期望"成熟" first release,不用 v0.x 试探。 - **GitHub 主、clawhub 副**:本 skill 默认走 GitHub,clawhub 在 §6 可选。skills.sh 通过 GitHub 自动同步无需单独操作。 - **不硬编码身份 + 一次配置永久用**:所有作者/handle/邮箱通过持久化 profile 自动读取,跨 agent / 跨 workspace / skill 重装都不丢。 ## 首次使用:配置开源身份(一次性,跨 agent 持久化) ```bash bash scripts/setup_profile.sh # 交互式问 3 个字段: # Author name (如 "Evan Song") # GitHub handle (如 "Songhonglei") # Author email (推荐 GitHub noreply: "<handle>@users.noreply.github.com") # 写入 ~/.config/opensource-skill-to-github/profile.env (chmod 600) ``` **为什么这么放**: - 在用户 `$HOME` 而非 skill 目录 → skill 升级/重装不丢 - 在用户 `$HOME` 而非 workspace → 换 agent / 换 workspace 仍有效(适配 OpenClaw / Claude Code / Cursor 等任意环境) - XDG 兼容(`$XDG_CONFIG_HOME` 优先),符合 Linux / macOS 用户文件规范 **身份取值优先级**(高 → 低): 1. 脚本命令行参数显式传入 2. `OSG_AUTHOR_NAME` / `OS