sn-update
它能做什么
这项技能把已安装的 SenseNova 技能更新到上游的最新版本。适合在 OpenClaw 或 hermes-agent 中使用 SenseNova 技能、并希望它们保持最新的人。
适用场景
- ✓当你想把所有已安装的 SenseNova 技能更新到最新版本时。
- ✓当你只想刷新某一项指定的 SenseNova 技能时。
- ✓当你想强制重新安装,即使该技能已经是最新版本时。
技能链接
https://github.com/OpenSenseNova/SenseNova-Skills/blob/main/skills/sn-update/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把我所有的 SenseNova 技能更新到最新版本。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体检查你使用的是哪个智能体文件夹,同步上游仓库,并把较新的技能文件复制到位。当两个智能体文件夹都存在时,它会询问你。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
sn-update
Refresh installed sn-* skills from upstream
SenseNova-Skills.
Decide the scope
- No list given → every
sn-*skill upstream. - Specific skills named → only those. Don't expand.
- A named skill missing upstream → surface as error and stop.
- User said "force / 强制" → re-install even when up-to-date.
Decide the target agent
Check which directories exist:
~/.openclaw/skills/ |
~/.hermes/skills/ |
Target |
|---|---|---|
| exists | absent | openclaw |
| absent | exists | hermes |
| exists | exists | ask the user — never silently dual-write |
| absent | absent | no install found, stop |
Sync the upstream repo
Persistent cache at ~/.cache/sn-update/repo/. Default URL:
https://github.com/OpenSenseNova/SenseNova-Skills.git. User may override
with a fork URL.
- First run: if you want to actually limit blob download, use partial
clone with
--filter=blob:none --no-checkout, then sparse-checkout only the selectedskills/<name>paths before copying them.--filter=blob:nonealone does not keep the cache small if the full worktree is checked out; that checkout will still download most or all needed blobs. It still preserves history metadata for SHA queries. - Subsequent runs: fetch + hard-reset to the upstream default branch, and
re-apply sparse-checkout for only the requested
skills/<name>paths before copying. If updating the wholesn-*bundle, expect most/all skill blobs to be downloaded. - URL changed: if cache's
origindiffers from the requested URL, delete and re-clone.
Compare versions per skill (A → B → C)
For each skill, pick the highest-precedence signal present on both sides (installed + upstream); equal → skip, differ → install.
Upstream "version" is the per-subtree commit SHA — using repo HEAD would mark unrelated skills as stale every time:
git -C <cache> log -1 --format=%H -- skills/<skill-name>
- A —
.sn-versionmarker: one-line file inside the installed skill holding the SHA from its last install. - B —
.sn-releasemarker (fallback): one-line file holding the upstream tag name. Compare againstgit describe --tags --abbrev=0. - C — optional
version:field in SKILL.md frontmatter: parse from YAML on both sides, but only for forks or skills that explicitly add this field. If either side lacks it, C does not apply. - Nothing usable → treat as stale and install.
Always write .sn-version on install so future runs can use A.
Install with backup
For each skill flagged "install":
- Move (not copy) any existing
<agent-skills>/<skill-name>/into a single timestamped backup bucket shared by all skills in this run:~/.<agent>/skills_backup/<UTC-timestamp>/<skill-name>/(e.g.2026-04-30T15-29-07Z). - Copy
<cache>/skills/<skill-name>/→<agent-skills>/<skill-name>/. Never symlink (ln -s) from the cache. The cache lives under~/.cache/with permissions the agent runtime may not be able to traverse, and some runtimes refuse to load skills resolved through symlinks. Always do a real recursive copy so the installed tree is self-contained and owned by the agent skills dir. - Write
.sn-versionwith the upstream subtree SHA inside the new copy.
If the bucket ends up empty (all targets were fresh installs), remove it.
The backup tree is a sibling of skills/, never a .bak folder
inside it — most agent runtimes scan the whole skills/ directory and
would pick up stale duplicates.
Enforce backup retention
After every run, prune the per-agent backup root to at most 3 buckets. Timestamps sort lexicographically; keep the newest 3, delete the rest. Run this even when the current run produced no backup of its own.
Report to the user
Group by status, keep it short:
Updated (3): sn-ppt-standard, sn-image-base, sn-deep-research
Already up-to-date (5): sn-ppt-creative, sn-ppt-doctor, ...
Backup: ~/.openclaw/skills_backup/2026-04-30T15-29-07Z/
- Omit
Backup:when nothing was backed up. - Show SHA pairs (
abc1234 → def5678) only if the user asks for detail. - Errors get their own line — never bury them in a success summary.
Edge cases
- Asks to delete sn- skills* — not this skill's job. Decline; point at
~/.<agent>/skills_backup/if they want to roll back. - User is in the dev repo and asks
常见问题
它能只更新一项技能吗?
能。你可以指定某一项技能,只更新这一项。
如果同时安装了 OpenClaw 和 Hermes 怎么办?
它会询问你要更新哪一个,不会同时写入两者。
我可以使用仓库的分支版本吗?
可以。你可以提供另一个仓库地址,代替主仓库使用。
详情
作者的原始描述
Update SenseNova Skills (the sn-* bundle) inside an OpenClaw or hermes-agent install. ALWAYS use this skill when the user says any of: "update SenseNova skills", "update SN skills", "更新 sensenova skills", "更新 sn skills", "刷新 sn-*", "升级 sn-* skills", or names a specific sn-* skill to update (e.g. "更新 sn-ppt-standard", "refresh sn-image-base"). Default scope is the whole sn-* bundle; if the user names specific skills, update ONLY those.
热度
- GitHub 星标
- 6.0k
- 排名
- #14468
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
sn-code-video
6.0k教你的智能体使用 Canvas、SVG、Three.js 或 Remotion 制作代码驱动的视频,逐帧检查并导出为 MP4。
sn-image-base
6.0k为其他技能提供底层工具,使用 SenseNova 服务生成图片、识别图片内容并优化文字。
sn-image-doctor
6.0k检查 SenseNova-Skills 是否已安装、Python 包是否齐全、所需 API 密钥是否配置,并把缺失的密钥保存到文件。
sn-image-imitate
6.0k帮你的智能体创建新图片,复制参考图的风格,同时把内容改为符合你要求的画面。