Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

payloadcms-ops

БесплатноЗапускает вложенные скриптыНе проверен

Payload CMS 3 (Next.js-native) architecture - collections, globals, fields, access control, hooks, Local API, storage adapters, and database…

0xDarkMatterот 0xDarkMatter★ 86 звёзд на GitHub

Об этом скилле

Payload CMS Operations

Authoritative reference for Payload 3.x — the Next.js-native, TypeScript-first headless CMS. Payload 3 installs into a Next.js (App Router) app and gives you an auto-generated admin panel, REST + GraphQL APIs, a typed Local API, authentication, access control, file storage, and live preview — one open-source TypeScript codebase.

Version note (verified against payloadcms.com/docs, 2026-06): Payload 3 is the Next.js fullstack framework — there is no standalone Express server anymore. The config lives at src/payload.config.ts; Payload mounts into the Next App Router via the installed (payload) route group. Don't ship Payload 2.x "standalone Express app" guidance.


Architecture at a glance

Piece What it is
payload.config.ts Single source of truth: collections, globals, db adapter, plugins, admin, auth
Collections Repeatable document groups (Posts, Users, Media) — the core building block
Globals Singletons (one document) — site settings, header/footer nav
Fields Compose document shape; also drive admin UI, validation, access
Local API Typed, in-process data access (payload.find(...)) — no HTTP, runs server-side
REST / GraphQL Auto-generated HTTP APIs over the same collections
Database adapter @payloadcms/db-postgres, db-mongodb, or db-sqlite
Storage adapter Local disk (dev) or S3/R2/etc. for uploads

Where it lives in a Next.js app

src/
├── payload.config.ts          # the config — collections, globals, db, plugins
├── collections/               # one file per CollectionConfig
│   ├── Users.ts
│   ├── Posts.ts
│   └── Media.ts
├── globals/                   # GlobalConfig files
└── app/
    ├── (payload)/             # Payload's admin + API route group (generated)
    └── (frontend)/            # your Next.js front end — uses the Local API

Collections — the core shape

import type { CollectionConfig } from 'payload'

export const Posts: CollectionConfig = {
  slug: 'posts',                          // required, URL-safe identifier
  admin: { useAsTitle: 'title', defaultColumns: ['title', 'status'] },
  access: {                               // see access-control reference
    read: () => true,
    create: ({ req }) => Boolean(req.user),
    update: ({ req }) => Boolean(req.user),
    delete: ({ req }) => req.user?.role === 'admin',
  },
  versions: { drafts: true },             // draft/publish + revision history
  hooks: { /* lifecycle — see hooks reference */ },
  fields: [
    { name: 'title', type: 'text', required: true },
    { name: 'slug', type: 'text', unique: true, index: true },
    { name: 'content', type: 'richText' },
    { name: 'author', type: 'relationship', relationTo: 'users' },
  ],
}
Collection property Purpose
slug Required identifier (and REST/GraphQL route base)
fields Required — document shape + UI + validation
access Per-operation authorization (read/create/update/delete)
hooks Lifecycle entry points (before/after change/read/delete)
admin Admin-panel UI (title field, columns, components, groups)
auth Turns the collection into an auth collection (e.g. Users)
upload Makes it an upload collection (file storage, image sizes)
versions Drafts + revision history

Globals vs Collections

"If your Collection is only ever meant to contain a single Document, consider using a Global instead."

Globals (GlobalConfig) are singletons — site settings, main nav. Same fields/access/hooks/admin surface, one document.


Fields (the 80/20)

Type Use for
text, textarea, number, email, date, checkbox Scalars
richText Lexical-based rich content
select, radio Enumerations
relationship Link to other collections (relationTo, hasMany)
upload Reference an upload collection (media)
array Repeatable sub-field groups
blocks Flexible content — choose from defined block types per row
group Nested namespaced fields
row, collapsible, tabs Admin layout only (no data nesting except tabs with name)
json, code Raw structured/code data

Every field can carry access, hooks, validate, admin.condition (conditional display), and localized: true for i18n. See references/hooks-and-fields.md.


Access control — least privilege by default

Access functions return boolean or a query constraint (row-level filtering). They run for Local API, REST, and GraphQL uniformly.

access: {
  // boolean: can this user perform the op at all?
  delete: ({ req }) => req.user?.role === 'admin',

  // query constraint: WHICH documents can they read? (row-level)
  read: ({ req }) => {
    if (req.user?.role === 'admin') return true
    return { au
Полный SKILL.md на GitHub

Установить payloadcms-ops в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Write
Bash

Вложенные файлы

assets/collection.config.template.tsreferences/access-control.mdreferences/hooks-and-fields.mdscripts/.gitkeep

FAQ

Что делает скилл payloadcms-ops?

Payload CMS 3 (Next.js-native) architecture - collections, globals, fields, access control, hooks, Local API, storage adapters, and database (Postgres/MongoDB/SQLite). Use for: payload, payloadcms, payload cms, payload 3, collection config, access control, payload hooks, local api, payload fields, multi-tenant payload, payload nextjs, payload s3, payload r2, payloadcms architecture, headless cms typescript.

Как установить скилл payloadcms-ops?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл payloadcms-ops запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить payloadcms-ops с