• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 22063521372

16 Feb 2026 12:53PM UTC coverage: 62.216% (+0.2%) from 61.969%
22063521372

push

github

web-flow
Add basic SkillService implementation and API handlers (#3804)

* Add basic SkillService implementation and API handlers

Implement the SkillService with CRUD operations and wire it into the
API server, replacing the stub handlers for list, install, uninstall,
and getSkillInfo endpoints.

The service lives in pkg/skills/skillsvc/ (sub-package) to avoid an
import cycle between pkg/skills and pkg/storage. It delegates to the
existing SkillStore for persistence and validates all inputs via
ValidateSkillName before any store operations.

Server wiring creates a default SkillStore in createDefaultManagers()
and closes it on shutdown via the cleanup() method. The validate,
build, and push endpoints remain as 501 stubs for future work.

Closes #3741

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Adapt handlers and tests to RESTful API contract

Update skill handlers and tests to align with the RESTful routes
merged in #3818:
- Install: POST /skills with Location header
- Uninstall: DELETE /skills/{name}?scope= (path param + query param)
- Add ValidateScope calls to list, info, and uninstall handlers
- Update tests for new routes and validation
- Regenerate swagger docs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Return 404 for missing skills and respect scope in Info()

Address PR review feedback:
- Info() now returns storage.ErrNotFound (404) instead of
  200 with {installed: false}, consistent with how groups
  and workloads handle missing resources.
- Info() now uses the scope from InfoOptions instead of
  hardcoding ScopeUser.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Address review feedback on handler consistency

Remove duplicate name validation from installSkill handler since the
service layer already validates via ValidateSkillName. Make error
handling consistent across all handlers by returning bare errors
instead of wrapping some with fmt.Errorf. Remove the vestigial
Installed... (continued)

119 of 135 new or added lines in 3 files covered. (88.15%)

10 existing lines in 5 files now uncovered.

44626 of 71727 relevant lines covered (62.22%)

76.06 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

79.58
/pkg/transport/proxy/httpsse/http_proxy.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc