Skip to main content
skill CX Codex

payload — Claude Code skill: what it does, how to install

Guides Payload CMS development across collections, hooks, and access control. Useful when debugging queries, validation, and database transactions.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add payloadcms/skills --skill payload -a claude-code
Open on GitHub

What payload does

This skill guides coding assistants through Payload CMS architecture in Next.js and TypeScript. It covers payload.config.ts configuration, field declarations, row-level access control, and the Local API.

Inside, it outlines patterns for collections and fields: draft workflows with versions: { drafts: true }, virtual fields using field-level hooks.afterRead, and conditional fields via admin.condition. Transactions require threading req through every operation, otherwise database state can desynchronize. To avoid infinite loops inside hooks, check req.context.

It also details background task queues, geospatial queries with point fields, and plugin creation using SWC compilation.

What it helps with

  • configure row-level access control with query filters
  • stop infinite hook loops by checking req.context
  • enable drafts and versioning in collection configs
  • thread req across operations for transaction integrity

Example prompts for the agent

  • How do I configure draft workflows in payload.config.ts?
  • Show me how to stop afterChange hooks from looping during Next.js revalidation.
  • Write a beforeDelete hook to cascade document deletions.

How to install payload

1Skills CLI (Vercel)

npx skills add payloadcms/skills --skill payload -a claude-code

2Manually: put the files in place

~/.claude/skills/payload/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/payload/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about payload

How to install payload in Claude Code?

Run npx skills add payloadcms/skills --skill payload -a claude-code to install the skill.

What does the payload skill do?

It provides patterns and rules for building Payload CMS applications in Next.js. It assists with collection schemas, relationship queries, access rules, and hook lifecycle debugging.

How does the skill handle database transactions?

It enforces passing the req object through all operations. This threads the active transaction context directly to database adapters.

Similar skills

Everything for Backend and APIs →

From the same set2

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor