
Safe Action Advanced
Once you're past basic server actions, you'll need this for the patterns that actually show up in production apps. It covers bind arguments for passing resource IDs without exposing them to the client, metadata schemas for passing typed data through middleware chains, and server-side callbacks that run after your actions complete (as opposed to the client-side hooks). The framework errors section handles Next.js redirects and auth boundaries properly. The type inference utilities are there when you need to extract input or result types from your action definitions. This is the stuff that's not obvious from the basic docs but becomes necessary once you're building anything real.
- skills.sh installs
- 1.2K
- GitHub stars
- 1
- last updated
- Aug 21, 2026
Install
$ npx -y skills add next-safe-action/skills --skill safe-action-advanced --agent claude-codeInstalls into .claude/skills of the current project.
Files
next-safe-action Advanced Features
Overview
| Feature | Use Case |
|---|---|
| Bind arguments | Pass extra args to actions via .bind() (e.g., resource IDs) |
| Metadata | Attach typed metadata to actions for use in middleware |
| Framework errors | Handle redirect, notFound, forbidden, unauthorized in actions |
| Type utilities | Infer types from action functions and middleware |
Server-Level Action Callbacks
The second argument to .action() accepts callbacks that run on the server (not client-side hooks):
Sponsors
Details
- Repository
- github.com/next-safe-action/skills
- Category
- Backend & APIs
- First seen
- May 16, 2026