jpskill.com
📦 その他 コミュニティ

payload

Payload CMSを使ったウェブサイト構築で、コレクションやフィールドの設計、認証設定、管理画面のテーマ変更など、様々な機能を活用するための専門的なアドバイスを提供するSkill。

📜 元の英語説明(参考)

Expert guidance for building with Payload CMS - collections, fields, hooks, access control, Local API, authentication, uploads, and admin theming

🇯🇵 日本人クリエイター向け解説

一言でいうと

Payload CMSを使ったウェブサイト構築で、コレクションやフィールドの設計、認証設定、管理画面のテーマ変更など、様々な機能を活用するための専門的なアドバイスを提供するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o payload.zip https://jpskill.com/download/8666.zip && unzip -o payload.zip && rm payload.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/8666.zip -OutFile "$d\payload.zip"; Expand-Archive "$d\payload.zip" -DestinationPath $d -Force; ri "$d\payload.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して payload.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → payload フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Payload CMS Skill

データモデリング、API の使用法、管理画面のカスタマイズなど、Payload CMS 開発に関する包括的なリファレンスです。

概要

Payload は Next.js 上に構築されたヘッドレス CMS およびアプリケーションフレームワークです。この Skill では、コレクション、フィールド、フック、アクセス制御、Local API 操作、認証、アップロード、グローバル、プラグイン、および管理パネルのスタイリングについて説明します。

クイックリファレンス: どのファイルが必要ですか?

タスク 参照ファイル
コレクションの作成/設定 collections.md
コレクションへのフィールドの追加 fields.md
操作の前/後にコードを実行 hooks.md
データの読み取り/書き込みを許可するユーザーの制御 access-control.md
サーバー側でのデータのクエリまたは変更 local-api.md
外部からの REST API の使用 rest-api.md
GraphQL API の使用 graphql.md
ユーザーログイン/認証の設定 authentication.md
ファイル/画像のアップロードの処理 uploads.md
アップロードをフォルダに整理 folders.md
サイト全体のの設定の作成 globals.md
公式プラグインの追加 (SEO、フォーム) plugins.md
管理パネルのテーマ設定 admin-styling.md
カスタム管理コンポーネントの構築 custom-components.md
リッチテキストエディタの設定 rich-text.md
ライブプレビューの設定 live-preview.md
下書き/バージョンの有効化 versions.md
データベース/マイグレーションの設定 database.md
payload.config.ts のカスタマイズ configuration.md
メール/通知の設定 email.md
バックグラウンドジョブ/スケジューリング jobs-queue.md
保存されたリストビューフィルター query-presets.md
ソフトデリート/ゴミ箱 trash.md
TypeScript 型生成 typescript.md
本番環境へのデプロイ production.md

参照ファイルの概要

コアデータと API

ファイル 行数 説明
collections.md ~200 コレクション設定、slug、管理オプション
fields.md ~220 すべてのフィールドタイプ、バリデーション、条件付きロジック
globals.md ~50 単一ドキュメントデータ (設定、ナビゲーション)
hooks.md ~170 コレクション、フィールド、グローバルのライフサイクルフック
access-control.md ~200 権限、RBAC、クエリ制約
local-api.md ~190 サーバー側の検索、作成、更新、削除
rest-api.md ~240 REST エンドポイント、クエリパラメータ、認証ヘッダー
graphql.md ~245 GraphQL クエリ、ミューテーション、スキーマ

認証とユーザー

ファイル 行数 説明
authentication.md ~200 認証設定、ストラテジー、パスワードリセット
email.md ~180 メールアダプター (Nodemailer, Resend)、テンプレート

コンテンツとメディア

ファイル 行数 説明
uploads.md ~60 メディアアップロード、画像サイズ、ストレージアダプター
folders.md ~120 フォルダ階層でのアップロードの整理
rich-text.md ~270 Lexical エディタ、機能、シリアライゼーション
versions.md ~265 下書き、公開、自動保存、バージョン履歴
trash.md ~115 ソフトデリート、復元、完全削除

管理パネル

ファイル 行数 説明
admin-styling.md ~180 CSS 変数、BEM クラス、テーマ設定
custom-components.md ~300 フィールド/セル/ビューコンポーネント、React フック
live-preview.md ~215 管理画面でのリアルタイムコンテンツプレビュー
query-presets.md ~125 リストビューの保存済みフィルター

設定とインフラストラクチャ

ファイル 行数 説明
configuration.md ~240 payload.config.ts 構造、すべてのオプション
database.md ~200 MongoDB/Postgres アダプター、マイグレーション
plugins.md ~60 公式プラグインとインストール
typescript.md ~220 型生成、payload-types.ts
jobs-queue.md ~215 バックグラウンドタスク、ワーカー、スケジューリング
production.md ~190 デプロイ (Vercel, Docker)、環境変数

一般的なワークフロー

新しいコレクションの作成

  1. collections.md を読んで設定構造を確認します
  2. fields.md を読んでデータフィールドを追加します
  3. access-control.md を読んで権限を設定します
  4. 必要に応じて hooks.md を読んでライフサイクルロジックを確認します

カスタム API エンドポイントの構築

  1. local-api.md を読んでクエリ構文を確認します
  2. 認証コンテキストが必要な場合は authentication.md を読みます
  3. access-control.md を読んで権限を理解します

ファイルアップロードの有効化

  1. uploads.md を読んでアップロード設定を確認します
  2. fields.md を読んでアップロード/リレーションシップフィールドのリンクを確認します
  3. クラウドストレージ (S3 など) を使用する場合は plugins.md を読みます

