backport
星标0
分支0
更新时间2026年4月6日 03:02
将站点仓库的某个功能 commit 反哺到内核仓库 (new-api-core)。通过 cherry-pick 只挑选功能代码,不带入站点品牌内容。
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
SKILL.md
readonly菜单
将站点仓库的某个功能 commit 反哺到内核仓库 (new-api-core)。通过 cherry-pick 只挑选功能代码,不带入站点品牌内容。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | backport |
| description | 将站点仓库的某个功能 commit 反哺到内核仓库 (new-api-core)。通过 cherry-pick 只挑选功能代码,不带入站点品牌内容。 |
| user-invocable | true |
用户说"反哺 xxx"、"backport xxx"、"把 xxx 的功能同步回内核"、"从 xxx 站点反哺"时触发。
从用户输入中提取:
cd /Users/longshun/Desktop/Program/00_use/new-api-core
# 添加站点 remote(如果还没有)
git remote add site-{站点名} https://github.com/dev-longshun/new-api-{站点名}.git 2>/dev/null || true
# 拉取站点最新代码
git fetch site-{站点名}
# 列出站点的最近 commit 供用户选择
git log --oneline site-{站点名}/main -10
如果用户没指定具体 commit,列出最近的 commit 让用户选择。
在 cherry-pick 之前,先检查 commit 涉及的文件:
git show --stat {commit-hash}
如果涉及首页文件(web/src/pages/Home/**、web/index.html、web/public/logo.png),
警告用户这些文件包含站点品牌内容,确认是否继续。
git cherry-pick {commit-hash}
# 如果有冲突,报告给用户,不要自动解决
# 如果无冲突,推送
git push origin main
告知用户:
/sync-site 将这个改动同步到其他站点| 站点 | remote 名 | GitHub 仓库 |
|---|---|---|
| rabbitcode | site-rabbitcode | dev-longshun/new-api |