Skip to content

feat: Auto-register ai-skills for extensions whenever applicable#1840

Merged
mnriem merged 8 commits intogithub:mainfrom
dhilipkumars:add-ext-skills
Mar 25, 2026
Merged

feat: Auto-register ai-skills for extensions whenever applicable#1840
mnriem merged 8 commits intogithub:mainfrom
dhilipkumars:add-ext-skills

Conversation

@dhilipkumars
Copy link
Contributor

@dhilipkumars dhilipkumars commented Mar 13, 2026

Description

Testing

$ specify extension add Extensify --from https://github.com/mnriem/spec-kit-extensions/releases/download/extensify-v1.0.0/extensify.zip
Warning: Installing from external URL.
Only install extensions from sources you trust.

Downloading from https://github.com/mnriem/spec-kit-extensions/releases/download/extensify-v1.0.0/extensify.zip...

✓ Extension installed successfully!

Extensify (v1.0.0)
  Create and validate extensions and extension catalogs.

Provided commands:
  • speckit.extensify.create-extension - Scaffold a new extension from scratch.
  • speckit.extensify.validate-extension - Validate an extension directory for correctness.
  • speckit.extensify.create-catalog - Create a catalog.json for a self-hosted extension catalog.
  • speckit.extensify.validate-catalog - Validate an extension catalog.json file for correctness.

✓ 4 agent skill(s) auto-registered

⚠  Configuration may be required
   Check: .specify/extensions/extensify/

and has these regirsted as skills

ls -lart .agent/skills/
total 0
drwxr-xr-x@  3 dhilipkumars  staff   96 Mar 25 06:39 speckit-analyze
drwxr-xr-x@  3 dhilipkumars  staff   96 Mar 25 06:39 speckit-checklist
drwxr-xr-x@  3 dhilipkumars  staff   96 Mar 25 06:39 speckit-clarify
drwxr-xr-x@  3 dhilipkumars  staff   96 Mar 25 06:39 speckit-constitution
drwxr-xr-x@  3 dhilipkumars  staff   96 Mar 25 06:39 speckit-implement
drwxr-xr-x@  3 dhilipkumars  staff   96 Mar 25 06:39 speckit-plan
drwxr-xr-x@  3 dhilipkumars  staff   96 Mar 25 06:39 speckit-specify
drwxr-xr-x@  3 dhilipkumars  staff   96 Mar 25 06:39 speckit-tasks
drwxr-xr-x@  3 dhilipkumars  staff   96 Mar 25 06:39 speckit-taskstoissues
drwxr-xr-x@  3 dhilipkumars  staff   96 Mar 25 06:39 ..
drwxr-xr-x@  3 dhilipkumars  staff   96 Mar 25 06:50 speckit-extensify.create-extension
drwxr-xr-x@  3 dhilipkumars  staff   96 Mar 25 06:50 speckit-extensify.validate-extension
drwxr-xr-x@  3 dhilipkumars  staff   96 Mar 25 06:50 speckit-extensify.create-catalog
drwxr-xr-x@ 15 dhilipkumars  staff  480 Mar 25 06:50 .
drwxr-xr-x@  3 dhilipkumars  staff   96 Mar 25 06:50 speckit-extensify.validate-catalog

tested with Antigravity

  • Tested locally with uv run specify --help
  • Ran existing tests with uv sync && uv run pytest
  • Tested with a sample project (if applicable)

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (describe below)
    used anti-gravity

Fixes: #1795

@dhilipkumars dhilipkumars requested a review from mnriem as a code owner March 13, 2026 23:30
Copilot AI review requested due to automatic review settings March 13, 2026 23:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@dhilipkumars dhilipkumars marked this pull request as draft March 13, 2026 23:34
Copy link
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address Copilot feedback. Love this small addition :)

@dhilipkumars
Copy link
Contributor Author

Please address Copilot feedback. Love this small addition :)

Thanks @mnriem was away last week, will work on it this week.

Copilot AI review requested due to automatic review settings March 25, 2026 01:14
@dhilipkumars dhilipkumars marked this pull request as ready for review March 25, 2026 01:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md skills for extension commands when --ai-skills was 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
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@dhilipkumars
Copy link
Contributor Author

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Ah! finally :-)
@mnriem PTAL

@mnriem mnriem self-requested a review March 25, 2026 12:48
@mnriem mnriem merged commit 36019eb into github:main Mar 25, 2026
11 of 12 checks passed
@mnriem
Copy link
Collaborator

mnriem commented Mar 25, 2026

Thank you!

RbBtSn0w pushed a commit to RbBtSn0w/spec-kit that referenced this pull request Mar 26, 2026
…hub#1840)

* feat: Auto-register ai-skills for extensions whenever applicable

* fix: failing test

* fix: address copilot review comments – path traversal guard and use short_name in title

* fix: address remaining copilot review comments – is_file guard, skills type-validation, and exact extension ownership check on fallback rmtree

* fix: address copilot round-3 comments – align skill naming with presets.py convention, safe rmdir on fail, require SKILL.md for fallback rmtree, normalize skill_count in CLI

* fix: is_dir() guard in fast-path rmtree and fix ghost-skill assertion naming

* fix: path-traversal guard on skill_name in both rmtree paths of _unregister_extension_skills

* fix: add SKILL.md ownership check to fast-path rmtree and alias shadowed _get_skills_dir import
jonasbokim added a commit to Jonas-Construction-Software/jonas-spec-kit-dev that referenced this pull request Mar 26, 2026
…nc-main-2026-03-25

* upstream/main: (90 commits)
  fix(ps1): replace null-conditional operator for PowerShell 5.1 compatibility (github#1975)
  chore: bump version to 0.4.2 (github#1973)
  feat: Auto-register ai-skills for extensions whenever applicable (github#1840)
  docs: add manual testing guide for slash command validation (github#1955)
  Add AIDE, Extensify, and Presetify to community extensions (github#1961)
  docs: add community presets section to main README (github#1960)
  docs: move community extensions table to main README for discoverability (github#1959)
  docs(readme): consolidate Community Friends sections and fix ToC anchors (github#1958)
  fix(commands): rename NFR references to success criteria in analyze and clarify (github#1935)
  Add Community Friends section to README (github#1956)
  docs: add Community Friends section with Spec Kit Assistant VS Code extension (github#1944)
  chore: bump version to 0.4.1 (github#1953)
  Add checkpoint extension (github#1947)
  fix(scripts): prioritize .specify over git for repo root detection (github#1933)
  docs: add AIDE extension demo to community projects (github#1943)
  fix(templates): add missing Assumptions section to spec template (github#1939)
  chore: bump version to 0.4.0 (github#1937)
  fix(cli): add allow_unicode=True and encoding="utf-8" to YAML I/O (github#1936)
  fix(codex): native skills fallback refresh + legacy prompt suppression (github#1930)
  feat(cli): embed core pack in wheel for offline/air-gapped deployment (github#1803)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Auto-register extensions as Agent Skills

3 participants