fix(skills): create new skills in external skill dir - #23562
Open
LeonSGP43 wants to merge 1 commit into
Open
Conversation
Collaborator
teknium1
reviewed
Jul 13, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for addressing the inconsistency between external skill discovery and creation.
Problems
- Current main explicitly documents the opposite contract:
cli-config.yaml.example:668-672says external skill directories are read-only and creation always writes locally.tests/tools/test_skill_manager_tool.py:866-879enforces the same behavior. This needs a maintainer policy decision before the change can be salvaged. - The added fallback at
tools/skill_manager_tool.py:279isSKILLS_DIR. Current main commitc6a3d412d462changed creation-path resolution to_skills_dir()so long-lived, profile-scoped runtimes do not use the import-time profile path. Any updated implementation must retain that call-time fallback.
Suggested changes
- If maintainers choose to make external directories authoring roots, update the documented contract and regression test, preserve
_skills_dir()for the local fallback, and cover category plus multiple-external-root selection.
Automated hermes-sweeper review.
| external_dirs = get_external_skills_dirs() | ||
| except Exception: | ||
| external_dirs = [] | ||
|
|
Contributor
There was a problem hiding this comment.
On current main, do not fall back to module-level SKILLS_DIR: commit c6a3d412d462 introduced _skills_dir() so long-lived profile-scoped runtimes resolve the active profile at call time. Preserve _skills_dir() here when no external root is selected.
This was referenced Jul 31, 2026
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.
What does this PR do?
Fixes
skill_manage(action='create')so new skills are created in the configured external skill directory when one is available, instead of always forcing creation into the local bundled skills path.Related Issue
Fixes #21810
Type of Change
Changes Made
tools/skill_manager_tool.pyto consult external skill roots before falling back toSKILLS_DIRtests/tools/test_skill_manager_tool.pyHow to Test
uv run --frozen pytest -q -o addopts='' tests/tools/test_skill_manager_tool.pyuv run --frozen ruff check tools/skill_manager_tool.py tests/tools/test_skill_manager_tool.pyChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
uv run --frozen pytest -q -o addopts='' tests/tools/test_skill_manager_tool.py->86 passed