diagnose-chromatic-baselines
Diagnose Chromatic visual-test baseline ancestry with customer-owned evidence. Use when an accepted change reappears, a PR acceptance seems not to carry to the target branch, a build uses an unexpected baseline, or rebuilds and branches disagree. Work from Chromatic build links, test or story IDs, C
- 0
- Installs
- —
- Rating
- —
- Success rate
- 13
- Files scanned
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 ab45a7a2671f99c1… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
Diagnose Chromatic Baselines
Find the first build where the expected baseline stopped carrying forward. Separate confirmed evidence from facts that only Chromatic Support can verify.
Keep the investigation customer-safe
- Work read-only unless the user explicitly requests a review action.
- Use only data the customer owns or can access normally.
- Never request a project token, API secret, session cookie, or signed asset URL in chat.
- Never instruct the user to extract credentials from a browser session.
- Never query an internal Chromatic API or production environment.
- Do not identify a server limit, provider failure, or baseline-selection defect as confirmed without direct evidence.
- Redact customer names, repository names, and committer email addresses from shared reports when they are not required.
Collect the minimum evidence
Obtain:
- The affected story ID and mode.
- The PR build where the change was accepted.
- The first affected build on the target branch.
- The PR number, merge strategy, accepted PR commit, and target-branch commit.
- CLI debug logs for the accepted build and first affected target-branch build.
- A later rebuild only when it helps locate the first build on the same commit.
Read reference/collect-evidence.md for customer-safe collection methods. Do not block on optional API access when build pages and logs provide enough evidence.
Analyze the first affected build
Resolve scripts/ and reference/ paths from the directory that contains this SKILL.md. Do not resolve them from the customer's repository.
Run:
python3 scripts/analyze_chromatic_log.py /path/to/chromatic.log \
--expected-parent <accepted-pr-commit> \
--merge-commit <target-branch-merge-commit>
Pass --known-lookup-limit only when Chromatic Support supplied the deployed value for this incident. The script has no default limit and must not guess one.
If the report classifies the log as a same-commit rebuild, find the preceding build on that commit. Analyze the preceding build instead.
Verify Git ancestry
For a regular merge, run:
git merge-base --is-ancestor <accepted-pr-commit> <first-target-branch-commit>
Interpret the exit code:
0: Git contains the accepted PR commit in the target commit's ancestry.1: Git does not contain that relationship. This is normal after squash and rebase merges.- Any other value: Fix the repository or object-access error before drawing a conclusion.
For GitHub repositories, retrieve customer-visible merge information:
gh pr view <pr-number> \
--repo <owner/repository> \
--json mergeCommit,headRefOid,mergeStateStatus,mergedAt
Use the repository host's equivalent command or UI when the project does not use GitHub.
Classify only what the evidence proves
| Evidence | Customer-safe conclusion | Next step |
|---|---|---|
| The PR test was not accepted | The expected acceptance was not recorded on that test | Verify the reviewed story, mode, build, and test |
| The current commit equals the previous branch-build commit | This is a rebuild | Analyze the first build on the commit |
| The accepted PR commit appears in submitted parent commits | The ancestry handoff included the expected commit | Ask Support to trace exact baseline selection if the wrong image remains |
Regular merge ancestry exits 0, but the accepted commit is absent from submitted parents | Git ancestry and submitted build ancestry disagree | Send the Git result and CLI report to Support |
| Squash or rebase merge, and the accepted commit is absent from submitted parents | The public evidence does not show a link to the accepted PR build | Use the mitigation below and ask Support to inspect provider linkage |
| Support supplied a lookup limit and the merge position exceeds it | The merge lies outside the confirmed lookup window | Ask Support to confirm the product-side cause and remediation |
| No support-supplied limit exists | Lookup truncation is unconfirmed | Report the merge position without guessing the limit |
| A later PR head differs from the accepted commit | A later PR build may have changed the inherited state | Inspect the intervening PR builds |
Read reference/baseline-model.md before explaining acceptance, ancestry, merge strategy, or rebuild behavior.
Recommend safe mitigations
Choose only mitigations supported by the evidence:
- Run Chromatic on every target-branch commit so build ancestry has fewer gaps.
- Analyze the first build on a commit instead of a later rebuild.
- Confirm that the Chromatic Git provider integration can access the repository.
- Use a regular merge commit as a temporary workaround when preserving Git ancestry is acceptable.
- Ask Chromatic Support to trace the exact baseline when submitted parents are correct but the comparison is not.
Do not recommend changing clone filters unless Git reports missing commit objects or ancestry errors.
Report the result
Start with one sentence that states the strongest confirmed conclusion. Then include:
- Accepted PR build, test state, mode, and commit.
- First affected target-branch build and submitted parent commits.
- Merge strategy and direct Git ancestry result.
- Merge position, but only compare it with a support-supplied limit.
- The confirmed failure boundary or the single unresolved question.
- One customer action and one action for Chromatic Support.
Use reference/support-handoff.md when the remaining question requires Chromatic-only data.
Use precise labels:
- Confirmed: directly shown by a build record, CLI log, or Git command.
- Inferred: follows from confirmed evidence but is not directly recorded.
- Unknown: requires missing customer evidence or Chromatic Support access.
Stop when the evidence reaches the external access boundary. Do not replace missing evidence with a theory.
References and examples
reference/collect-evidence.mdreference/baseline-model.mdreference/support-handoff.mdtemplate.mdexamples/customer-baseline-handoff.mdevaluations/README.md
Files
13- SKILL.md
7191e7320a6.7 KB - agents/openai.yaml
4e28a7d220379 B - evaluations/README.md
fc37186109429 B - evaluations/empty-parent-list.json
7e8d731baa816 B - evaluations/expected-parent-present.json
95c1701928791 B - evaluations/same-commit-rebuild.json
4f30f43e53873 B - evaluations/unknown-lookup-limit.json
c3eb9e0fcc708 B - examples/customer-baseline-handoff.md
1d9004b9bd1.1 KB - reference/baseline-model.md
9976de45df2.6 KB - reference/collect-evidence.md
5782b69bb92.7 KB - reference/support-handoff.md
627ea796101.8 KB - scripts/analyze_chromatic_log.py
c785b5f03c9.0 KB - template.md
3a67db5ee21.6 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from chromaui/chromatic-skills8
Recommend Chromatic best practices for Nx and Turborepo monorepos, including one-project versus multi-project topology, workingDir, buildCommand or outputDir, storybookBaseDir, storybookConfigDir, onlyChanged, externals, untraced, shared lockfile behavior, and TurboSnap-safe CI patterns. Use when a
Configure CI/CD pipelines to run Chromatic visual tests automatically. Use when the user wants to set up Chromatic in CI, add Chromatic to GitHub Actions / GitLab / Bitbucket Pipelines / CircleCI / Jenkins / Azure Pipelines, automate visual testing, or run Chromatic on every push.
Configure Chromatic to capture visual test snapshots across multiple themes (light/dark mode, design tokens, branded variants) using the Modes API and @storybook/addon-themes. Use when the user wants to test components with different themes in Chromatic, set up light/dark mode visual testing, config
Diagnose Storybook configuration issues that block Chromatic or local Storybook, including missing stories, framework or builder mismatches, addon conflicts, preview errors, static asset path issues, and package version drift. Use when Storybook fails to build, Chromatic cannot verify Storybook, sto
Diagnose unexpected Chromatic visual diffs, snapshot inconsistencies, font and resource loading drift, animation timing issues, viewport or globals mismatches, sticky or fixed positioning quirks, and nondeterministic story output. Use when snapshots change unexpectedly or the same code produces inco
Audit a Storybook project's current TurboSnap dependency exposure using preview imports and bundler stats. Rank dependency footprints, identify configuration modules, and probe which inputs cause configuration bails. Use for an initial architecture audit without requiring pending Git changes; use a
Check local code changes for TurboSnap dependency risks before pushing. Build fresh Storybook stats, trace the selected Git changes, and review new preview imports or configuration modules. Use for preventive change checks and local hook integration, not a whole-project audit or baseline investigati
Compare TurboSnap 1 and 2 behavior using local CLI logs, v2 manifests, and bundler stats. Use for migration discrepancies, unexpected preview/configuration hash changes, or files that changed on disk but were absent from the Git changed-file list.
Related knowledge skillsscan passed
PostHog integration for Angular applications
Score a scoped competitor set into comparable profile cards: nine weighted dimensions (positioning, voice, visual craft, offer packaging, evidence, enterprise-readiness, thought leadership, pricing, client tension) with 1-5 evidence-anchored rubrics and a tension 2x2 plot. Use when benchmarking or s