← ClaudeAtlas

feathers-servicelisted

Scaffold or extend a FeathersJS v5 (Dove) service using the idiomatic four-file pattern (<name>.ts, <name>.class.ts, <name>.schema.ts, <name>.shared.ts), register it with app.configure, and wire it into the ServiceTypes declaration. Use this whenever the user wants to add a new resource, endpoint, collection, table-backed CRUD service, or "service" to a FeathersJS / Feathers app, or mentions feathers generate service, app.use, a database adapter (Knex/SQL, MongoDB, Memory), or asks why their service isn't registered. Trigger even if they just say "add a posts endpoint" or "make a CRUD resource" in a Feathers project.
hassan4702/feathers-plugin · ★ 3 · API & Backend · score 74
Install: claude install-skill hassan4702/feathers-plugin
# FeathersJS Service Scaffolding A Feathers **service** is an object/class implementing standard CRUD methods (`find`, `get`, `create`, `update`, `patch`, `remove`, plus lifecycle `setup`/`teardown`). Services are transport-independent: the same method works over REST, websockets, or internal calls. Data-mutating methods (`create`/`update`/`patch`/`remove`) auto-emit real-time events (`created`/`updated`/`patched`/`removed`). The official CLI (`npx feathers generate service`) produces **four files per service**. Prefer running the generator if the user has the CLI; otherwise reproduce this structure by hand. Always match the project's existing conventions (id type, database adapter, ESM vs CJS) — read a sibling service first. ## Method → HTTP mapping | Method | HTTP | Path | | --- | --- | --- | | `find` | GET | `/messages` | | `get` | GET | `/messages/:id` | | `create` | POST | `/messages` | | `update` | PUT | `/messages/:id` (full replace) | | `patch` | PATCH | `/messages/:id` (merge) | | `remove` | DELETE | `/messages/:id` | ## The four files Replace `Message`/`message`/`messages` with the resource. `messages` is the path, `message` is the variable base, `Message` is the type. Pick the right id: SQL/Knex uses `id: Type.Number()`; MongoDB uses `_id: ObjectIdSchema()`. Read `src/declarations.ts` and an existing service to confirm. ### 1. `<name>.class.ts` — the service class For a database-backed service, extend the adapter service rather than hand-writing CRUD. SQL/K