feat: Auto-register ai-skills for extensions whenever applicable#1840
feat: Auto-register ai-skills for extensions whenever applicable#1840dhilipkumars wants to merge 8 commits intogithub:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds automatic agent-skill (agentskills.io) generation for extension commands when a project was initialized with --ai-skills, and ensures those skills are tracked and cleaned up on extension removal.
Changes:
- Add skill directory detection plus skill register/unregister hooks to
ExtensionManager(tracked in extension registry metadata). - Update CLI output and docs to surface skill auto-registration behavior.
- Add comprehensive unit tests for skill creation, YAML parsing, non-overwrite behavior, and removal cleanup (including fallback cleanup when init-options change).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_extension_skills.py |
Adds unit tests covering extension skill auto-registration and cleanup behaviors. |
src/specify_cli/extensions.py |
Implements skill dir lookup, skill generation for extension commands, registry tracking, and uninstall cleanup (with fallback scan). |
src/specify_cli/__init__.py |
Updates extension add/remove CLI output to include registered skill counts. |
extensions/EXTENSION-USER-GUIDE.md |
Documents the new auto-registration behavior for agent skills. |
README.md |
Updates --ai-skills option description to mention extension command auto-registration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback. Love this small addition :)
Thanks @mnriem was away last week, will work on it this week. |
7ee6858 to
9ecbd6a
Compare
…hort_name in title
There was a problem hiding this comment.
Pull request overview
Adds feature parity for projects initialized with --ai-skills by automatically generating agent-skill wrappers for extension commands on install, tracking them in the extension registry, and cleaning them up on uninstall.
Changes:
- Auto-generate
SKILL.mdskills for extension commands when--ai-skillswas enabled at init; store created skill names in extension registry metadata. - Remove registered extension skills during
specify extension remove, with a fallback scan when init options are missing/toggled. - Add dedicated unit tests and update CLI/docs output to surface auto-registered skill counts; harden a preset test against network catalog fetching.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/specify_cli/extensions.py |
Implements skill dir detection, extension skill generation, registry tracking, and skill cleanup on removal. |
src/specify_cli/__init__.py |
Updates extension add/remove CLI output to show skill registration/removal counts. |
tests/test_extension_skills.py |
Adds comprehensive unit tests for auto-registration, YAML validity, non-overwrite behavior, and cleanup. |
tests/test_presets.py |
Ensures cached-catalog search test doesn’t hit network by forcing default catalog URL. |
extensions/EXTENSION-USER-GUIDE.md |
Documents automatic agent-skill registration behavior and non-overwrite guarantees. |
README.md |
Updates --ai-skills option description to mention extension skill auto-registration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…s type-validation, and exact extension ownership check on fallback rmtree
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ts.py convention, safe rmdir on fail, require SKILL.md for fallback rmtree, normalize skill_count in CLI
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…gister_extension_skills
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…wed _get_skills_dir import
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Testing
uv run specify --helpuv sync && uv run pytestAI Disclosure
Fixes: #1795