/cross-stack-standard:upgradefrom Cross-Stack Standard
Moves an adopted project to the Cross-Stack Standard version of the installed plugin: compares the manifest's version with the plugin's, replaces kit files the project never edited, shows a diff for each edited file so the user decides, re-merges the managed CLAUDE.md block and the team settings without weakening them, validates allowlists without changing them, updates the manifest version last and drafts the pull request. Run it as /cross-stack-standard:upgrade (the built-in /upgrade is a different command).
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, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The user asked to bring the project's kit files up to the version of the installed plugin. The
plugin itself updates separately (through /plugin or claude plugin update); this skill changes
only files in the repository, on a branch, for review. ${CLAUDE_PLUGIN_ROOT} below is the
installed plugin. The decision behind this flow is ADR 0023 (adopter manifest, adopt and upgrade).
.cross-stack/allowlists/ with the project tool; never
add, renew, remove or edit an entry, and never regenerate a baseline.${CLAUDE_PLUGIN_ROOT}/templates/
as they are; never write kit content from memory. Do not install packages.version changes last, so an interrupted upgrade stays visible.The plugin's version is version in ${CLAUDE_PLUGIN_ROOT}/data/version.json.
The project's version is version in .cross-stack/standard.json. Without a manifest the
project was never adopted: suggest /cross-stack-standard:adopt and stop.
Compare them as SemVer:
Equal: there is nothing to upgrade. Offer the integrity pass of Step 3 on its own, which lists the kit files the project has edited, and stop there if the user declines.
The manifest is newer: the plugin is behind the project. Tell the user to update it and stop:
claude plugin marketplace update cross-stack-standard
claude plugin update cross-stack-standard@cross-stack-standard --scope project
(--scope is the scope the plugin was installed with.) A team that pins the marketplace
moves the ref in .claude/settings.json instead. Then /reload-plugins.
The plugin is newer: continue.
Give the user the release notes for the new version,
https://github.com/o6b7/cross-stack-standard/blob/v<new-version>/CHANGELOG.md: every section
after the project's version applies. Before 1.0.0 a minor release can promote rules from REVIEW
to a failing gate. Do not fetch the page unless the user asks.
git status --porcelain must be empty. If it is not, ask the user to commit or stash their work
first; do not stash it yourself.
Propose the branch chore/cross-stack-standard-v<new-version> and create it only after a yes:
git switch -c chore/cross-stack-standard-v<new-version>
Validate the current allowlists and manifest, and keep the output for the pull request:
node .cross-stack/bin/cross-stack.mjs check-allowlists
node .cross-stack/bin/cross-stack.mjs check-standard-config
Hashes. The adopted version's hashes are in
${CLAUDE_PLUGIN_ROOT}/data/template-hashes/<project-version>.json, the new version's in
${CLAUDE_PLUGIN_ROOT}/data/template-hashes/<plugin-version>.json. Keys are paths under
templates/. If the adopted version's file is missing (for example a pre-release that was never
published), treat every kit file as edited and say so.
Where each template lands:
Template (under templates/) | Project location | How |
|---|---|---|
shared/cross-stack/<path> | .cross-stack/<path> | copied |
claude/rules/<track>.md | .claude/rules/<track>.md | copied, for each declared track |
claude/claude-md-block.md | the managed block in CLAUDE.md | the region between the markers |
claude/settings.team.json | .claude/settings.json | merged, never replaced |
claude/README.md, claude/standard.example.json | nothing | reference only, never copied |
A template directory this table does not cover describes its own destinations in its
README.md. If it does not, list those templates as not applied and ask; never guess a location.
Hash the project's copies the way the build does (text with LF line endings):
node -e 'const fs=require("fs"),c=require("crypto");for(const f of process.argv.slice(1)){let b=fs.readFileSync(f);if(!b.subarray(0,8000).includes(0)&&b.includes(13))b=Buffer.from(b.toString("utf8").replaceAll("\r\n","\n"));console.log(c.createHash("sha256").update(b).digest("hex")+" "+f)}' .cross-stack/bin/cross-stack.mjs .claude/rules/*.md
For the managed block, hash its lines from the begin marker through the end marker followed by one newline:
node -e 'const fs=require("fs"),c=require("crypto");const l=fs.readFileSync(process.argv[1],"utf8").replaceAll("\r\n","\n").split("\n");const b=l.findIndex(x=>x.trim()==="<!-- cross-stack-standard:begin -->"),e=l.findIndex(x=>x.trim()==="<!-- cross-stack-standard:end -->");console.log(c.createHash("sha256").update(l.slice(b,e+1).join("\n")+"\n").digest("hex"))' CLAUDE.md
Classify each copied file and the block:
| Project copy | Action |
|---|---|
| equals the adopted version's hash | untouched: replace it with the new template, byte for byte |
| equals the new version's hash | already current: nothing to do |
| differs from both | edited: show the diff and let the user decide (below) |
| missing, template applies to the project | new in this version, or deleted locally: ask, then copy |
| template gone from the new version, copy untouched | propose deleting it |
| template gone from the new version, copy edited | ask |
For an edited file, show git diff --no-index -- <project-file> <new-template> and offer: take the
new template, keep the project's file, or a merge you propose. A rule file whose paths: globs
were prefixed for a track in a subdirectory is a known local edit: propose the new template with
the same prefix applied. For the block, replace only the region between the markers; content
outside them is never touched.
Merged files are never replaced. Add the entries of claude/settings.team.json that the project's file lacks, with the
same care as adopt: a deny entry stays deny, nothing is removed, no allow entry is added, a
plugin set to false stays false unless the user says otherwise.
Present the whole change set (replace, add, keep, remove, merge, and the files waiting for a
decision) and apply it only after the user agrees. Copy files with the shell (cp,
Copy-Item), not by rewriting them, so their hashes match.
check-standard-config again (the command from
Step 2). An older version is accepted; fix any other finding, keeping the project's values.version to the plugin's version and $schema to schemas.standard from
${CLAUDE_PLUGIN_ROOT}/data/version.json. Change no other key unless the release notes require
it and the user agrees.check-standard-config again: it confirms that $schema names the same version.Run and paste the real output:
node .cross-stack/bin/cross-stack.mjs check-standard-config
node .cross-stack/bin/cross-stack.mjs check-allowlists
node .cross-stack/bin/cross-stack.mjs doctor
Then run each track's check script where it exists (composer run-script check,
npm run check). A rule that the new version promoted can fail code that passed before: fix the
code, or add a dated allowlist entry only if the user asks for one. Never weaken a gate to get
green.
List the rules that ${CLAUDE_PLUGIN_ROOT}/data/rules.json now labels FORCED or GUARDED: those are
the ones whose gates can fail the build. In 0.1.0 there are none; every rule is REVIEW guidance with
a planned gate.
Draft, and show the user:
chore: upgrade the Cross-Stack Standard to v<new-version>ref in .claude/settings.json in the same pull request.Commit, push or open the pull request only when the user asks.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub o6b7/cross-stack-standard --plugin cross-stack-standard7 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./cross-stack-standardApplies 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.Other plugins' skills for the same job