Skip to content

feat(skills): find & diff user-modified bundled skills - #47802

Closed
xxxigm wants to merge 2 commits into
NousResearch:mainfrom
xxxigm:feat/skills-list-modified-diff
Closed

feat(skills): find & diff user-modified bundled skills#47802
xxxigm wants to merge 2 commits into
NousResearch:mainfrom
xxxigm:feat/skills-list-modified-diff

Conversation

@xxxigm

@xxxigm xxxigm commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Reported on Discord (Hana): hermes update says certain skills were "modified by the user" and won't be updated, but there's no way to see which skills, diff them, or know they're recoverable. They end up stuck stale even though the edits were inadvertent.

Verified against main:

  • Reverting already existshermes skills reset <name> (re-baseline, keep your copy) and hermes skills reset <name> --restore (replace with stock). ✅
  • Listing the flagged skills is a real gap — hermes update only prints ~ N user-modified (kept), no names. ❌
  • Diffing against the stock version is a real gap. ❌

This PR closes the two gaps, reusing the manifest origin-hash that the sync engine already maintains (~/.hermes/skills/.bundled_manifest). No new model tools — pure CLI surface (Footprint Ladder rung 1–2).

Changes (commit 1)

  • tools/skills_sync.py:
    • list_user_modified_bundled_skills() — returns the bundled skills whose on-disk copy diverges from the last-synced origin hash (the exact test the sync loop uses to decide what to skip).
    • diff_bundled_skill(name) — unified diff of the user copy vs the current bundled (stock) copy, per file (modified / added / removed / binary).
  • hermes skills list-modified [--json] and hermes skills diff <name> (parser + router + handlers), mirrored as /skills list-modified and /skills diff.
  • hermes update's "user-modified" notice now points at hermes skills list-modified.
$ hermes update
  ...
  ~ 2 user-modified (kept)
    → see them: hermes skills list-modified  (diff/reset to resume updates)

$ hermes skills list-modified
  2 user-modified bundled skill(s) (kept as-is by `hermes update`):
    ~ google-workspace
    ~ research
  See changes:    hermes skills diff <name>
  Resume updates: hermes skills reset <name>            (keep your copy, re-baseline)
  Revert to stock: hermes skills reset <name> --restore

Test plan (commit 2)

  • scripts/run_tests.sh tests/tools/test_skills_list_modified_diff.py — 6 passed. Exercises the real sync pipeline (no mocked comparison): pristine → not flagged; edited → listed + diffed (modified & added files); unknown skill → not-ok; reset --restore clears the modified state so revert and discovery agree.
  • scripts/run_tests.sh tests/hermes_cli/test_skills_hub.py tests/hermes_cli/test_argparse_flag_propagation.py — 45 passed (no parser/routing regressions).

xxxigm added 2 commits June 17, 2026 17:41
`hermes update` keeps (won't overwrite) bundled skills the user edited
locally, but only printed a count — "~ N user-modified (kept)" — with no way
to learn which skills, or see what changed. Reverting already existed
(`hermes skills reset <name> [--restore]`); discovery and inspection did not.

Add two CLI commands (zero model-tool footprint), reusing the manifest
origin-hash that sync already maintains:

- `hermes skills list-modified [--json]` — list the bundled skills whose
  on-disk copy diverges from the last-synced origin hash (the exact test the
  sync loop uses to decide what to skip).
- `hermes skills diff <name>` — unified diff between the user's copy and the
  current bundled (stock) version, so the user can confirm what changed
  before reverting.

Both are mirrored as `/skills list-modified` and `/skills diff`. The
`hermes update` notice now points at `hermes skills list-modified`. Core
helpers `list_user_modified_bundled_skills()` and `diff_bundled_skill()` live
in tools/skills_sync.py alongside the existing reset logic.
Exercises the real sync pipeline (no mocked comparison logic): a pristine
synced skill is not flagged; an edited one is listed and diffed (modified +
added files); an unknown skill returns not-ok; and `reset --restore` clears
the modified state so revert and discovery stay consistent.
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard tool/skills Skills system (list, view, manage) labels Jun 17, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related: #28213 (Skill Lifecycle Transparency: hermes skills status + diff), #18402 (hermes update should show what changed / offer to reset user-modified skills), #29856 (misleading hermes skills reset success message). This PR implements the list-modified + diff surface those issues ask for, reusing the existing .bundled_manifest origin-hash.

@kshitijk4poor

Copy link
Copy Markdown
Collaborator

Thanks for this @xxxigm — clean implementation and the detection logic correctly mirrors the sync engine's user-modified test (frontmatter-name + full category path, not dirname), which matters for the 36/240 bundled skills whose frontmatter name differs from their directory and the 36 that nest in deeper categories.

I've salvaged your commits into #48286 (your authorship is preserved via cherry-pick). The salvage adds two small fixes found during review:

  • Sibling notice — the ~ N user-modified (kept) hint was added to the git-pull update path but the byte-identical notice in the unpack/install path was missed; mirrored it to both (plus an invariant test guarding the drift).
  • diff verbhermes skills diff <name> now shares the verb with the gateway write-approval diff <id>; updated the gateway handler's docstring + chat-truncation message (which pointed at /skills diff <id> on the CLI) to avoid the collision.

Closing in favor of #48286. Thanks again!

kshitijk4poor added a commit that referenced this pull request Jun 18, 2026
…fied-diff

feat(skills): find & diff user-modified bundled skills (salvage of #47802)
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…ls-list-modified-diff

feat(skills): find & diff user-modified bundled skills (salvage of NousResearch#47802)
habarmc1223-sudo pushed a commit to habarmc1223-sudo/hermes-agent-fluxmem that referenced this pull request Jul 8, 2026
…ls-list-modified-diff

feat(skills): find & diff user-modified bundled skills (salvage of NousResearch#47802)
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
…ls-list-modified-diff

feat(skills): find & diff user-modified bundled skills (salvage of NousResearch#47802)
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…ls-list-modified-diff

feat(skills): find & diff user-modified bundled skills (salvage of NousResearch#47802)
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
…ls-list-modified-diff

feat(skills): find & diff user-modified bundled skills (salvage of NousResearch#47802)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have tool/skills Skills system (list, view, manage) type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants