payload: Skill for Claude Code

.agents/skills/ui4-review/SKILL.md

ui4-review is a skill for Claude Code, Codex from payloadcms/payload. It costs 26 tokens per session (2,756 once invoked), scanned A, original, MIT.

A review and auto-fix guide for CSS migrations to UI4, a design system that provides reusable style values called tokens. It checks that components use context-aware tokens for colors, spacing, and related styles instead of fixed values or raw palette colors.

In plain words
What is it for?
Use it when reviewing changed CSS files for nested selectors, fixed spacing, hardcoded colors, and direct use of palette tokens.
Why use it?
It finds styling that can break consistent theming, including light and dark modes, or drift from the design system. It can also automatically fix token violations.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is payloadcms/payload's own configuration. It tells Claude Code and Codex how to work on payload itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything payload configures →

About the project

Payload is an open-source, full-stack framework for Next.js that provides a TypeScript backend and an administration panel for managing application data and content. Developers use it as a headless content management system or as the backend and application framework for their own projects. The catalogue add-ons help agents work with Payload projects and their development workflows.

payloadcms/payload · 45,565 stars · on GitHub · payloadcms.com

Reuse

Borrowing it

Nothing to install: this file belongs to payloadcms/payload. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/payloadcms/payload/main/.agents/skills/ui4-review/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/payloadcms/payload

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for ui4-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/payloadcms/payload/ui4-review/github.svg)](https://agentmods.dev/skills/payloadcms/payload/ui4-review)
Your own site
<a href="https://agentmods.dev/skills/payloadcms/payload/ui4-review"><img src="https://agentmods.dev/badge/skills/payloadcms/payload/ui4-review/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.

agentmods 80×15 button for ui4-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/payloadcms/payload/ui4-review"><img src="https://agentmods.dev/badge/skills/payloadcms/payload/ui4-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,756 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.02756
Opus 5.5 $0.00010 $0.01102
Sonnet 5.5 $0.00005 $0.00551
Haiku 4.5 $0.00003 $0.00276

Measured 1mo ago against content hash 770f9aea625f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ui4-review 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.

.agents/skills/ui4-review/SKILL.md · 279 lines

How it starts

The opening of the file, as written. The whole thing — 279 lines — stays where its author put it; the contents beside it link to each section on GitHub.

UI4 Review

Reviews CSS changes and auto-fixes token violations.


Important: Palette vs Semantic Tokens

--ramp-* tokens are the raw color palette (e.g., --ramp-white-1000, --ramp-blue-500). These are used only in colors.css to define semantic tokens.

--color-* tokens are context-aware semantic tokens (e.g., --color-bg, --color-text-brand). These handle light/dark theming automatically.

Components and elements should ALWAYS use --color-* semantic tokens, never --ramp-* palette tokens directly.

/* ❌ BAD - using raw palette */
background: var(--ramp-white-1000);

/* ✅ GOOD - using semantic token */
background: var(--color-bg);

Process

Step 1: Get Changed CSS Files

git status --porcelain | grep '\.css$'

Or if a specific file is provided, use that directly.

Step 2: Parallel Violation Detection

Run these grep searches IN PARALLEL to detect all violation types at once:

# 1. SCSS Nesting Violations (BEM patterns that don't work in CSS)
grep -n '&__\|&--' "$FILE"

# 2. Hardcoded Spacing (px/rem values that should be tokens)
grep -nE ':\s*[0-9]+px|:\s*[0-9.]+rem' "$FILE"

# 3. Hardcoded Colors (hex, rgb, rgba - includes box-shadow)
grep -nE '#[0-9a-fA-F]{3,8}|rgba?\(' "$FILE"

# 4. Legacy Theme Variables
grep -nE 'var\(--theme-|var\(--style-|var\(--base\)' "$FILE"

# 5. Old Token Names (pre-UI4 naming)
grep -nE '\-\-bg-default|\-\-bg-secondary|\-\-text-default|\-\-text-secondary|\-\-icon-default|\-\-icon-secondary|\-\-border-default|\-\-border-strong' "$FILE"

# 6. Raw Palette Usage (should use semantic tokens instead)
# Skip this check for colors.css which defines the semantic tokens
grep -nE 'var\(--ramp-' "$FILE"

Invoke all 6 grep commands in a single parallel batch, then analyze results.

Note: Raw --ramp-* violations are only flagged in component CSS files, not in colors.css where they're used to define semantic tokens.

Step 3: Auto-Fix by Priority

Read the full file on GitHub · 279 lines

Changes

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.

  1. 1mo ago First seen · 279 lines · 26 tokens per session scan A 770f9aea625f

Subscribe to this mod's changes

ui4-review is a skill published in the GitHub repository payloadcms/payload (45,565 stars, last pushed today), licensed MIT. It adds 26 tokens to every session and 2,756 once invoked, about $0.0001 per session on Opus 5.5. 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-30.