fix: make well-known discovery compatible with npx skills CLI#49
Conversation
Emit the exact Agent Skills discovery $schema URI the CLI matches on, use kebab-case slugs as install names, and generate installCommand as host + --skill so adds no longer fail with "No skills found". Assisted-by: Cursor Grok 4.5 Co-authored-by: Cursor <cursoragent@cursor.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: johnmcollier The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
PR Summary by QodoFix well-known discovery and installCommand for npx skills CLI
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
Code Review by Qodo
1.
|
Reject non-kebab-case skill directory names at ingest, omit invalid slugs from the well-known index, quote --skill as a single token, and sanitize Host headers so spoofed origins are not reflected into installCommand / artifact URLs. Assisted-by: Cursor Grok 4.5 Co-authored-by: Cursor <cursoragent@cursor.com>
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit 9b2d807 |
Parse Host as a URL authority so legitimate [::1]:port values are kept while credentials/path/query spoof forms still fall back to localhost. Assisted-by: Cursor Grok 4.5 Co-authored-by: Cursor <cursoragent@cursor.com>
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit cc9299d |
Compare Host to the URL parser authority case-insensitively and emit the canonical host form so mixed-case DNS/IPv6 values no longer fall back to localhost. Assisted-by: Cursor Grok 4.5 Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
/.well-known/agent-skills/index.json$schemato the exact URI required bynpx skills(https://schemas.agentskills.io/discovery/0.2.0/schema.json), which was rejecting RHESS indexes as empty.names, truncate descriptions to 1024 chars, and changeinstallCommandtonpx skills add <host> --skill <slug>.PUBLIC_BASE_URLfor TLS-terminating proxies so artifact/install URLs usehttps://.Test plan
npx vitest run test/server/routes/wellKnown.test.ts test/server/routes/skills.test.tsnpx skills add <host> --skill appinsights-instrumentation --listsucceeds after schema fixnpx skills add https://<route> --skill appinsights-instrumentationMade with Cursor