Claude Prompt
/devlyn:resolve "Add `POST /items/import` to `server/index.js`. It accepts `{ items: [...] }`; every item must have a `name` that is a non-empty string after trimming and a `qty` that is a positive integer.\n\nWhen every item is valid, append all of them in input order and respond `201` with `{ inserted: <count> }`. Every appended row must receive a distinct numeric `id` that does not collide with any existing item id. If an item is invalid, respond `400` with `{ error: 'invalid_batch', index, field }`, where `index` identifies the first invalid item and `field` is `name` or `qty`. After that response, `GET /items` must return exactly the same list it returned immediately before the request.\n\nAn empty body, missing `items`, or a non-array `items` value must return `400` with `{ error: 'invalid_body' }`; `GET /items` must likewise be unchanged.\n\nUpdate `tests/server.test.js` so the existing tests still pass and add at least two import tests. One must exercise an invalid middle item and compare the list before and after the response; another must cover a fully valid request. No new npm dependencies. Only touch `server/index.js` and `tests/server.test.js`." --pair-verify
fill the variables
This prompt has 4 variables. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.
{items: [...]}{inserted: <count>}{error: 'invalid_batch', index, field}{error: 'invalid_body'}
Unlock with Pro →when to use it
Community prompt sourced from the open-source GitHub repo fysoul17/devlyn-cli (no explicit license). A "Claude Prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
roleplaycommunitygeneral
source
fysoul17/devlyn-cli · no explicit license