Critically review an existing or proposed Stencila theme artifact for correctness, token usage, target coverage, cross-target portability, dark-mode handling, maintainability, and approval readiness. Use when asked to review, critique, assess, audit, or validate a theme.css file, theme patch, theme plan, site theme, document theme, plot theme, print or PDF theme, check design tokens, assess DOCX or email behavior, review dark mode support, or validate with stencila themes validate.
Review an existing or proposed Stencila theme artifact for correctness, token usage, target coverage, portability, maintainability, and approval readiness.
The artifact may be a workspace theme.css, a patch or diff, a CSS snippet, or a sufficiently concrete theme plan before implementation. The primary mode of this skill is assess and report: identify concrete issues, missing verification, risky assumptions, approval blockers, and target-specific gaps.
This is a review-only skill. Do not use it to create a new skill, write SKILL.md, design a theme from scratch, or generate a full new theme by default. Use it when the user wants an assessment of an existing artifact or a concrete proposed direction.
Use the local references in this skill directory when you need architecture or token-family guidance:
references/themes-guide.md for theme architecture, resolution rules, and cross-target constraintsreferences/semantic-and-font-tokens.mdreferences/node-token-families.md for document/node token familiesreferences/print-and-pdf-tokens.md for print and PDF page tokensreferences/plot-tokens.md for plot theming reviewreferences/site-token-families.md for site-theme component families and naming quirksreferences/cli-commands.md for token discovery and validation commandsreferences/snap-tool.md for visual verification with the snap tool and the /_specimen routeAlso use the theme CLI as the live source of truth when available:
stencila themes or stencila themes list to list all available themes (workspace, user, and builtin) with their type and locationstencila themes show [NAME] to display the resolved CSS of a theme (omit the name for the default resolved theme); add --verbose to also show resolved CSS variable values — especially useful for understanding what values are inherited from the base themestencila themes tokens to list builtin tokens, optionally filtered by --scope (semantic, node, site, plot, print) and --family, with --as json|yaml|toml for machine-readable outputstencila themes validate <FILE> to check that a CSS theme parses and that custom properties correspond to known builtin design tokens; use --strict when unknown tokens should fail validationsnap and /_specimenUse the snap tool during review to verify how the theme actually renders, rather than relying solely on static analysis of the CSS. Snap returns structured measurement data (tokens, CSS properties, layout metrics, contrast ratios, color palette) by default; screenshots are opt-in when you need visual confirmation. You can snap any page served by Stencila — including the user's own documents and site pages — but the /_specimen route is the canonical target for theme visual QA. It is a stable, deterministic page that renders representative examples of every major content type — typography, headings, lists, blockquotes, code blocks, math, images, tables, figures, admonitions, and thematic breaks — so it exercises all token families in one page. See references/snap-tool.md for the full parameter reference.
/_specimen to see how the theme currently renders, and extract token values to compare against what the CSS declares.selector or token_prefix to gather evidence for a specific review finding.dark: true to verify that dark variants render correctly.device: "mobile" or other presets to verify layout at different viewports.palette: true to verify color harmony and contrast.| Parameter | Use for |
|---|---|
route: "/_specimen" | Target the specimen page — exercises all major content types in one page |
measure: "theme" | Collect measurements using the theme-oriented selector preset |
tokens: true | Extract resolved CSS custom property values to verify overrides are applied. Requires at least one token_prefix — the tool returns a validation error without one |
token_prefix: ["text", "heading"] | Filter token output to specific families (required with tokens). Use narrow prefixes — bare "color" matches 100+ primitive palette tokens; prefer "color-accent", "surface", etc. |
palette: true | Extract the page's color palette for harmony and contrast review |
dark: true or light: true | Force a color scheme to review light and dark variants |
device: "mobile" | Test at a specific viewport (also "tablet", "laptop", "desktop") |
full_page: true | Capture the full scrollable page instead of just the viewport |
selector: "stencila-table" | Focus on a specific element type for targeted review |
assert: ["css(stencila-paragraph).fontSize>=16px"] | Assert numeric CSS properties; use ~= for string matching (e.g., fontFamily~=Source Serif) |
snap(route: "/_specimen", measure: "theme", tokens: true, token_prefix: ["text", "heading", "surface"]) — see what the theme produces now. Measurements and tokens are returned by default without a screenshot.snap(route: "/_specimen", tokens: true, token_prefix: ["text", "heading", "surface"]) — compare resolved values against what the CSS declares. Adjust prefixes to match the families under review.snap(route: "/_specimen", dark: true, tokens: true, token_prefix: ["text", "surface"]) — check for missing or broken dark variants. Add screenshot: true for a visual check.snap(route: "/_specimen", device: "mobile", measure: "theme") — check for layout or overflow issues. Run separate snaps per device preset.snap(route: "/_specimen", palette: true) — verify the overall palette is cohesive.snap(route: "/_specimen", selector: "stencila-code-block") — focus on a specific content type flagged in review.Also snap the user's actual document route to verify the theme works on real content, not just the specimen. Prefer the rendered directory route when the source file is index.*, main.*, or README.*; for example, docs/README.md, docs/main.md, and docs/index.md all render at "/docs/".
Screenshots are opt-in (screenshot: true) and default to resize: "auto" which preserves full resolution unless the image exceeds hard provider limits (8000px). A 600px minimum width floor prevents worst-case mobile downscaling.
/_specimen) are useful for gross layout checks but get downscaled on very tall captures, making typography details harder to read. For font rendering and spacing verification, use selector-targeted snaps (e.g., selector: "stencila-heading") instead.measure: "theme" output has summaries and diagnostics first, followed by verbose per-element CSS. The summaries are typically the most useful part — scan those before diving into raw values.Theme resolution is cached for about 30 seconds. When reviewing iterative changes, batch CSS edits before snapping rather than snapping after each small modification.
If snap cannot be run — for example, no Stencila server is running, the /_specimen route is not available, or the theme is not yet renderable — do not fabricate visual findings. Instead:
stencila themes validate, stencila themes tokens), and the review-lens dimensions that do not require rendering.snap commands to run once the environment is available.snap was actually executed and returned results.Stencila themes are token-first. In review, prefer semantic tokens as the stable public API, expect module-specific tokens only where needed, and flag broad custom CSS rules when tokens would be clearer, safer, or more portable.
Many tokens have *-dark variants (e.g., --text-color-primary-dark, --surface-background-dark, --plot-background-dark). The base theme applies these automatically via prefers-color-scheme: dark. When reviewing a theme:
*-dark variants when colors differ between schemes.stencila themes tokens --scope semantic or --scope plot to see which tokens have dark variants.Evaluate the artifact against these dimensions:
:root (i.e., not nested inside @media, @supports, or other at-rules)?snap of /_specimen confirm the theme renders as intended across all content types?snap look cohesive?stencila themes validate <FILE> or --strict be run?stencila themes tokens --scope ... --family ...?snap been used to visually verify the rendered result on /_specimen?Stencila automatically loads base.css before any theme CSS — both when rendering HTML (as a separate <link> tag) and when computing theme variables (base variables are merged before theme-specific ones). Users do not have base.css in their workspace.
@import url("./base.css") as a problem.@import url("./base.css") in a workspace theme as a review finding — it is unnecessary and may cause issues.:root overrides.Identify the review input and desired output.
theme.css, patch, snippet, or a verbal proposal.Classify the theme type and targets.
Inspect the existing context before judging changes.
theme.css and related assets before reviewing a proposed patch.stencila themes show to see the current default resolved theme CSS, or stencila themes show <NAME> for a specific theme. Add --verbose to also see resolved variable values — this is especially useful for understanding what values the theme inherits and what overrides actually change.stencila themes list to see all available themes (workspace, user, and builtin) and their locations.snap to capture a visual baseline of how the theme currently renders:
snap(route: "/_specimen", measure: "theme", tokens: true, token_prefix: ["text", "heading", "surface"]) — see current measurements and resolved token values before reviewing proposed changes. Adjust prefixes to match the families relevant to the review.theme.css first while walking up from the document path, then user default.css, then base theme (no overrides).Check the semantic foundation first.
references/semantic-and-font-tokens.md to assess whether the artifact starts with stable semantic tokens before dropping to module-specific tokens or selectors.Verify exact module-specific tokens when they matter.
stencila themes tokensstencila themes tokens --scope semanticstencila themes tokens --scope site --family nav-menustencila themes tokens --scope plot --as jsonreferences/semantic-and-font-tokens.mdreferences/node-token-families.mdreferences/print-and-pdf-tokens.mdreferences/plot-tokens.mdreferences/site-token-families.mdReview by theme type.
layout, nav-menu, nav-tree, nav-groups, breadcrumbs, toc-tree, prev-next, logo, title, and site-search.--plot-* tokens are used and call out non-transferable CSS.:root and review page-fit, margin, and header/footer assumptions.Check dark-mode handling.
*-dark variants are defined when the values would not work on a dark background.snap(route: "/_specimen", dark: true, tokens: true, token_prefix: ["text", "surface"]) to verify dark-mode token values. Add screenshot: true for a visual check — this often reveals issues that are not obvious from reading the CSS alone.Flag cross-target risks explicitly.
:root.@media, @supports, or browser-only selectors for values that the user expects to export across targets.Separate findings by severity and evidence.
Produce the right review output.
/_specimen and user content, or "pending" if snap was not run)Keep corrections secondary and explicitly requested.
Recommend validation with target-specific checks.
stencila themes validate <FILE> before concluding.stencila themes validate <FILE> --strict when unknown tokens should fail review.stencila themes validate <FILE> --as json when machine-readable validation results are useful.snap to provide visual evidence for your review findings:
snap(route: "/_specimen", measure: "theme", tokens: true, token_prefix: ["text", "heading", "surface"]) — verify content types render correctly and confirm resolved token values. Adjust prefixes to match the families under review.snap(route: "/_specimen", dark: true, tokens: true, token_prefix: ["text", "surface"]) — verify dark-mode token values.snap(route: "/_specimen", device: "mobile", measure: "theme") — verify responsive behavior. Run separate snaps per device.snap(route: "/_specimen", palette: true) — verify color harmony.index.*, main.*, or README.*.--plot-* token transfer to plotsWhen useful, structure the response like this:
theme.css, patch, snippet, or plan)/_specimen and user content)Each finding should be evidence-based. Use snap measurements, tokens, and screenshots as evidence alongside CSS analysis — do not make speculative claims without citing the token, selector, file region, snippet, snap result, or target assumption involved.
Input: Review this theme.css for a research-report document theme. I care about PDF and DOCX too.
Output:
theme.css:root:roottheme.css:42-49 uses table { border-color: #d6dae1; } as the primary table treatment. Review whether verified table-related tokens are available first, because this selector-level rule is broader and less portable than a token-based override.theme.css:88-94 sets --page-margin-top and related page tokens only inside @media print. If PDF and DOCX behavior matters, move those exportable page tokens to top-level :root.snap(route: "/_specimen", measure: "theme", tokens: true, token_prefix: ["text", "heading", "surface", "border"]) confirmed typography tokens applied correctly; table borders render with the selector-level rule but would be more portable as token overrides.snap(route: "/_specimen", dark: true, tokens: true, token_prefix: ["text", "surface"]) revealed no dark variants defined — text and surface colors fall back to base-theme defaults in dark mode, which may not match the intended design.stencila themes validate theme.css --strictstencila themes tokens --scope printstencila themes tokens --scope node --family tableInput: Please review this patch for our published site theme header and navigation.
Patch excerpt:
:root {
--layout-header-height: 48px;
--nav-menu-color: #6b7280;
--nav-menu-color-active: #0f766e;
--search-modal-width: 34rem;
}
header nav a {
letter-spacing: 0.08em;
}
Output:
--search-modal-width has been verified for the current build; otherwise verify it with stencila themes tokens --scope site --family site-search before approval because the patch depends on that exact nameheader nav a { letter-spacing: 0.08em; } is a broad site-chrome override without evidence that a token is insufficient. Prefer verified site tokens first, or justify why this selector is necessary.--layout-header-height to 48px should trigger a responsive review of nav wrapping, focus outlines, and search-trigger fit on narrow viewports.--nav-menu-color-active should align with the broader accent system for consistencysnap(route: "/_specimen", device: "mobile", measure: "theme") confirmed the 48px header causes nav items to wrap on mobile — consider increasing the height or switching to a hamburger menu at narrow viewports.snap(route: "/_specimen", measure: "theme") showed the letter-spacing override applies correctly but is not achievable through tokens alone, justifying the selector in this case.stencila themes tokens --scope site --family nav-menustencila themes tokens --scope site --family site-searchstencila themes validate theme.cssInput: Create a new theme for our publication site with a premium dark style.
Output:
Do not use this skill. This is a creation request, not a review request. Use the theme-creation skill instead.
Input: Review this theme idea: “make it calmer and more premium.” There is no CSS yet.
Output:
Before giving detailed review feedback, say that there is no concrete artifact to review and switch to plan review:
I can review the direction, but not the implementation yet. Is this for a document theme, a published-site theme, or both, and which outputs matter most: web, PDF, DOCX, email, or Python/R plots?
Then assess whether the stated direction is specific enough to map to semantic tokens, site token families, assets, and validation.
theme-creation skill.stencila themes tokens with the narrowest useful --scope and --family filters instead of guessing from memory.@media or @supports, flag that as a portability issue.@import url("./base.css"), flag it as unnecessary — Stencila loads the base theme implicitly.*-dark variants, flag the dark-mode gap when the theme targets web outputs.snap cannot be run (no server, no served route, theme not yet renderable), mark visual verification as "pending" in the review output, rely on static CSS and CLI analysis, and recommend specific snap commands to run once the environment is ready. Do not claim snap-based findings without actual snap results.