mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
feat(skills): add 'hermes skills reset' to un-stick bundled skills (#11468)
When a user edits a bundled skill, sync flags it as user_modified and
skips it forever. The problem: if the user later tries to undo the edit
by copying the current bundled version back into ~/.hermes/skills/, the
manifest still holds the old origin hash from the last successful
sync, so the fresh bundled hash still doesn't match and the skill stays
stuck as user_modified.
Adds an escape hatch for this case.
hermes skills reset <name>
Drops the skill's entry from ~/.hermes/skills/.bundled_manifest and
re-baselines against the user's current copy. Future 'hermes update'
runs accept upstream changes again. Non-destructive.
hermes skills reset <name> --restore
Also deletes the user's copy and re-copies the bundled version.
Use when you want the pristine upstream skill back.
Also available as /skills reset in chat.
- tools/skills_sync.py: new reset_bundled_skill(name, restore=False)
- hermes_cli/skills_hub.py: do_reset() + wired into skills_command and
handle_skills_slash; added to the slash /skills help panel
- hermes_cli/main.py: argparse entry for 'hermes skills reset'
- tests/tools/test_skills_sync.py: 5 new tests covering the stuck-flag
repro, --restore, unknown-skill error, upstream-removed-skill, and
no-op on already-clean state
- website/docs/user-guide/features/skills.md: new 'Bundled skill updates'
section explaining the origin-hash mechanic + reset usage
This commit is contained in:
parent
a55a133387
commit
e5cde568b7
5 changed files with 351 additions and 1 deletions
|
|
@ -278,6 +278,8 @@ hermes skills check # Check installed hub skills f
|
|||
hermes skills update # Reinstall hub skills with upstream changes when needed
|
||||
hermes skills audit # Re-scan all hub skills for security
|
||||
hermes skills uninstall k8s # Remove a hub skill
|
||||
hermes skills reset google-workspace # Un-stick a bundled skill from "user-modified" (see below)
|
||||
hermes skills reset google-workspace --restore # Also restore the bundled version, deleting your local edits
|
||||
hermes skills publish skills/my-skill --to github --repo owner/repo
|
||||
hermes skills snapshot export setup.json # Export skill config
|
||||
hermes skills tap add myorg/skills-repo # Add a custom GitHub source
|
||||
|
|
@ -430,6 +432,43 @@ This uses the stored source identifier plus the current upstream bundle content
|
|||
Skills hub operations use the GitHub API, which has a rate limit of 60 requests/hour for unauthenticated users. If you see rate-limit errors during install or search, set `GITHUB_TOKEN` in your `.env` file to increase the limit to 5,000 requests/hour. The error message includes an actionable hint when this happens.
|
||||
:::
|
||||
|
||||
## Bundled skill updates (`hermes skills reset`)
|
||||
|
||||
Hermes ships with a set of bundled skills in `skills/` inside the repo. On install and on every `hermes update`, a sync pass copies those into `~/.hermes/skills/` and records a manifest at `~/.hermes/skills/.bundled_manifest` mapping each skill name to the content hash at the time it was synced (the **origin hash**).
|
||||
|
||||
On each sync, Hermes recomputes the hash of your local copy and compares it to the origin hash:
|
||||
|
||||
- **Unchanged** → safe to pull upstream changes, copy the new bundled version in, record the new origin hash.
|
||||
- **Changed** → treated as **user-modified** and skipped forever, so your edits never get stomped.
|
||||
|
||||
The protection is good, but it has one sharp edge. If you edit a bundled skill and then later want to abandon your changes and go back to the bundled version by just copy-pasting from `~/.hermes/hermes-agent/skills/`, the manifest still holds the *old* origin hash from whenever the last successful sync ran. Your fresh copy-paste contents (current bundled hash) won't match that stale origin hash, so sync keeps flagging it as user-modified.
|
||||
|
||||
`hermes skills reset` is the escape hatch:
|
||||
|
||||
```bash
|
||||
# Safe: clears the manifest entry for this skill. Your current copy is preserved,
|
||||
# but the next sync re-baselines against it so future updates work normally.
|
||||
hermes skills reset google-workspace
|
||||
|
||||
# Full restore: also deletes your local copy and re-copies the current bundled
|
||||
# version. Use this when you want the pristine upstream skill back.
|
||||
hermes skills reset google-workspace --restore
|
||||
|
||||
# Non-interactive (e.g. in scripts or TUI mode) — skip the --restore confirmation.
|
||||
hermes skills reset google-workspace --restore --yes
|
||||
```
|
||||
|
||||
The same command works in chat as a slash command:
|
||||
|
||||
```text
|
||||
/skills reset google-workspace
|
||||
/skills reset google-workspace --restore
|
||||
```
|
||||
|
||||
:::note Profiles
|
||||
Each profile has its own `.bundled_manifest` under its own `HERMES_HOME`, so `hermes -p coder skills reset <name>` only affects that profile.
|
||||
:::
|
||||
|
||||
### Slash commands (inside chat)
|
||||
|
||||
All the same commands work with `/skills`:
|
||||
|
|
@ -442,6 +481,7 @@ All the same commands work with `/skills`:
|
|||
/skills install openai/skills/skill-creator --force
|
||||
/skills check
|
||||
/skills update
|
||||
/skills reset google-workspace
|
||||
/skills list
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue