/cross-stack-standard:cross-stack-standardfrom Cross-Stack Standard
Applies the Cross-Stack Standard, an enforceable engineering standard for Laravel JSON APIs, Next.js and React web apps, and React Native / Expo mobile apps. Use when writing, changing or reviewing application code in a Laravel, Next.js, React, React Native or Expo project: a new feature, endpoint, screen, form, migration, policy, job, hook or test; a refactor; an architecture, layering or file-placement decision; a code review or audit; i18n, locales and RTL layouts; authentication, multi-tenancy or the API contract. Reads .cross-stack/standard.json to scope rules by track, tier and modules, applies stack-first library choices and the Tier-1 invariants, cites rule IDs from the rule registry, and requires real check output before work is reported done. Does not apply when a CLAUDE.md file carries the line cross-stack-standard: declined.
Ships in Cross-Stack Standard. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The Standard is a registry of rules. Each rule has an ID (BE-, WEB-, MOB-, SEC-, I18N-,
UI-, PROC- or CI- and three digits), a track, a tier, an optional module and an honesty label.
This skill tells you which rules apply to the project in front of you and how to work under them.
Cite rules by ID; do not restate them from memory. Titles and current labels are in
${CLAUDE_PLUGIN_ROOT}/data/rules.json; the full catalogue with rationale is the
rule index, and every rule cites a decision record (ADR).
A label is never ahead of its gate (ADR 0002).
In 0.1.0 the plugin ships its hooks, this skill, the user skills, the kit templates and the full registry, but most rules are REVIEW guidance: each records a planned gate and a target level, and the gates arrive in later 0.x releases. Therefore:
enforcement for that ID in
${CLAUDE_PLUGIN_ROOT}/data/rules.json is FORCED or GUARDED. Otherwise write "guidance (REVIEW)
in 0.1.0; gate planned".check:fast Stop gate when the project has a manifest and defines that script, and a
confirmation prompt before gate files are edited or a gate-weakening command runs) plus whatever
checks the project itself defines.Do this before writing or changing application code (ADR 0018, ADR 0009, ADR 0023).
cross-stack-standard: declined in CLAUDE.md, .claude/CLAUDE.md or
CLAUDE.local.md means the project declined the Standard: stop using this skill.
"disabled": true in the manifest and CROSS_STACK_STANDARD_DISABLE=1 turn off the hooks only;
ask whether the rules still apply..cross-stack/standard.json (schema:
${CLAUDE_PLUGIN_ROOT}/data/standard.schema.json): version, tracks (laravel, web,
mobile), profile (next by default, or react-spa), tier (1 or 2), modules
(tenancy, i18n, api-contract, bff-auth, design, browser-check, observability) and
locales (the first entry is the source locale).<!-- cross-stack-standard:begin --> and
<!-- cross-stack-standard:end --> in CLAUDE.md or AGENTS.md, and any .claude/rules/*.md
files the kit copied. Where they disagree with the manifest, the manifest wins; point out the
drift.tier is missing, ask the user. Do not assume. The Tier-1 invariants apply either
way; offer the Tier-2 trigger below to help them decide.composer.json requiring laravel/framework is
laravel; a package.json depending on expo or react-native is mobile (not also web); one
depending on next or react is web. Check every directory, since monorepos have several
tracks. Apply stack-first and the Tier-1 invariants for those tracks, ask for the tier, and
suggest /cross-stack-standard:adopt, which writes and validates the manifest. Do not write the
manifest by hand.client rules apply to web and mobile, shared rules to every
project);profiles: ["next"]);defaultEnabled: false waits for its per-rule switch, which
the 0.1.0 manifest does not offer yet; treat it as advice unless the user asks for it.node "${CLAUDE_PLUGIN_ROOT}/scripts/companions.mjs" status --root . --data-dir "${CLAUDE_PLUGIN_DATA}",
shows it ready or unverified, and only when the task needs it. Never claim a result from a
companion that is not installed, was declined, or whose call failed: say so in one line and
offer the fallback the status gives (companions.md).Read the references for what is in scope:
| In scope | Read |
|---|---|
| Laravel track | laravel.md |
| Web track (Next.js; the React SPA profile) | web.md |
| Mobile track (Expo / React Native) | mobile.md |
api-contract module, or any client of the API | api-contract.md |
tenancy module | tenancy.md |
i18n module, locales, right-to-left layouts | i18n-rtl.md |
bff-auth module, Next.js sessions | bff-auth.md |
| Credentials, secrets, uploads, logging, supply chain | security.md |
Companion plugins, design or browser-check, UI checks | companions.md; /cross-stack-standard:playwright for routine browser checks |
| Adoption, upgrades, the manifest, CI and workflow templates | adopting-and-upgrading.md |
Before writing code, read composer.json and every package.json, and fill this table for the
tracks in scope. The installed library owns its concern (ADR 0006, ADR 0007).
| Concern | Examples of what to look for |
|---|---|
| Styling | Tailwind CSS, CSS Modules, a React Native theme module |
| State | Zustand, Redux Toolkit, Jotai, or none |
| Server state | TanStack Query, SWR |
| Forms | React Hook Form, TanStack Form, Formik, or plain controlled state |
| Validation | Laravel FormRequests; Zod, Valibot or Yup on clients |
| HTTP | Laravel's HTTP client; the app's fetch wrapper, Axios or ky |
| i18n | Laravel lang files; next-intl; i18next with react-i18next |
| Dates | Carbon; Intl, date-fns, Day.js or Luxon |
| Test runner | Pest; Vitest; Jest with jest-expo |
| E2E | Playwright; the mobile E2E tool the project uses |
| Icons | lucide-react, @expo/vector-icons or the project's icon set |
| Charts | Recharts, Chart.js, Victory or the project's chart library |
| Auth | Sanctum, Fortify or Passport; Auth.js; the bff-auth module |
| Env | Laravel config(); the typed env module, @t3-oss/env-nextjs |
| Logging | Laravel's Log facade; the app's logger module |
stack section accepts only
competingGroups and per-concern deprecated lists, so keep the full table in the pull request
description until the schema gains it.Details: stack-first.md.
Tier 1 applies to every adopting project (ADR 0008). Invariants 5, 9 and 10 apply once their module is on, and a rule that belongs to a module applies only with that module. Rule titles: tiers-and-invariants.md.
Tier 2 applies when the manifest declares "tier": 2. Its trigger is at least two of: the project
is multi-tenant, more than one developer works on it, it is long-lived. When two hold and the
manifest says 1, say that declining Tier 2 needs a recorded reason (PROC-002). Tier 2 adds layer
tables, file placement, service discipline, frontend patterns and a numbered ADR log (PROC-019): the
tier-2 rules in each track reference.
Follow these steps on every change (ADR 0014).
check:fast, and the full check when the change warrants it
(Composer and/or npm, per track); if the project defines neither, run the checks it has and say
which;Details: working-procedure.md.
Duplication is judged by what it encodes (ADR 0013).
Gates are proven and never weakened (ADR 0004, ADR 0005, ADR 0021).
.cross-stack/allowlists/<RULE-ID>.json with match, reason, expires (a
date) and owner; an expired entry fails (PROC-014). Baselines only shrink (BE-005, PROC-015,
PROC-027, PROC-034). Inline escapes take one form each and carry a reason:
eslint-disable-next-line <rule> -- <reason> (PROC-016, PROC-025, PROC-031),
@phpstan-ignore <identifier> (<reason>) (BE-098) and a described @ts-expect-error (MOB-027)..cross-stack/** ask the user first (PROC-013), and so do shell commands that skip or weaken
a gate (PROC-026). Never route around the prompt.One level deep; each lists its rules with registry titles, the sanctioned patterns and its status.
references/adopting-and-upgrading.md (opens in a new tab)references/api-contract.md (opens in a new tab)references/bff-auth.md (opens in a new tab)references/companions.md (opens in a new tab)references/i18n-rtl.md (opens in a new tab)references/laravel.md (opens in a new tab)references/mobile.md (opens in a new tab)references/security.md (opens in a new tab)references/stack-first.md (opens in a new tab)references/tenancy.md (opens in a new tab)references/tiers-and-invariants.md (opens in a new tab)references/web.md (opens in a new tab)references/working-procedure.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/adoptBrings the current project under the Cross-Stack Standard, greenfield or brownfield: detects the Laravel, web (Next.js or React) and mobile (Expo) tracks, asks for the tier and modules, asks yes or no for each pinned companion plugin (caveman, impeccable, Figma MCP, Playwright MCP, Chrome DevTools MCP), records the answers and installs only the approved ones, writes .cross-stack/standard.json, merges the managed CLAUDE.md block and the team settings, copies the path-scoped rule files and the project tool, and reports what changed and what to commit. Never overwrites existing files or weakens stricter settings. Run it as /cross-stack-standard:adopt./auditRead-only audit of the current project against the Cross-Stack Standard: finds the rules that apply to the project's tracks, profile, tier and modules, reports each by rule ID with its enforcement level and status (the gate's result where a gate exists, otherwise a review checklist item with the evidence found in the code), grouped by Tier-1 invariant and by track. Never modifies files. Run it as /cross-stack-standard:audit, optionally with a scope such as a track, a module or a rule-ID prefix.Other plugins' skills for the same job
/doctorChecks the environment and the project's Cross-Stack Standard setup: runs the project tool's doctor command (Node.js, git, the Claude Code CLI, the manifest, the opt-out status, the managed CLAUDE.md block size, the path-scoped rule files, the plugin enablement, lefthook, PHP and Composer for Laravel) and explains every result; checks the five pinned companion plugins (caveman, impeccable, Figma MCP, Playwright MCP, Chrome DevTools MCP) for missing, duplicate or hand-copied installs and offers the fixes. Installs nothing without asking. Run it as /cross-stack-standard:doctor (the built-in /doctor is a different command).npx claudepluginhub o6b7/cross-stack-standard --plugin cross-stack-standard