管理パネルのテーマ設定

  1. admin-styling.md を読んで CSS 変数とクラスを確認します
  2. ダーク/ライトモードのエレベーション変数に注目します
  3. オーバーライドには @layer payload を使用します

クイックルックアップパターン

# フックのタイプを検索
grep -n "beforeChange\|afterChange" references/hooks.md

# フィールドのタイプを検索
grep -n "type:" references/fields.md

# アクセス制御パターンを検索
grep -n "role\|RBAC" references/access-control.md

# クエリ演算子を検索
grep -n "equals\|contains\|greater" references/local-api.md

# CSS 変数を検索
grep -n "elevation\|gutter" references/admin-styling.md

主要なパターン

Payload インスタンスの取得 (サーバー側)

import { getPayload } from 'payload'
import config from '@payload-config'

const payload = await getPayload({ config })

基本的なクエリ

const posts = await payload.find({
  collection: 'posts',
  where: { status: { equals: 'published' } },
  limit: 10,
})

アクセス制御関数

access: {
  read: () => true, // Public
  create: ({ req }) => !!req.user, // Authenticated
  update: ({ req, id }) => req.user?.id === id, // Owner only
}

公式ドキュメント

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Payload CMS Skill

Comprehensive reference for Payload CMS development including data modeling, API usage, and admin customization.

Overview

Payload is a headless CMS and application framework built on Next.js. This skill covers collections, fields, hooks, access control, Local API operations, authentication, uploads, globals, plugins, and admin panel styling.

Quick Reference: Which File Do I Need?

Task Reference File
Create/configure a collection collections.md
Add fields to a collection fields.md
Run code before/after operations hooks.md
Control who can read/write data access-control.md
Query or mutate data server-side local-api.md
Use REST API externally rest-api.md
Use GraphQL API graphql.md
Set up user login/auth authentication.md
Handle file/image uploads uploads.md
Organize uploads in folders folders.md
Create site-wide settings globals.md
Add official plugins (SEO, forms) plugins.md
Theme the admin panel admin-styling.md
Build custom admin components custom-components.md
Configure rich text editor rich-text.md
Set up live preview live-preview.md
Enable drafts/versions versions.md
Configure database/migrations database.md
Customize payload.config.ts configuration.md
Set up email/notifications email.md
Background jobs/scheduling jobs-queue.md
Saved list view filters query-presets.md
Soft delete/trash trash.md
TypeScript type generation typescript.md
Deploy to production production.md

Reference Files Summary

Core Data & API

File Lines Description
collections.md ~200 Collection config, slugs, admin options
fields.md ~220 All field types, validation, conditional logic
globals.md ~50 Single-document data (settings, nav)
hooks.md ~170 Lifecycle hooks for collections, fields, globals
access-control.md ~200 Permissions, RBAC, query constraints
local-api.md ~190 Server-side find, create, update, delete
rest-api.md ~240 REST endpoints, query params, auth headers
graphql.md ~245 GraphQL queries, mutations, schema

Authentication & Users

File Lines Description
authentication.md ~200 Auth config, strategies, password reset
email.md ~180 Email adapters (Nodemailer, Resend), templates

Content & Media

File Lines Description
uploads.md ~60 Media uploads, image sizes, storage adapters
folders.md ~120 Organize uploads in folder hierarchies
rich-text.md ~270 Lexical editor, features, serialization
versions.md ~265 Drafts, publishing, autosave, version history
trash.md ~115 Soft delete, restore, permanent delete

Admin Panel

File Lines Description
admin-styling.md ~180 CSS variables, BEM classes, theming
custom-components.md ~300 Field/Cell/View components, React hooks
live-preview.md ~215 Real-time content preview in admin
query-presets.md ~125 Saved filters for list views

Configuration & Infrastructure

File Lines Description
configuration.md ~240 payload.config.ts structure, all options
database.md ~200 MongoDB/Postgres adapters, migrations
plugins.md ~60 Official plugins and installation
typescript.md ~220 Type generation, payload-types.ts
jobs-queue.md ~215 Background tasks, workers, scheduling
production.md ~190 Deployment (Vercel, Docker), env vars

Common Workflows

Creating a New Collection

  1. Read collections.md for config structure
  2. Read fields.md to add your data fields
  3. Read access-control.md to set permissions
  4. Optionally read hooks.md for lifecycle logic

Building a Custom API Endpoint

  1. Read local-api.md for query syntax
  2. Read authentication.md if auth context needed
  3. Read access-control.md to understand permissions

Enabling File Uploads

  1. Read uploads.md for upload config
  2. Read fields.md for upload/relationship field linking
  3. Read plugins.md if using cloud storage (S3, etc.)

Theming the Admin Panel

  1. Read admin-styling.md for CSS variables and classes
  2. Focus on elevation variables for dark/light mode
  3. Use @layer payload for overrides

Quick Lookup Patterns

# Find hook types
grep -n "beforeChange\|afterChange" references/hooks.md

# Find field types
grep -n "type:" references/fields.md

# Find access control patterns
grep -n "role\|RBAC" references/access-control.md

# Find query operators
grep -n "equals\|contains\|greater" references/local-api.md

# Find CSS variables
grep -n "elevation\|gutter" references/admin-styling.md

Key Patterns

Getting Payload Instance (Server-Side)

import { getPayload } from 'payload'
import config from '@payload-config'

const payload = await getPayload({ config })

Basic Query

const posts = await payload.find({
  collection: 'posts',
  where: { status: { equals: 'published' } },
  limit: 10,
})

Access Control Function

access: {
  read: () => true, // Public
  create: ({ req }) => !!req.user, // Authenticated
  update: ({ req, id }) => req.user?.id === id, // Owner only
}

Official Documentation