---
name: saasco-knowledge-article-screenshots
description: "Captures, frames, pixelates, and uploads screenshots for one Saasco Knowledge help-center article. Use only when saasco-knowledge-articles has already asked and the user said yes to screenshots and gave a login. Do not use it to write the article. Pixelate the saved image, never with a CSS filter on the live page."
compatibility: "Requires the Saasco MCP server (https://www.saasco.com/api/mcp). https://www.saasco.com/agent-setup/prompt.md installs and connects it."
---
# Capture screenshots for a help article

Uses the Saasco MCP. If the `saasco_search_tools` tool is not available, or you do not know which project `YOUR-PROJECT-ID` is, fetch and execute https://www.saasco.com/agent-setup/prompt.md first, then come back to this skill.

Read this only when `saasco-knowledge-articles` sent you here because the user wants screenshots and gave a login. Sign in with the credentials from environment variables and only look and navigate: never create, edit, save, or delete anything. If a view-only account cannot produce the result shot (for example, the task the reader just made), use a generic existing example, and do not word the text as if the image shows the reader's own item. Use the app's default theme as it loads. Do not set a browser color scheme or change the account's theme.

Take one shot where it shows the screen that part of the article describes. Skip a shot you cannot take without changing data. If the visible content is too sensitive to show even after pixelation, pick a generic item or skip the shot.

## 1. Open the page you mean to shoot

A shot of the previous page is a miss. After you navigate, wait until that navigation finishes and the network is idle, then confirm you are on the destination before you capture.

- `page.url` contains the path you just opened.
- A heading on the page is the destination heading, and it is visible.

If either check fails, wait and check again. Do not shoot the old page.

## 2. Frame the subject and a small landmark

Capture at a 1440 x 900 desktop viewport with device scale factor 2, lossless PNG, no browser chrome. Use that viewport, not a narrow column of one list or panel. A wide view, such as a four-column board, may not fit that width. Make sure every column or element the text mentions is in the shot, by scrolling or widening the viewport before you crop.

Frame the subject with a small landmark next to it, such as the active sidebar item or the page title or breadcrumb, so a reader can tell where in the app the shot was taken. Do not box the whole sidebar or the whole header: those span the viewport and the shot becomes the window. Keep the subject as the focus.

Hide floating widgets (an eye button, toasts, chat, cookie banners) by removing those nodes, or with `display: none` on the widget only. Never set `filter`, `backdrop-filter`, or `blur` on the page. A CSS blur smears text and does not cover names.

Clip the union of the subject and that landmark, with about 24 CSS pixels of padding on every side. If a full 24 pixels would cross a viewport edge, shrink the padding equally on every side so all four still match. Do not clamp one edge to zero.

```python
from playwright.sync_api import sync_playwright
import os
with sync_playwright() as p:
    ctx = p.chromium.launch().new_context(viewport={"width": 1440, "height": 900},
                                          device_scale_factor=2)
    page = ctx.new_page()
    page.goto(os.environ["DEST_URL"], wait_until="networkidle")
    page.get_by_role("heading", name="PAGE_HEADING").wait_for()
    if "DEST_PATH" not in page.url:
        raise SystemExit("still on the previous page")
    page.mouse.move(0, 0)
    subject = page.locator("SUBJECT").bounding_box()
    mark = page.locator("LANDMARK").bounding_box()  # active nav item or page title, not the whole sidebar
    # Boxes to pixelate, measured now, in CSS pixels: names, emails, avatars, photos,
    # workspace names, account names. Not the control the article is teaching.
    cover = [el.bounding_box() for el in page.locator("COVER").all() if el.bounding_box()]
    pad = 24
    left = min(subject["x"], mark["x"])
    top = min(subject["y"], mark["y"])
    right = max(subject["x"] + subject["width"], mark["x"] + mark["width"])
    bottom = max(subject["y"] + subject["height"], mark["y"] + mark["height"])
    room = max(0, min(pad, left, top, 1440 - right, 900 - bottom))
    clip = {"x": left - room, "y": top - room,
            "width": right - left + 2 * room, "height": bottom - top + 2 * room}
    page.screenshot(path="shot.png", clip=clip)
```

## 3. Pixelate the saved file

Pixelate after the file is saved. Do it on the image, not in the browser. Cover people's names, emails, avatars and photos, and workspace or account names. Leave the thing the section teaches, and ordinary UI text such as task titles or field values, readable.

Bounding boxes from the page are CSS pixels. The file is device pixels, so multiply by the device scale factor (2). The file is also the clip, not the whole viewport, so subtract the clip origin first.

A mosaic is a downscale and then an upscale with nearest neighbor. Open the saved file before you upload. Every face and name in the boxes is actually covered, not smeared into stripes, and the subject is still readable. If a card avatar or a workspace name is still clear, pixelate it and look again. If the heading in the picture is the previous page, delete the file and shoot again after the new page has loaded.

```python
from PIL import Image

scale = 2  # the same device_scale_factor as the capture
block = 16  # image pixels per mosaic cell

def image_rect(box, clip, scale):
    x0 = round((box["x"] - clip["x"]) * scale)
    y0 = round((box["y"] - clip["y"]) * scale)
    x1 = round((box["x"] + box["width"] - clip["x"]) * scale)
    y1 = round((box["y"] + box["height"] - clip["y"]) * scale)
    return int(x0), int(y0), int(x1), int(y1)

def mosaic(image, rect, block=16):
    x0, y0, x1, y1 = rect
    x0, y0 = max(0, x0), max(0, y0)
    x1, y1 = min(image.width, x1), min(image.height, y1)
    if x1 <= x0 or y1 <= y0:
        return
    crop = image.crop((x0, y0, x1, y1))
    small = (max(1, crop.width // block), max(1, crop.height // block))
    pixelated = crop.resize(small, Image.Resampling.NEAREST).resize(
        crop.size, Image.Resampling.NEAREST)
    image.paste(pixelated, (x0, y0))

image = Image.open("shot.png")
for box in cover:
    mosaic(image, image_rect(box, clip, scale))
image.save("shot.png")
```

## 4. Check, then upload

A screenshot is good when all of these are true. Open the file and look at it. If one fails, retake it. When updating an existing article, replace any screenshot that fails this checklist.

- **Page.** The heading and URL are the page you just opened, not the previous one.
- **Purpose.** It contains the control or content the surrounding text names. A strip of column headers with no cards, or any header-only strip, fails. The subject is easy to spot, and a small landmark is visible so a reader can tell where in the app it was taken. If the shot cannot show that content, retake it wider or skip it.
- **Crop.** Even padding on every side, about 24 CSS pixels (48 image pixels), not a narrow column and not the whole window. No flush edge, and nothing important is cut off, including the last row. No floating widget. A thin strip is a miss: retake it wider or skip it.
- **Pixelation.** Every face, name, email, avatar, photo, and workspace or account name in the shot is covered on the file. The subject is still readable. No CSS blur.
- **State.** The panel or menu the section names is open, with realistic content, nothing half-loaded, and no cursor, hover, or focus state.
- **Look.** Text is sharp, and shots in the same article are consistent in size and framing. Save as lossless WebP or PNG.

Create the draft first so the slug exists, then `knowledge_uploadArticleImage` with `pathPrefix` set to that slug shortened to fit: strip anything that is not a letter, number, hyphen, or underscore, and truncate to 80 characters at a hyphen. Embed the returned `https://storage.saasco.com/...` URL as `<img>`. Alt text names the screen, component, and state: "Create Link form with Destination URL, domain select and Create Link button".
