Add project-local skill discovery - #17328
Open
lonelybeanz wants to merge 1 commit into
Open
Conversation
lonelybeanz
force-pushed
the
feat/project-local-skills
branch
from
April 30, 2026 02:11
5113a4a to
3454a45
Compare
Marcuss2
reviewed
May 21, 2026
| """ | ||
| root = _find_project_root(cwd) | ||
| global_skills = get_skills_dir().resolve() | ||
| candidates = [root / ".hermes" / "skills", root / ".ai" / "skills"] |
There was a problem hiding this comment.
Suggested change
| candidates = [root / ".hermes" / "skills", root / ".ai" / "skills"] | |
| candidates = [root / ".hermes" / "skills", root / ".ai" / "skills", root / ".agents" / "skills" ] |
Since this is what codex supports as well and seems reasonable
This was referenced May 27, 2026
9 tasks
Contributor
|
Thanks for the project-local discovery work. The feature is still absent on current main, but this branch needs a cache-aware salvage rather than a direct merge. Problems
Suggested changes
Automated hermes-sweeper review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: Add project-local skill discovery
Title
Add project-local skill discovery
Summary
skill_manage(..., scope="project"), writing to<project>/.hermes/skills/.skills_list,skill_view, and prompt skill snapshots respect project-local precedence while preserving legacySKILLS_DIRmonkeypatch compatibility.skill_viewsecurity checks.Motivation
Project-specific skills should live with the project that owns them instead of permanently polluting the global
~/.hermes/skills/index and every agent prompt. This change enables repositories to carry their own.hermes/skills/or.ai/skills/directories, loaded only when the active working directory belongs to that project.Implementation Notes
agent/skill_utils.pyTERMINAL_CWD,HERMES_CWD, thenos.getcwd().git rev-parse --show-toplevel, falling back to walking parent directories for.git.<git-root>/.hermes/skillsand<git-root>/.ai/skills.tools/skills_tool.pyget_all_skills_dirs()for discovery and view lookup.SKILLS_DIRfallback for older tests/callers that monkeypatch it directly.tools/skill_manager_tool.pyscope="global" | "project"for create operations.agent/prompt_builder.pyTest Plan
Passed locally:
venv/bin/python -m pytest -n 0 tests/tools/test_skills_tool.py tests/tools/test_skill_view_path_check.py tests/tools/test_skill_view_traversal.py tests/tools/test_skill_manager_tool.py tests/agent/test_external_skills.py tests/agent/test_prompt_builder.py tests/agent/test_skill_commands.py tests/tools/test_skill_size_limits.py -q # 331 passed, 2 skipped in 5.22s venv/bin/python -m py_compile agent/skill_utils.py agent/prompt_builder.py tools/skills_tool.py tools/skill_manager_tool.pyAlso passed a smoke test using temporary
HERMES_HOMEand temporary git project:{"created": true, "project_skill_exists": true, "prompt_has_skill": true, "scope": "project", "viewed": true}Known local note:
pytest -qin this environment hitToo many open filesfrom the repository's broad parallel/default test behavior, so the relevant skill/prompt test surface was rerun serially with-n 0and passed.git diff --checkreturns status 2 with no diagnostic output under this local Git 2.50.1 setup; no whitespace issue was reported.Commit
5113a4ad2 Add project-local skill discoveryPatch File
/Users/dujiao/.hermes/pr-prep/0001-project-local-skill-discovery.patchManual PR Commands
If you have a fork:
Then open:
If using GitHub CLI after login: