shopify/cli-pre-submit-ci
Prevent predictable Shopify CLI PR CI failures before push or submit. Use when users: (1) ask what to run before pushing, submitting, restacking, opening, or updating a PR, (2) ask which generated files to commit or stage, (3) want to validate a branch against GitHub Actions, or (4) want to avoid CI churn after command, docs, workflow, schema, or test changes. At PR time, default to suggesting the minimal pre-submit checks rather than running a full local workflow automatically.
npx skills add https://github.com/Shopify/cli --skill cli-pre-submit-ci
Start with the shared repo facts in ../_shared/shopify-cli-ci-repo-contracts.md.
Derive the smallest sufficient pre-submit validation set from the current CI contract. Do not guess, and do not default to the broadest possible local run.
Start by inspecting both the branch diff and the current working tree.
Use one consistent branch-diff command rather than rediscovering it each time.
Example:
git diff --name-only $(git merge-base HEAD origin/main)...HEAD
git status --short
Treat these as different scopes:
origin/main = what the PR currently changesIf the diff clearly maps to a narrow family, keep the investigation narrow.
| Diff class | Default response |
|---|---|
| docs/config/wiring only, with no obvious workflow-enforced generator family | stop there unless contradicted: run lightweight sanity checks only (git diff --check, validate changed symlink targets, validate local markdown links if relevant); do not full-read large workflow/script files |
| user is at PR time (submit, open, update, restack) | advisory mode: suggest minimal checks, staging needs, and likely CI risk; ask before running anything substantial |
| user asks what to run before push | recommend the minimal high-signal checks implied by the workflow |
| user asks what to commit or stage | reproduce the relevant generator/check path, then inspect git status and diffs |
| user explicitly asks to run checks | run the minimal derived set, not the whole world |
Only do this if the diff class suggests a real CI-family mapping, or if the user asks for broader confidence.
Read sources in this order:
.github/workflows/*.ymldev.ymlpackage.jsonFor normal PR work, start with .github/workflows/tests-pr.yml.
Read only the files and script sections needed for the diff class you identified. Avoid full reads of large files for docs/config/wiring-only diffs.
| Change shape | Inspect first | Likely response |
|---|---|---|
| Command/flag/help surface | docs/manifests/readme freshness jobs | derive the generator path from workflow → scripts |
| GraphQL queries or schemas | schema/codegen freshness jobs | derive the schema fetch + codegen path |
| TypeScript implementation or exports | type-check, lint, knip, bundle jobs | focused tests plus required static checks |
| Test helpers, async UI, network/auth/callback logic | unit-test jobs and nearby tests | focused tests plus a CI-risk warning |
| Workflow files or CI plumbing | affected workflow definitions | validate the changed contract directly |
After any generator, freshness check, or lightweight sanity pass:
git status --shortdev.yml is a useful local entrypoint, but workflow YAML is the source of truth for what CI enforces.dev.yml → package.json, then recommend focused tests plus any required generators.Take shopify/cli-pre-submit-ci from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.