feat: skills catalog REST API — list, detail, search, Fuse.js, error handler (tasks 5.1-5.3, 5.5-5.7)#6
Conversation
PR Summary by QodoAdd skills catalog read API with Fuse.js search and Fastify error handling Description
Diagram
High-Level Assessment
Files changed (9)
|
Code Review by Qodo
1.
|
…AILED) Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
c0808ff to
fe8d845
Compare
Summary
Implements the Skills Catalog read API in
src/server/routes/skills.tsandsrc/server/search/FuseSearchProvider.ts.GET /api/v1/skills— paginated listing;page,per_page(1–100),sort(name|updated_at); response{data, meta:{page, per_page, total}}; 400 on invalid paramsGET /api/v1/skills/search?q=— registered before/:source/:slugto avoid path conflict; Fuse.js fuzzy search over name, description, sourceSlug; ranked results withscore; 400 on missingqGET /api/v1/skills/:source/:slug— full detail withfiles:[{path, contents}]; 404SKILL_NOT_FOUNDFuseSearchProvider— implementsSearchProvider; threshold 0.4 (typo-tolerant); index rebuilt from full catalog at startup and after each sync{error:{code, message}}; Fastify validation errors → 400Notes
Test plan
npm run build:server— zero TypeScript errorsnpm test— 74/74 passing; 17 new skills route testsRelated
Made with Cursor