Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/pruthvinathJV/nextjs-claude-code-kitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/pruthvinathjv/nextjs-claude-code-kit/server-action)<a href="https://agentmods.dev/commands/pruthvinathjv/nextjs-claude-code-kit/server-action"><img src="https://agentmods.dev/badge/commands/pruthvinathjv/nextjs-claude-code-kit/server-action/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/pruthvinathjv/nextjs-claude-code-kit/server-action"><img src="https://agentmods.dev/badge/commands/pruthvinathjv/nextjs-claude-code-kit/server-action.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00674 |
| Opus 5.5 | $0.00000 | $0.00270 |
| Sonnet 5.5 | $0.00000 | $0.00135 |
| Haiku 4.5 | $0.00000 | $0.00067 |
Grade A, and why
server-action scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Generate a Server Action for the following mutation: $ARGUMENTS
Rules for generation:
File placement:
- If this action is used by a single route, co-locate it in that route's directory as
actions.ts - If this action is shared across routes, place it in
app/actions/orlib/actions/ - Always add
'use server'at the top of the file (not inside the function)
Function signature:
- For form submissions: accept
FormDataas the parameter - For programmatic calls from Client Components: accept a typed object parameter
- Never accept
Requestobjects — that's a Route Handler pattern, not Server Actions
Return values:
- Return data directly on success — not
{ status: 200, data: ... } - On expected errors (validation, not found), return
{ error: string }or throw - Use
revalidatePath()orrevalidateTag()after mutations that should invalidate cached data - Use
redirect()fromnext/navigationif the action should navigate after completion
What NOT to generate:
- No try/catch that swallows errors silently
- No HTTP status objects
- No calling other Server Actions from within this Server Action
- No data fetching (reads) — Server Actions are for writes/mutations only
Example of what to generate:
'use server'
import { revalidatePath } from 'next/cache'
import { redirect } from 'next/navigation'
export async function createPost(formData: FormData) {
const title = formData.get('title') as string
const content = formData.get('content') as string
if (!title || !content) {
return { error: 'Title and content are required' }
}
await db.post.create({ data: { title, content } })
revalidatePath('/posts')
redirect('/posts')
}
After generating the action, also generate:
- The form or button component that calls it (as a Client Component if using event handlers, or with
action=prop if it's a plain form) - Any TypeScript types needed for the parameters
- If the form needs to display errors or pending state, use
useActionStatefromreact(NOT the deprecateduseFormStatefromreact-dom) anduseFormStatusfromreact-dom:
'use client'
import { useActionState } from 'react' // React 19 / Next.js 15
import { useFormStatus } from 'react-dom'
function SubmitButton() {
const { pending } = useFormStatus()
return <button type="submit" disabled={pending}>{pending ? 'Saving...' : 'Save'}</button>
}
export function PostForm() {
const [state, action] = useActionState(createPost, null)
return (
<form action={action}>
<input name="title" />
{state?.error && <p>{state.error}</p>}
<SubmitButton />
</form>
)
}
Ask before generating if unclear: Is this triggered by a form submission or a button click? Does it need optimistic updates?
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 76 lines · 0 tokens per session scan A 431a86bd5a2b
server-action is a command published in the GitHub repository pruthvinathJV/nextjs-claude-code-kit (2 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 674 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
add-endpoint
Scaffold a new API endpoint with full layering.
generate-command
Génération Commande Symfony.
celigo-handlebars
Author or debug a Celigo Handlebars expression (mapping, HTTP body, SQL, URI, filter, or file path) using the helper catalog.
pn-audit-api
Surgical API design review — REST conventions, status codes, response shapes, validation, and schema leaks. Use standalone or as part of pn-backend-audit. Outputs a scored fix roadmap.
pn-audit-security
OWASP-guided security review — auth posture, input validation, secrets, CORS, JWT, rate limiting. Surgical command for backend security. Use standalone or as part of pn-backend-audit.
implement-graphql-api
Command "implement-graphql-api" from qdhenry/Claude-Command-Suite, covering implement graphql api and instructions.