diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-02-24 12:05:54 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-02-24 12:05:54 +0900 |
| commit | 64c88ef21ac3369e4e4fad179dfd641722a1f349 (patch) | |
| tree | 145c442d7bea65b7602271d5fa3265ff0a279afb /ar/.config/claude/commands/create-server-action.md | |
| parent | f3b515d8d9e8ed57d2c5302b53009ea9241e22f2 (diff) | |
updates
Diffstat (limited to 'ar/.config/claude/commands/create-server-action.md')
| -rw-r--r-- | ar/.config/claude/commands/create-server-action.md | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/ar/.config/claude/commands/create-server-action.md b/ar/.config/claude/commands/create-server-action.md deleted file mode 100644 index 0e28d2b..0000000 --- a/ar/.config/claude/commands/create-server-action.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -allowed-tools: Write, Read, MultiEdit -argument-hint: "<action-name> [model/entity]" -description: Create a type-safe Server Action with validation and error handling ---- - -Create a Next.js 15 Server Action named "$ARGUMENTS" with: - -1. Proper 'use server' directive -2. Zod schema for input validation -3. Error handling and try-catch blocks -4. Type-safe return values -5. Authentication check (if applicable) -6. Rate limiting setup -7. Database operation (if entity provided) -8. Cache revalidation (revalidatePath/revalidateTag) -9. Proper TypeScript types throughout -10. Example usage in a form component - -The Server Action should follow security best practices: - -- Input validation and sanitization -- CSRF protection considerations -- Proper error messages (don't leak sensitive info) -- Audit logging for important operations - -Include both the server action file and an example client component that uses it with useActionState. |
