strix
strix copied to clipboard
Add skill directory registration
Summary
- Add registration for extra skill directories searched ahead of packaged skills.
- Route prompt template loading through the combined skill search roots.
- Add tests for registration order, skill discovery, overrides, built-in fallback, and missing skills.
Validation
uv run pytest tests/test_skill_dir_extension.pyuv run ruff check strix/agents/prompt.py strix/skills/__init__.py tests/test_skill_dir_extension.py
@greptileai
Greptile Summary
This PR adds support for registering extra skill directories. The main changes are:
- Extra skill roots searched before packaged skills.
- Prompt loading routed through the combined skill search roots.
- Skill discovery and validation updated for root skills and qualified names.
- Tests added for registration order, overrides, fallback, ambiguity, and missing skills.
Confidence Score: 5/5
This looks safe to merge.
- No blocking issues found in the changed code.
- The root skill and ambiguous bare-name cases are now handled consistently by validation and loading.
Important Files Changed
| Filename | Overview |
|---|---|
| strix/skills/init.py | Adds skill directory registration, combined search roots, root skill discovery, qualified skill validation, ambiguity handling, and updated loading. |
| strix/agents/prompt.py | Uses the shared skill search roots when building the prompt template loader. |
| tests/test_skill_dir_extension.py | Adds tests for extra skill directories, root skills, overrides, fallback, ambiguity, and missing skills. |
Reviews (4): Last reviewed commit: "Add skill directory registration" | Re-trigger Greptile
Greptile Summary
This PR adds support for registering extra skill directories. The main changes are:
- Extra skill roots are searched before packaged skills.
- Prompt template loading uses the combined skill search roots.
- Skill discovery and loading now deduplicate across roots.
- Tests cover registration order, overrides, fallback, and missing skills.
Confidence Score: 5/5
This looks safe to merge after a small cleanup to bare-name resolution.
- No blocking issues found in the changed code.
- Duplicate bare skill names inside a registered root can resolve by filesystem order.
strix/skills/init.py
Important Files Changed
| Filename | Overview |
|---|---|
| strix/agents/prompt.py | Prompt rendering now includes registered skill roots in the Jinja loader search path. |
| strix/skills/init.py | Skill registration, search-root precedence, discovery, and loading were updated for extra directories. |
| tests/test_skill_dir_extension.py | New tests cover extra directory registration, overrides, builtin fallback, and missing skills. |
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
strix/skills/__init__.py:103-108
**Bare Skill Names Resolve Arbitrarily**
When a registered skill root contains the same file name in two categories, `get_all_skill_names()` exposes only the bare name but `_resolve_skill_file()` loads whichever category `iterdir()` returns first. A request like `load_skills(["widget"])` can therefore load different skill content depending on filesystem order, so callers may get the wrong prompt text unless they use a category-qualified name.
Reviews (2): Last reviewed commit: "Add skill directory registration" | Re-trigger Greptile
@greptileai
@greptileai