CtrlK
BlogDocsLog inGet started
Tessl Logo

testland/print-stylesheet-tests

Test CSS print-media output via Playwright `page.emulateMedia({ media: 'print' })` + `page.pdf()` - `@page` rule (size, margin, orphans, widows), `@page :first / :left / :right` pseudo-classes, `break-before/after/inside`, `@media print` selector activation, page-break suppression on headings. Use when an app exposes a Print button or a print stylesheet exists but is untested, and users report the printed or PDF copy breaking in the wrong places while the on-screen page looks fine.

72

Quality

90%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

Quality

Content

85%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

Well-structured, actionable content with executable Playwright test patterns, a clearly sequenced workflow with assertion checkpoints and a worked debugging loop, and proper offloading of advanced material to a one-level-deep reference file. Minor issues — redundant doc-citation restatements and undefined PDF-inspection helpers — keep conciseness and actionability just short of top marks.

Suggestions

Remove duplicated doc-citation restatements (e.g., the printBackground default is stated twice in Step 6) and trim commentary asides like 'the canonical print bug' to reduce token overhead.

Name a concrete PDF-inspection library or provide one-line stubs for the helper functions (getPdfPageCount, extractTextPerPage, renderPdfPage, getPdfDimensions) so the test examples are copy-paste runnable without the pdf-snapshot-tester sister skill.

DimensionReasoningScore

Conciseness

Prose is mostly tight and focused on non-obvious API defaults ("preferCSSPageSize: true lets CSS @page { size: A4 } win over the API format option"), but Step 6 states the printBackground default twice ("By default printBackground: false" and "Per the [Playwright page.pdf docs]: printBackground defaults false") and asides like "the canonical print bug" could be trimmed.

4 / 5

Actionability

Six concrete Playwright test blocks with specific options (preferCSSPageSize, printBackground, format: 'A4') and a step-by-step worked example, but the PDF-inspection helpers (getPdfPageCount, extractTextPerPage, renderPdfPage, getPdfDimensions) are never defined — "Use a PDF inspector lib or pair with pdf-snapshot-tester" — so the examples are not copy-paste runnable.

4 / 5

Workflow Clarity

A 7-step 'How to use' overview is expanded into sequenced, assertion-backed steps, and the worked example demonstrates an explicit feedback loop: page-count assertion fails (3 vs baseline 2) → extractTextPerPage pinpoints the split totals table → re-add break-inside: avoid → re-run passes.

5 / 5

Progressive Disclosure

The core workflow stays inline while advanced @page geometry (pseudo-classes, margin precedence) is split into the real references/page-geometry.md, clearly signaled from a dedicated section, How-to step 7, the anti-patterns table, and the References list — one level deep, easy to navigate.

5 / 5

Total

18

/

20

Passed

Description

92%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A highly specific, well-triggered description that names the exact Playwright APIs and enumerates the print-CSS test surface, backed by an explicit 'Use when' clause with concrete scenarios. The only weakness is slightly incomplete natural-synonym coverage for trigger terms.

DimensionReasoningScore

Specificity

Names exact API actions ("page.emulateMedia({ media: 'print' }) + page.pdf()") and enumerates concrete test targets ("@page rule (size, margin, orphans, widows)", "@page :first / :left / :right pseudo-classes", "break-before/after/inside", "@media print selector activation, page-break suppression") with no coverage gaps.

5 / 5

Completeness

Explicitly answers what ("Test CSS print-media output via Playwright...") with an enumerated feature list, and when ("Use when an app exposes a Print button or a print stylesheet exists but is untested, and users report the printed or PDF copy breaking...") with concrete trigger scenarios.

5 / 5

Trigger Term Quality

Natural user phrases are present ("Print button", "print stylesheet", "printed or PDF copy breaking in the wrong places", "on-screen page looks fine"), but common synonyms and extensions like "PDF export", "print preview", or ".pdf" are missing.

4 / 5

Distinctiveness Conflict Risk

Clear niche — automated testing of print-media CSS via Playwright's emulateMedia/pdf APIs — with distinct triggers ("Print button", "print stylesheet", "printed copy breaking") that are unlikely to fire for general PDF-manipulation or generic Playwright skills.

5 / 5

Total

19

/

20

Passed

Validation

93%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

referenced_paths_exist

Referenced path issues: 2 missing

Warning

Total

15

/

16

Passed

Reviewed

Table of Contents