Skip to content

Commit a5b655a

Browse files
btiernayclaude
andcommitted
Add taking-screenshots skill for standardized documentation screenshots
This skill provides guidance for taking and updating UI screenshots across Auth0 documentation sites (main, auth4genai, ui) with consistent viewport settings, file paths, Playwright MCP usage, and accessible alt text. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent b4bf8b8 commit a5b655a

File tree

6 files changed

+481
-0
lines changed

6 files changed

+481
-0
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
name: taking-screenshots
3+
description: Provides a consistent, reproducible workflow for creating, updating, and maintaining screenshots in the Auth0 docs-v2 monorepo. Use when capturing or modifying screenshots for Mintlify pages, Auth0 Dashboard interfaces, or UI surfaces within main, auth4genai, or ui. Ensures correct formatting, accessibility, alt text, paths, viewport, file size, cropping rules, and Playwright MCP usage.
4+
---
5+
6+
# Taking screenshots for docs-v2
7+
8+
Use this skill when capturing or updating screenshots that will be committed to `docs-v2`. It defines when screenshots add value, how they must be formatted, how to capture them reproducibly, where to store them, and how to handle alt text and accessibility.
9+
10+
## When to use
11+
12+
Use this skill when:
13+
14+
- A screenshot helps clarify a complex UI step or validates that the reader is in the correct place.
15+
- A UI region has multiple interdependent settings and is hard to describe concisely in text.
16+
- A Mintlify preview or Auth0 Dashboard interface needs visual confirmation to reduce ambiguity.
17+
- An existing screenshot in `docs-v2` is out of date due to UI changes.
18+
19+
## When NOT to use
20+
21+
Do not use this skill for:
22+
23+
- Conceptual diagrams, flowcharts, or visuals that should be vector graphics.
24+
- Decorative or aesthetic images.
25+
- One off internal exploration screenshots that will not be committed to `docs-v2`.
26+
- Third party applications or websites.
27+
- Cases where clear text instructions are enough and the screenshot would only duplicate the text.
28+
29+
## Standard workflow
30+
31+
For most tasks, follow this workflow. Only open reference files if you need additional detail.
32+
33+
1. Decide if the screenshot is additive
34+
- Confirm that the screenshot will reduce ambiguity or cognitive load, not just restate the text.
35+
- Users must still be able to complete tasks using text alone.
36+
37+
2. Reach the correct UI state
38+
- Open the right Mintlify preview or Auth0 Dashboard view.
39+
- Reproduce the exact page, tab, filters, and selections described in the doc.
40+
- Use safe, generic, non sensitive values.
41+
42+
3. Use a stable viewport and browser
43+
- Use Chrome.
44+
- Use a viewport of `1200 × 900`.
45+
- Do not include browser chrome, URL bar, tabs, or OS UI.
46+
- No device emulation unless explicitly required.
47+
48+
4. Stabilize the UI
49+
- Wait for loading indicators, skeletons, and animations to finish.
50+
- Dismiss banners, toasts, or modals unless they are part of the documented behavior.
51+
- Confirm that visible labels match the current UI text.
52+
53+
5. Capture a focused region
54+
- Capture only the relevant panel, section, or modal, plus minimal surrounding context to confirm location.
55+
- Avoid full dashboard windows and unnecessary whitespace.
56+
- For modals, capture only the modal, not the background.
57+
58+
6. Apply required formatting
59+
- Add a `1px` centered border with color `#CCCCCC`.
60+
- Do not add shadows or decorative effects.
61+
- Use highlight color `#0099CC` only when it clarifies a specific control or region.
62+
- Capture at `1200px` width, keep outputs at no more than `1500px`.
63+
- Use PNG format for screenshots.
64+
65+
7. Save and name the file
66+
- Use the appropriate path for the workspace (main, auth4genai, or ui).
67+
- Use lowercase, hyphen separated, descriptive filenames.
68+
- Do not include dates, version numbers, or author initials.
69+
70+
8. Provide alt text and verify
71+
- Write concise, purpose driven alt text that describes the UI state and product area, not the image mechanics.
72+
- Confirm there are no sensitive values.
73+
- Make sure the page text does not depend on the screenshot as the only source of information.
74+
75+
9. Prefer Playwright MCP when possible
76+
- For reproducible captures, use Playwright MCP to open the preview, reach the correct state, and take an element screenshot that follows the same viewport and formatting rules.
77+
78+
## Quick reference
79+
80+
| Task | Reference |
81+
|------|-----------|
82+
| Detailed inclusion and alt text rules | [reference/alt-text-and-accessibility.md](reference/alt-text-and-accessibility.md) |
83+
| Full capture and formatting workflow | [reference/screenshot-workflow.md](reference/screenshot-workflow.md) |
84+
| Deterministic captures using Playwright MCP | [reference/playwright-mcp-usage.md](reference/playwright-mcp-usage.md) |
85+
| Repo paths and filename patterns | [reference/repo-paths-and-filenames.md](reference/repo-paths-and-filenames.md) |
86+
| Auth0 Dashboard specifics | [reference/dashboard-sources.md](reference/dashboard-sources.md) |
87+
88+
## Common mistakes
89+
90+
| Mistake | Fix |
91+
|--------|-----|
92+
| Including browser chrome or OS UI | Capture only the app region in a `1200 × 900` viewport |
93+
| Using screenshots where text is sufficient | Replace the screenshot with clear step by step instructions |
94+
| Using screenshots of third party UIs | Remove or replace with text, unless explicitly approved and necessary |
95+
| Out of date UI labels | Recapture the screenshot and update surrounding text to match |
96+
| Missing or generic alt text | Write concise, task oriented alt text that names the product area and view |
97+
| Including loaders, transient modals, or toasts | Wait for a stable UI state before capture |
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Screenshot inclusion and accessibility
2+
3+
This file defines when screenshots should be included, how to minimize accessibility and localization burden, and how to write alt text. For basic decisions, see `SKILL.md`. Use this file when you need more detailed guidance or examples.
4+
5+
## 1. When screenshots add value
6+
7+
Include a screenshot when it does at least one of the following:
8+
9+
- Reassures the user that they are in the correct UI location.
10+
- Calls attention to a specific region or control within a complex UI.
11+
- Supports an example that is hard to visualize from text alone.
12+
- Shows a configuration screen with multiple interdependent settings.
13+
- Serves as a first interface verification screenshot for a new section or product area.
14+
15+
Use an additive approach. The screenshot should reduce ambiguity or cognitive load, not just repeat the text.
16+
17+
## 2. When NOT to include screenshots
18+
19+
Avoid screenshots when:
20+
21+
- Text instructions alone can fully convey the step without confusion.
22+
- The screenshot provides no additional technical information beyond what is already described.
23+
- The user is likely to have the application open beside the docs and can see the referenced UI directly.
24+
- The screenshot is used mainly as decoration or to break up long text.
25+
- It duplicates exactly what is described in text, especially step by step instructions.
26+
- It tries to verify every small step instead of the overall state.
27+
- The UI changes frequently, making it hard to keep screenshots accurate.
28+
29+
Screenshots can slow reading, may confuse users if mistaken for live UI, and increase maintenance cost.
30+
31+
## 3. Accessibility considerations
32+
33+
- Every screenshot requires alt text.
34+
- Alt text must stay in sync with the image and with the current UI.
35+
- Localization multiplies maintenance cost for both image and text.
36+
- Screenshots should never be the only source of information for a task.
37+
- Users with disabilities must be able to complete tasks using text alone.
38+
39+
Design the doc so that removing the screenshot would not prevent a user from succeeding.
40+
41+
## 4. Localization considerations
42+
43+
- Each screenshot adds translation overhead.
44+
- Alt text must be translated along with the rest of the content.
45+
- Avoid embedding critical text inside images. When possible, rely on UI labels and body text instead of annotations rendered into the screenshot.
46+
47+
Only introduce new screenshots when they clearly improve comprehension enough to justify ongoing translation cost.
48+
49+
## 5. Alt text rules
50+
51+
Alt text must:
52+
53+
- Describe the purpose of the screenshot and the UI state, not the image itself.
54+
- Indicate product area and UI section.
55+
- Use sentence case.
56+
- Use Auth0 terminology accurately and consistently.
57+
58+
Good examples:
59+
60+
- `Auth0 Dashboard Application Settings view showing Allowed Callback URLs field`
61+
- `Auth0 Tenant Settings General tab with support email, logo, and session settings`
62+
- `Docs UI quickstart card grid on the Get Started page`
63+
64+
Avoid:
65+
66+
- Generic text such as `screenshot` or `image of the UI`.
67+
- Repeating captions or surrounding body text word for word.
68+
- Describing every visual detail or pixel level layout.
69+
70+
## 6. Information placement
71+
72+
- Body text explains what the user must do and why.
73+
- The screenshot clarifies or validates a complex UI state or set of controls.
74+
- Alt text provides a brief textual stand in for the screenshot.
75+
76+
If a step references content that appears only in the screenshot, move that information into the body text so that screen reader users and translated versions are not dependent on the image alone.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Auth0 Dashboard sources
2+
3+
Use this file when you need more detail about Auth0 Dashboard views. For general workflow and formatting, see `reference/screenshot-workflow.md`.
4+
5+
### Navigation clarity in text
6+
7+
In the documentation text:
8+
9+
- State the full navigation path in terms of the Dashboard hierarchy.
10+
- For example: `Auth0 Dashboard > Applications > Applications > Settings`.
11+
12+
This ensures users can reach the correct view even without the screenshot.
13+
14+
### Navigation clarity in screenshots
15+
16+
In the screenshot:
17+
18+
- Include only enough UI context to confirm the location, such as a panel title or breadcrumb.
19+
- Crop out:
20+
- Browser window and chrome.
21+
- Top navigation bar, unless it is directly relevant to the step.
22+
- Left navigation bar, unless the doc is explicitly about navigation.
23+
24+
The goal is to show the configuration or state the user cares about, plus minimal context to prove they are in the right place.
25+
26+
### Data hygiene
27+
28+
Use non sensitive values:
29+
30+
- Example tenant names instead of production tenant identifiers.
31+
- Generic application names.
32+
- Fake email addresses such as `[email protected]`.
33+
34+
Avoid:
35+
36+
- Real user data.
37+
- Internal tenant names or identifiers.
38+
- Secrets, tokens, or internal URLs.
39+
40+
### UI consistency
41+
42+
- Use exact UI label text in both screenshots and body text.
43+
- If UI copy changes, update the screenshot and adjust the surrounding text to match.
44+
- Avoid highlighting controls that are not referenced in the instructions.
45+
46+
## Third party UIs
47+
48+
- Avoid screenshots of third party applications or websites whenever possible.
49+
- Do not include external branding, user data, or proprietary UI unless there is a specific approval and requirement.
50+
- Prefer concise text descriptions or vector diagrams for third party interactions.
51+
52+
If a third party screenshot is unavoidable, treat it as an exception and follow internal review processes before adding it to `docs-v2`.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Using Playwright MCP for deterministic screenshots
2+
3+
Use Playwright MCP when you need consistent, reproducible captures or when UI states are hard to reach manually. It reuses the same viewport and formatting rules defined in `reference/screenshot-workflow.md`.
4+
5+
## 1. Start the correct dev server
6+
7+
Run the appropriate dev server:
8+
9+
- In `main/`: `mint dev`
10+
- In `auth4genai/`: `mint dev`
11+
- In `ui/`: `npm run dev`
12+
13+
Use the preview URL from the console output. Do not hardcode localhost ports if they can change.
14+
15+
## 2. Apply the standard viewport
16+
17+
When launching the browser in Playwright MCP:
18+
19+
- Use the standard viewport `1200 × 900`.
20+
- Do not resize the window manually after launch.
21+
- Do not include browser chrome or OS UI in screenshots.
22+
23+
Follow all cropping and formatting rules from `reference/screenshot-workflow.md`.
24+
25+
## 3. Wait for stable selectors
26+
27+
Before taking a screenshot:
28+
29+
- Choose selectors that appear only when the main content is fully loaded.
30+
- Prefer selectors that represent the primary content region, not transient placeholders.
31+
- Avoid selectors that match skeleton states, loading spinners, or transient banners.
32+
33+
Examples of good selectors:
34+
35+
- Main content containers
36+
- Stable header or breadcrumb elements that exist only after load
37+
- Key form sections for configuration pages
38+
39+
## 4. Interact to reach the documented state
40+
41+
Use Playwright interactions to reach the UI state described in the doc:
42+
43+
- Click tabs, accordions, and toggles.
44+
- Apply filters or sorting.
45+
- Scroll to the relevant section.
46+
47+
If the path to reach the state is non obvious, describe it briefly in the PR description so others can reproduce it.
48+
49+
## 5. Capture the screenshot
50+
51+
Prefer element screenshots:
52+
53+
- Take an element screenshot of the main content region or specific panel you are documenting.
54+
- Use full viewport screenshots only when necessary, for example when showing page level layout that is relevant to the doc.
55+
56+
Save screenshots using repo relative paths:
57+
58+
- `auth4genai/img/...`
59+
- `main/docs/img/...`
60+
- `main/docs/images/...`
61+
- `ui/src/assets/screenshots/...`
62+
- `ui/public/screenshots/...`
63+
64+
File naming and formatting must follow the rules in:
65+
66+
- `reference/repo-paths-and-filenames.md`
67+
- `reference/screenshot-workflow.md`
68+
69+
## 6. Inspect and iterate
70+
71+
After capture:
72+
73+
- Verify the screenshot matches the state described in the doc.
74+
- Confirm no transient UI, loaders, or toasts are visible.
75+
- Check that the element boundaries provide enough context without extra noise.
76+
- Re capture if cropping, whitespace, or context is insufficient.
77+
78+
When you find a stable selector and pattern that works well, keep using it for future captures of the same page to minimize visual drift over time.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Repo paths and filenames
2+
3+
Use this file as the single source of truth for screenshot locations and naming patterns. Other docs only refer to it.
4+
5+
## Auth0 for AI docs (`auth4genai/`)
6+
7+
Store shared screenshots in:
8+
9+
- `auth4genai/img/...`
10+
11+
Group by site structure when helpful:
12+
13+
- `auth4genai/img/get-started/...`
14+
- `auth4genai/img/how-tos/...`
15+
- `auth4genai/img/integrations/...`
16+
17+
Use descriptive filenames, for example:
18+
19+
- `auth4genai-user-authentication-login-screen.png`
20+
21+
## Main docs (`main/docs/`)
22+
23+
Use:
24+
25+
- `main/docs/img/...` (preferred)
26+
- `main/docs/images/...` (when that pattern is already used nearby)
27+
28+
Group by product area where possible:
29+
30+
- `main/docs/img/authenticate/...`
31+
- `main/docs/img/manage-users/...`
32+
33+
Examples:
34+
35+
- `main/docs/img/authenticate/universal-login-settings.png`
36+
37+
## UI workspace (`ui/`)
38+
39+
Use:
40+
41+
- `ui/src/assets/screenshots/...` for bundled assets
42+
- `ui/public/screenshots/...` for static assets
43+
44+
Examples:
45+
46+
- `ui/src/assets/screenshots/pr-template-preview.png`
47+
48+
## File naming rules
49+
50+
- Lowercase only.
51+
- Hyphen separated.
52+
- Descriptive of purpose and UI area.
53+
54+
Patterns:
55+
56+
- `[product]-[area]-[view-state].png`
57+
- `[site]-[section]-[focus].png`
58+
59+
Avoid:
60+
61+
- Generic names such as `image1.png` or `screenshot.png`.
62+
- Dates or version numbers.
63+
- Author initials or personal tags.
64+
65+
## Format
66+
67+
- PNG for screenshots.
68+
- SVG only for logos or icons, not for UI screenshots.
69+
70+
If you need to replace an existing image with a new version, keep the filename and path the same whenever possible so that existing references remain valid.

0 commit comments

Comments
 (0)