{"data":{"slug":"github-opensensenova-sensenova-skills-skills-sn-update-5a5504e667cb","title":"Refresh SenseNova Skills","summary":"Update installed sn-* skills from upstream repository with backup and version control","url":"https:\/\/skillshunter.net\/skills\/github-opensensenova-sensenova-skills-skills-sn-update-5a5504e667cb","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-opensensenova-sensenova-skills-skills-sn-update-5a5504e667cb","markdown_url":"https:\/\/skillshunter.net\/skills\/github-opensensenova-sensenova-skills-skills-sn-update-5a5504e667cb.md","download_url":"https:\/\/skillshunter.net\/skills\/github-opensensenova-sensenova-skills-skills-sn-update-5a5504e667cb\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"This skill requires the user to have an OpenClaw or hermes-agent install. It handles updating all sn-* skills or specific ones if named, and includes backup and version control features.","instructions":"---\nname: sn-update\ndescription: |\n  Update SenseNova Skills (the sn-* bundle) inside an OpenClaw or hermes-agent\n  install. ALWAYS use this skill when the user says any of: \"update SenseNova\n  skills\", \"update SN skills\", \"\u66f4\u65b0 sensenova skills\", \"\u66f4\u65b0 sn skills\",\n  \"\u5237\u65b0 sn-*\", \"\u5347\u7ea7 sn-* skills\", or names a specific sn-* skill to update\n  (e.g. \"\u66f4\u65b0 sn-ppt-standard\", \"refresh sn-image-base\"). Default scope is the\n  whole sn-* bundle; if the user names specific skills, update ONLY those.\nmetadata:\n  project: SenseNova-Skills\n  tier: 1\n  category: meta\n  user_visible: true\ntriggers:\n  - \"sn-update\"\n  - \"\u66f4\u65b0 sn\"\n  - \"\u66f4\u65b0 sensenova\"\n  - \"update sn skills\"\n  - \"update SN skills\"\n  - \"\u66f4\u65b0 sn skills\"\n  - \"\u5237\u65b0 sn-*\"\n  - \"\u5237\u65b0 sn skills\"\n  - \"\u66f4\u65b0 sn-ppt-standard\"\n  - \"refresh sn-image-base\"\n  - \"update sensenova skills\"\n---\n\n# sn-update\n\nRefresh installed `sn-*` skills from upstream\n[SenseNova-Skills](https:\/\/github.com\/OpenSenseNova\/SenseNova-Skills).\n\n---\n\n## Decide the scope\n\n- No list given \u2192 every `sn-*` skill upstream.\n- Specific skills named \u2192 only those. Don't expand.\n- A named skill missing upstream \u2192 surface as error and stop.\n- User said \"force \/ \u5f3a\u5236\" \u2192 re-install even when up-to-date.\n\n---\n\n## Decide the target agent\n\nCheck which directories exist:\n\n| `~\/.openclaw\/skills\/` | `~\/.hermes\/skills\/` | Target |\n|---|---|---|\n| exists | absent | openclaw |\n| absent | exists | hermes |\n| exists | exists | **ask the user** \u2014 never silently dual-write |\n| absent | absent | no install found, stop |\n\n---\n\n## Sync the upstream repo\n\nPersistent cache at `~\/.cache\/sn-update\/repo\/`. Default URL:\n`https:\/\/github.com\/OpenSenseNova\/SenseNova-Skills.git`. User may override\nwith a fork URL.\n\n- **First run**: if you want to actually limit blob download, use partial\n  clone with `--filter=blob:none --no-checkout`, then sparse-checkout only\n  the selected `skills\/<name>` paths before copying them. `--filter=blob:none`\n  alone does **not** keep the cache small if the full worktree is checked out;\n  that checkout will still download most or all needed blobs. It still\n  preserves history metadata for SHA queries.\n- **Subsequent runs**: fetch + hard-reset to the upstream default branch, and\n  re-apply sparse-checkout for only the requested `skills\/<name>` paths before\n  copying. If updating the whole `sn-*` bundle, expect most\/all skill blobs to\n  be downloaded.\n- **URL changed**: if cache's `origin` differs from the requested URL,\n  delete and re-clone.\n\n---\n\n## Compare versions per skill (A \u2192 B \u2192 C)\n\nFor each skill, pick the highest-precedence signal present on **both**\nsides (installed + upstream); equal \u2192 skip, differ \u2192 install.\n\nUpstream \"version\" is the per-subtree commit SHA \u2014 using repo HEAD would\nmark unrelated skills as stale every time:\n\n```text\ngit -C <cache> log -1 --format=%H -- skills\/<skill-name>\n```\n\n- **A \u2014 `.sn-version` marker**: one-line file inside the installed skill\n  holding the SHA from its last install.\n- **B \u2014 `.sn-release` marker** (fallback): one-line file holding the\n  upstream tag name. Compare against `git describe --tags --abbrev=0`.\n- **C \u2014 optional `version:` field in SKILL.md frontmatter**: parse from\n  YAML on both sides, but only for forks or skills that explicitly add this\n  field. If either side lacks it, C does not apply.\n- **Nothing usable** \u2192 treat as stale and install.\n\nAlways write `.sn-version` on install so future runs can use A.\n\n---\n\n## Install with backup\n\nFor each skill flagged \"install\":\n\n1. **Move** (not copy) any existing `<agent-skills>\/<skill-name>\/` into a\n   single timestamped backup bucket shared by all skills in this run:\n   `~\/.<agent>\/skills_backup\/<UTC-timestamp>\/<skill-name>\/`\n   (e.g. `2026-04-30T15-29-07Z`).\n2. **Copy** `<cache>\/skills\/<skill-name>\/` \u2192 `<agent-skills>\/<skill-name>\/`.\n   **Never symlink** (`ln -s`) from the cache. The cache lives under\n   `~\/.cache\/` with permissions the agent runtime may not be able to\n   traverse, and some runtimes refuse to load skills resolved through\n   symlinks. Always do a real recursive copy so the installed tree is\n   self-contained and owned by the agent skills dir.\n3. **Write `.sn-version`** with the upstream subtree SHA inside the new copy.\n\nIf the bucket ends up empty (all targets were fresh installs), remove it.\n\nThe backup tree is a **sibling** of `skills\/`, never a `.bak` folder\ninside it \u2014 most agent runtimes scan the whole `skills\/` directory and\nwould pick up stale duplicates.\n\n---\n\n## Enforce backup retention\n\nAfter every run, prune the per-agent backup root to **at most 3** buckets.\nTimestamps sort lexicographically; keep the newest 3, delete the rest.\nRun this even when the current run produced no backup of its own.\n\n---\n\n## Report to the user\n\nGroup by status, keep it short:\n\n```text\nUpdated (3): sn-ppt-standard, sn-image-base, sn-deep-research\nAlready up-to-date (5): sn-ppt-creative, sn-ppt-doctor, ...\nBackup: ~\/.openclaw\/skills_backup\/2026-04-30T15-29-07Z\/\n```\n\n- Omit `Backup:` when nothing was backed up.\n- Show SHA pairs (`abc1234 \u2192 def5678`) only if the user asks for detail.\n- Errors get their own line \u2014 never bury them in a success summary.\n\n---\n\n## Edge cases\n\n- **Asks to delete sn-* skills** \u2014 not this skill's job. Decline; point at\n  `~\/.<agent>\/skills_backup\/` if they want to roll back.\n- **User is in the dev repo** and asks to \"update sn skills\" \u2014 they mean\n  push to their agent install. Proceed normally; this skill only touches\n  the cache and the agent install dirs, never the dev checkout.\n- **`sn-update` updating itself** \u2014 fine; the new copy takes effect on\n  the next invocation.\n","use_cases":["User requests to update all sn-* skills","User specifies a particular sn-* skill to update","User wants to force update even if skills are up-to-date"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/OpenSenseNova\/SenseNova-Skills\/blob\/07e7ff8c4bdfd7b79e7402fe94af59d2a5a9749b\/skills\/sn-update\/SKILL.md","source_commit":"07e7ff8c4bdfd7b79e7402fe94af59d2a5a9749b","license":null,"version":null,"listing_approved_at":"2026-11-16","created_at":"2026-11-15T13:07:07.000000Z","updated_at":"2026-11-16T05:16:54.000000Z","seo_title":"Refresh SenseNova Skills","seo_description":"Update installed sn-* skills from upstream repository with backup and version control","seo_keywords":["update sn skills","refresh sn skills","sensenova skills update","sn skills refresh","update sn-* skills"]}}