Skip to content

feat: auto-discover project-local skills from working directory - #4668

Closed
leighton-tidwell wants to merge 1 commit into
NousResearch:mainfrom
leighton-tidwell:feat/project-local-skills
Closed

feat: auto-discover project-local skills from working directory#4668
leighton-tidwell wants to merge 1 commit into
NousResearch:mainfrom
leighton-tidwell:feat/project-local-skills

Conversation

@leighton-tidwell

Copy link
Copy Markdown

Summary

Implements #4667: Auto-discover skills from the working directory (project root) at session start, enabling zero-config project-scoped skill loading.

Problem

When working in a project with skills installed via npx skills experimental_install (or manually placed in .claude/skills/), those skills are only discoverable through the global external_dirs config — which pollutes every other project's context. There's no project-scoped skill discovery.

Solution

Auto-discover skills from well-known project directories, checked in order from the git root (or cwd if not in a repo):

  1. <project_root>/.hermes/skills/ — Hermes-native, project-scoped
  2. <project_root>/.agents/skills/ — Agent-agnostic convention (forward-looking)
  3. <project_root>/.claude/skills/ — Interop with npx skills / Claude Code / 41+ agents

Key behaviors

  • Zero config — just works when skill directories exist in the project
  • Read-onlyskill_manage still writes to ~/.hermes/skills/
  • Precedence: local > project > external (first seen name wins)
  • Source tagging: skills_list() now includes a source field ("local", "project", or "external") for each skill
  • Full integration: project skills appear as slash commands, are viewable via skill_view(), and show in the system prompt skill index

Changes

File Change
agent/skill_utils.py Add get_project_skills_dirs(), _find_project_root(), update get_all_skills_dirs()
tools/skills_tool.py Update _find_all_skills() with source tagging + project dir scanning; update skill_view()
agent/skill_commands.py Include project dirs in scan_skill_commands()
tests/agent/test_project_local_skills.py 17 new tests covering discovery, precedence, source tagging, viewing, and slash commands

Testing

  • 17 new tests — all passing
  • 281 existing skill-related tests — all passing, 0 regressions

Closes #4667

Implements NousResearch#4667: When working in a project that has skills in well-known
directories, Hermes now auto-discovers them without any config needed.

Discovery paths (checked in order from git root / cwd):
  1. <project_root>/.hermes/skills/  — Hermes-native, project-scoped
  2. <project_root>/.agents/skills/  — Agent-agnostic convention
  3. <project_root>/.claude/skills/  — Interop with npx skills / Claude Code

Key behaviors:
- Zero config — just works when skill dirs exist in the project
- Read-only — skill_manage still writes to ~/.hermes/skills/
- Precedence: local > project > external (first seen name wins)
- Source tagging: skills_list() now includes a 'source' field
  ('local', 'project', or 'external') for each skill
- Project skills appear as slash commands via scan_skill_commands()
- skill_view() searches project dirs alongside local/external

Changes:
- agent/skill_utils.py: Add get_project_skills_dirs(), _find_project_root(),
  update get_all_skills_dirs() to include project dirs
- tools/skills_tool.py: Update _find_all_skills() with source tagging and
  project dir scanning; update skill_view() to search project dirs
- agent/skill_commands.py: Include project dirs in scan_skill_commands()
- tests/agent/test_project_local_skills.py: 17 tests covering discovery,
  precedence, source tagging, skill_view, and slash commands

Closes NousResearch#4667
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint tool/skills Skills system (list, view, manage) labels May 1, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related to #17328 — also implements project-local skill discovery for #4667. Please coordinate to avoid duplicated effort.

@alt-glitch

Copy link
Copy Markdown
Collaborator

Related to #17328 — also implements project-local skill discovery for #4667.

@leighton-tidwell

Copy link
Copy Markdown
Author

Closing in favor of #17328 implementation. I don't have the time to update this branch unfortunately.

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

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint 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]: Auto-discover project-local skills from working directory

2 participants