MinSomai

payload arch skill

by MinSomai
Testing & developer experience
v?

Overview

Summary generated from the README

A Claude Code skill that guides how to structure PayloadCMS projects into layered backend code with inward-only dependencies. It is installed through a Claude Code plugin marketplace rather than added to the Payload config. It builds on the official Payload skill and includes a CLAUDE.md template.

Features

  • Layered route, controller, service and store backend structure
  • Frontend conventions using SWR and a Payload client SDK
  • Project folder rules for types, utils, lib, access, const and jobs
  • Single config file as the only place environment variables are read
  • Thin CLAUDE.md template for new Payload projects
  • Can be invoked explicitly with a slash command

Use cases

  • Keep business logic out of route handlers in a Payload project
  • Standardize project structure when using Claude Code on new Payload apps

From the author

A Claude Code skill that enforces a layered route → controller → service → store architecture for PayloadCMS projects.

2

Stars

0

Forks

0

Open Issues

2 months ago

Last Updated

0

Weekly Downloads

v

npm Version

Dependencies

GitHub stars

20 since Sep 6

Show data
GitHub stars by day (UTC)
DateStars
Dec 5, 20262
Dec 4, 20262
Dec 3, 20262
Dec 2, 20262
Dec 1, 20262
Nov 30, 20262
Nov 29, 20262
Nov 28, 20262
Nov 27, 20262
Nov 26, 20262
Nov 25, 20262
Nov 24, 20262
Nov 23, 20262
Nov 22, 20262
Nov 21, 20262
Nov 20, 20262
Nov 19, 20262
Nov 18, 20262
Nov 17, 20262
Nov 16, 20262
Nov 15, 20262
Nov 14, 20262
Nov 13, 20262
Nov 12, 20262
Nov 11, 20262
Nov 10, 20262
Nov 9, 20262
Nov 8, 20262
Nov 7, 20262
Nov 6, 20262
Nov 5, 20262
Nov 4, 20262
Nov 3, 20262
Nov 2, 20262
Nov 1, 20262
Oct 31, 20262
Oct 30, 20262
Oct 29, 20262
Oct 28, 20262
Oct 27, 20262
Oct 26, 20262
Oct 25, 20262
Oct 24, 20262
Oct 23, 20262
Oct 22, 20262
Oct 21, 20262
Oct 20, 20262
Oct 19, 20262
Oct 18, 20262
Oct 17, 20262
Oct 16, 20262
Oct 15, 20262
Oct 14, 20262
Oct 13, 20262
Oct 12, 20262
Oct 11, 20262
Oct 10, 20262
Oct 9, 20262
Oct 8, 20262
Oct 7, 20262
Oct 6, 20262
Oct 5, 20262
Oct 4, 20262
Oct 3, 20262
Oct 2, 20262
Oct 1, 20262
Sep 30, 20262
Sep 29, 20262
Sep 28, 20262
Sep 27, 20262
Sep 26, 20262
Sep 25, 20262
Sep 24, 20262
Sep 23, 20262
Sep 22, 20262
Sep 21, 20262
Sep 20, 20262
Sep 19, 20262
Sep 18, 20262
Sep 17, 20262
Sep 16, 20262
Sep 15, 20262
Sep 14, 20262
Sep 13, 20262
Sep 12, 20262
Sep 11, 20262
Sep 10, 20262
Sep 9, 20262
Sep 8, 20262
Sep 7, 20262
Sep 6, 20262
npm weekly downloads

Trends appear after 7 days of data. Daily snapshots have not started yet.

Each point is npm's rolling 7-day download count.

Health Score

27/100Fair

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/1225360228-root.svg)](https://payloaddirectory.dev/plugins/1225360228-root)
HTML
<a href="https://payloaddirectory.dev/plugins/1225360228-root"><img src="https://payloaddirectory.dev/badge/1225360228-root.svg" alt="Payload Directory"></a>
Updated Oct 1, 2026Created Apr 30, 2026

README

payload-arch skill for Claude

A Claude Code skill that enforces a layered route → controller → service → store architecture for PayloadCMS projects.

This skill was built on top of the official payload skill from the PayloadCMS team. That skill covers the framework — collections, hooks, queries, access control. This one covers the architectural layer on top of it: how to structure your code, where things live, and how layers communicate.

What it enforces

Backend layers (inward-only dependency flow)

  • src/routes/ — endpoint registration only, zero logic
  • src/controllers/ — HTTP parsing and response formatting, delegates to services
  • src/services/ — all business logic, can call other services and stores
  • src/store/ — Payload CRUD only, no business logic, never calls services

Frontend

  • SWR + payloadClientSDK for all client-side data fetching
  • Server pages for auth checks and primary entity fetching, client components for everything dynamic
  • Polling pattern for live job/evaluation status

Project structure

  • src/types/ — domain TypeScript types
  • src/utils/ — domain-specific pure utilities
  • src/lib/ — generic pure utilities (no domain dependencies)
  • src/access/ — Payload access control functions
  • src/const/ — frozen constants, all re-exported from an index
  • src/config/config.ts — the only place process.env is read
  • src/jobs/ — task definitions and workflows separated into two files per domain

CLAUDE.md template included in the skill — drop a thin, project-specific CLAUDE.md into any new PayloadCMS project and let this skill handle the rest.

Installation

Register this repo as a Claude Code plugin marketplace:

/plugin marketplace add MinSomai/payload-arch-skill

Then install the skill:

  1. Run /plugin in Claude Code
  2. Select Browse and install plugins
  3. Select payload-arch-skill
  4. Select payload-arch

Usage

Once installed, the skill triggers automatically when you're working on a PayloadCMS project that follows this architecture. It activates when you mention routes, controllers, services, stores, jobs, SWR, components, or data fetching.

You can also invoke it explicitly:

/payload-arch where should this logic live?

Works best alongside

Install the official PayloadCMS skill for deep framework reference (collections, hooks, queries):

npx skills add payloadcms/skills

The two skills are complementary — payload covers what the framework can do, payload-arch covers how to structure your project on top of it.

License

MIT

Similar plugins