Loading...
Loading...
Improve a rough or thin prompt into a detailed, actionable one using project context. Use when the user types '/improve-prompt <rough idea>' or '/?? <rough idea>'. Takes a vague request and returns a well-structured prompt with specific file paths, project patterns, acceptance criteria, and relevant context. Do NOT use for executing tasks — this only improves the prompt text.
npx skill4agent add darraghh1/my-claude-setup improve-prompt$ARGUMENTSapp/home/[account]/feature/_lib/server/...react-hook-formimport 'server-only'/skills/create-plan/postgres-expert/service-builder/server-action-builder/react-form-builder/code-review/playwright-e2etdd-guidesecurity-reviewer```
<improved prompt here>
```Add a Notes feature at app/home/[account]/notes/.
Database:
- Create a `notes` table with: id (uuid PK), account_id (FK to accounts), title (text), content (text), created_by (uuid FK to auth.users), timestamps
- Add RLS policies using your RLS helper function for team access
- Create migration via `npx supabase db diff --schema public -f add_notes_table`
Service layer:
- Create app/home/[account]/notes/_lib/server/notes-service.ts
- Use the service pattern (private class + factory function)
- Methods: createNote, getNotesByAccount, updateNote, deleteNote
- Add `import 'server-only'`
Server actions:
- Create app/home/[account]/notes/_lib/server/server-actions.ts
- Use Server Actions with Zod validation + auth checks for create, update, delete
- Schemas in _lib/schema/notes.schema.ts
UI:
- Server component page.tsx with loader for initial data
- Client component for the notes list and create/edit form
- Use your component library (e.g., shadcn/ui) for Card, Button, Dialog
- Use react-hook-form + Zod for form validation
Testing:
- Unit tests for service and actions in __tests__/notes/
- Use Vitest with happy-dom, thenable mock pattern for Supabase
Acceptance criteria:
- [ ] Notes CRUD works for team members
- [ ] RLS prevents cross-account access
- [ ] npm run verify passes (typecheck + lint + test)
Suggested workflow:
1. /create-plan — to generate phases for this feature
2. /postgres-expert — for the notes table schema, RLS policies, migration
3. /service-builder — for the notes service layer
4. /server-action-builder — for CRUD server actions
5. /react-form-builder — for the create/edit note form
6. /code-review — after implementation to verify compliance