Skip to content

feat: support configurable default write directory for skills#8177

Open
uf-hy wants to merge 1 commit into
NousResearch:mainfrom
uf-hy:feat/default-write-dir
Open

feat: support configurable default write directory for skills#8177
uf-hy wants to merge 1 commit into
NousResearch:mainfrom
uf-hy:feat/default-write-dir

Conversation

@uf-hy

@uf-hy uf-hy commented Apr 12, 2026

Copy link
Copy Markdown

Summary

When skills.external_dirs is configured for a shared skill library, skill_manage create/edit still writes to ~/.hermes/skills/. This adds a skills.default_write_dir config option so new skills land in the user's preferred directory.

Closes #4381

Changes

agent/skill_utils.py

  • Add get_default_write_dir() — reads skills.default_write_dir from config.yaml, validates the path exists and differs from the local skills dir

tools/skill_manager_tool.py

  • _resolve_skill_dir() — uses default_write_dir when set, falls back to ~/.hermes/skills/
  • _create_skill() — fixes relative_to() crash when skill is created outside the local dir
  • _delete_skill() — hardens empty-parent cleanup to only operate within known skill roots

Config

skills:
  default_write_dir: ~/.claude/skills  # or any shared vault path
  external_dirs:
    - ~/.claude/skills

When default_write_dir is unset or the path does not exist, behavior is identical to before.

Testing

All 77 existing skill-related tests pass (test_skill_manager_tool, test_skill_improvements, test_skill_size_limits).

When skills.external_dirs is configured, skill_manage create/edit still
writes to ~/.hermes/skills/. This adds a skills.default_write_dir config
option so new skills land in the user's preferred directory (e.g. a shared
vault or cross-agent skill library).

Changes:
- Add get_default_write_dir() in skill_utils.py, reading
  skills.default_write_dir from config.yaml with full validation
  (path must exist, must differ from local skills dir)
- Update _resolve_skill_dir() to use default_write_dir when set
- Fix _create_skill() relative path calculation for non-local write dirs
- Harden _delete_skill() empty-parent cleanup to only operate within
  known skill roots

Fully backward compatible: when default_write_dir is unset or invalid,
behavior is unchanged.

Closes NousResearch#4381
@aifeier-l

Copy link
Copy Markdown

This setting is so good!Plz merge this ASAP! Thanks!

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/agent Core agent loop, run_agent.py, prompt builder tool/skills Skills system (list, view, manage) labels Apr 27, 2026
@Pedrohgv

Copy link
Copy Markdown

Is this PR merge still planned? Really useful for custom setups where the self-healing feature is desired and where the skills are maintained in a place that is not the default skills location

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder 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.

[Feature]: skills create / skills edit should support writing to a configurable target directory

4 participants