Skip to content

feat(skills): refuse skill_manage writes on pinned skills#17562

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-2a198d0f
Apr 29, 2026
Merged

feat(skills): refuse skill_manage writes on pinned skills#17562
teknium1 merged 1 commit into
mainfrom
hermes/hermes-2a198d0f

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

Summary

Pinning a skill now blocks the agent's skill_manage tool from editing or deleting it — not just the curator's auto-transitions. Users get a hard fence against unwanted agent edits.

Changes

  • tools/skill_manager_tool.py: new _pinned_guard(name) helper; called in _edit_skill, _patch_skill, _delete_skill, _write_file, _remove_file right after the skill is located. Returns {success: false, error: "...hermes curator unpin <name>..."} on a pinned skill.
  • tools/skill_manager_tool.py: schema description advertises the refusal so models don't try to route around it (rename/recreate).
  • tests/tools/test_skill_manager_tool.py: 8 new tests in TestPinnedGuard — one per action, one proving sibling skills are unaffected, one proving a broken sidecar fails open.

Design notes

  • Create is not guarded: you can't pin a name that doesn't exist, and name-collision already errors.
  • Fails open on sidecar errors — a corrupted ~/.hermes/skills/.usage.json shouldn't lock the agent out of every skill it's otherwise allowed to touch.
  • No escape hatch flag. Teknium explicitly rejected option B (a --unpin-first param on skill_manage) — the point of pinning is to stop the agent from routing around the fence.

Validation

Before After
Pin a skill, agent runs skill_manage action=edit Goes through, skill overwritten Refused with message pointing to hermes curator unpin
Curator auto-transitions on pinned skill Already skipped Still skipped (no change)
tests/tools/test_skill_manager_tool.py 66 passing 74 passing (8 new)
tests/tools/test_skill_usage.py + test_curator*.py 82 passing 82 passing (no regressions)

How users pin

hermes curator pin <skill> / hermes curator unpin <skill> — CLI subcommands already shipped with the curator. Only agent-created skills are pinnable (bundled/hub skills are gated out with an explicit error by the curator CLI).

Extend curator's pin flag from 'skip auto-transitions' to 'no agent
edits at all'. All five skill_manage mutation actions (edit, patch,
delete, write_file, remove_file) now refuse pinned skills with a
message pointing the user at `hermes curator unpin <name>`.

Motivation: pin used to only stop the curator's own maintenance pass
from touching a skill. Nothing prevented the main agent from editing
or deleting a pinned skill via skill_manage in-session. This gives
users a hard fence against unwanted agent edits — same semantics as
curator pinning, extended to the write tool.

Create is unaffected (you can't pin a name that doesn't exist yet,
and name collisions already error out). Broken sidecars fail open
rather than lock the agent out.

The schema description advertises the new refusal so models know
not to route around it with rename/recreate tricks.
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have tool/skills Skills system (list, view, manage) labels Apr 29, 2026
@teknium1 teknium1 merged commit c61b2e0 into main Apr 29, 2026
11 of 12 checks passed
@teknium1 teknium1 deleted the hermes/hermes-2a198d0f branch April 29, 2026 17:28
teknium1 added a commit that referenced this pull request Apr 29, 2026
…17578)

Add a dedicated 'Pinning a skill' section that covers both gating
layers — curator auto-transitions AND the agent's skill_manage tool
— so users know what the flag actually protects against after
PR #17562. Updates the one-line claim in 'How it runs' to cross-link
the new section instead of only mentioning auto-transitions.
donald131 pushed a commit to donald131/hermes-agent that referenced this pull request May 2, 2026
…ch#17562)

Extend curator's pin flag from 'skip auto-transitions' to 'no agent
edits at all'. All five skill_manage mutation actions (edit, patch,
delete, write_file, remove_file) now refuse pinned skills with a
message pointing the user at `hermes curator unpin <name>`.

Motivation: pin used to only stop the curator's own maintenance pass
from touching a skill. Nothing prevented the main agent from editing
or deleting a pinned skill via skill_manage in-session. This gives
users a hard fence against unwanted agent edits — same semantics as
curator pinning, extended to the write tool.

Create is unaffected (you can't pin a name that doesn't exist yet,
and name collisions already error out). Broken sidecars fail open
rather than lock the agent out.

The schema description advertises the new refusal so models know
not to route around it with rename/recreate tricks.
donald131 pushed a commit to donald131/hermes-agent that referenced this pull request May 2, 2026
…ousResearch#17578)

Add a dedicated 'Pinning a skill' section that covers both gating
layers — curator auto-transitions AND the agent's skill_manage tool
— so users know what the flag actually protects against after
PR NousResearch#17562. Updates the one-line claim in 'How it runs' to cross-link
the new section instead of only mentioning auto-transitions.
nickdlkk pushed a commit to nickdlkk/hermes-agent that referenced this pull request May 11, 2026
…ch#17562)

Extend curator's pin flag from 'skip auto-transitions' to 'no agent
edits at all'. All five skill_manage mutation actions (edit, patch,
delete, write_file, remove_file) now refuse pinned skills with a
message pointing the user at `hermes curator unpin <name>`.

Motivation: pin used to only stop the curator's own maintenance pass
from touching a skill. Nothing prevented the main agent from editing
or deleting a pinned skill via skill_manage in-session. This gives
users a hard fence against unwanted agent edits — same semantics as
curator pinning, extended to the write tool.

Create is unaffected (you can't pin a name that doesn't exist yet,
and name collisions already error out). Broken sidecars fail open
rather than lock the agent out.

The schema description advertises the new refusal so models know
not to route around it with rename/recreate tricks.
nickdlkk pushed a commit to nickdlkk/hermes-agent that referenced this pull request May 11, 2026
…ousResearch#17578)

Add a dedicated 'Pinning a skill' section that covers both gating
layers — curator auto-transitions AND the agent's skill_manage tool
— so users know what the flag actually protects against after
PR NousResearch#17562. Updates the one-line claim in 'How it runs' to cross-link
the new section instead of only mentioning auto-transitions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants