next-safe-action avatar

Safe Action Advanced

Advanced next-safe-action features covering bind arguments, metadata, framework errors, type utilities, and server callbacks.

CCM score
60 of 100
skills.sh installs
1.2K
GitHub stars
1
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers bind arguments, typed metadata, framework errors (redirect, notFound, forbidden, unauthorized), and type inference utilities
  • Includes server-level callbacks onSuccess, onError, onSettled, and onNavigation that run in the Node.js runtime
  • Distinguishes server callbacks from hook callbacks such as useAction({ onSuccess }), which run in the browser
  • Documents throwServerError for re-throwing handled errors, contrasted with returnServerError() for expected typed errors

Install

$ npx -y skills add next-safe-action/skills --skill safe-action-advanced -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

next-safe-action Advanced Features

Overview

FeatureUse Case
Bind argumentsPass extra args to actions via .bind() (e.g., resource IDs)
MetadataAttach typed metadata to actions for use in middleware
Framework errorsHandle redirect, notFound, forbidden, unauthorized in actions
Type utilitiesInfer 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):

Details

Repository
github.com/next-safe-action/skills
Categories
Frontend & UI Code, Backend & APIs
First seen
May 16, 2026

More from next-safe-action/skills

All 8

Similar to Safe Action Advanced

More Frontend & UI Code