agentleFS
aniq-ui-proaniq-ui-pro/agent-skills/skills/app-screenshots/SKILL.md

app-screenshots

Skill1 starsChanged 2 days agoMITView on GitHub

Capture every page of a running Next.js (or any web) app in light and dark, desktop and phone, and every locale, from fresh data, and check each capture for blank pages, error overlays, horizontal scroll on phone, fonts or images that did not load, the wrong theme and the wrong text direction. Use when asked for screenshots of the whole app, a screenshot grid, release or listing screenshots, or a visual check of every route.

  • Installs packages

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check: every page.* file is in routes or written down as skipped, with the reason.

    line 19
  2. Very specific:

    Run the project's reset and seed commands (for example npm run db:reset && npm run db:seed).

    line 23
  3. Very specific:

    Add screenshots/ to .gitignore: screenshots/.auth/ holds signed-in browser state.

    line 86

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

App screenshots

Writes screenshots/<locale>/<theme>/<device>/<route>.png and screenshots/report.md. A capture that fails a check is listed with the reason, and the run exits 1.

1. List the routes

Find every page: find app src/app -name 'page.*' 2>/dev/null | sort. Write screenshots.config.json at the project root, starting from config.example.json beside this file. Put {locale} where the app has a locale segment, give each dynamic segment ([slug]) a real value from the sample data, and give pages behind sign-in "as": "<login>". An app with one fixed look and no light or dark mode uses "themes": ["default"].

Check: every page.* file is in routes or written down as skipped, with the reason.

2. Start from fresh data

Run the project's reset and seed commands (for example npm run db:reset && npm run db:seed). An app on browser-stored sample data needs nothing here: every capture opens a new browser context from the state saved right after sign-in.

Check: the seed exits 0, and one record it creates is visible in the API or database.

3. Build and start on a free port

curl -s -o /dev/null http://localhost:3043 && echo "3043 is taken, pick another"
npm run build
node node_modules/next/dist/bin/next start -p 3043 & echo $! > .screenshots.pid

A production build: next dev compiles each route on its first visit, so timings drift and dev-only overlays appear. Set the same port in baseUrl.

Check: curl -s -o /dev/null -w '%{http_code}' http://localhost:3043/ prints 200 (or the 307/308 your root redirect sends).

4. Make Playwright available

node -e "console.log(require.resolve('playwright'))" in the project. If that fails, install it outside the project and point the script at it:

mkdir -p /tmp/pw && cd /tmp/pw && npm init -y && npm i playwright && npx playwright install chromium

Check: the resolve prints a path, or /tmp/pw/node_modules/playwright exists.

5. Capture

PLAYWRIGHT_DIR=/tmp/pw node ${CLAUDE_SKILL_DIR}/scripts/capture.mjs screenshots.config.json

(Drop PLAYWRIGHT_DIR when the project has Playwright.) Each capture gets its own context with the theme set as prefers-color-scheme, scrolls to the end so lazy images load, waits for fonts and images, runs the checks, hides the hide selectors, grows the viewport to the page height and takes the picture. Light and dark of the same page are then compared byte for byte.

Check: the last line says 0 failed and the exit code is 0. Otherwise read screenshots/report.md, fix the page or the config, and rerun only those captures with --only <part of the id>, for example --only ar/dark/phone.

6. Look at every capture

Open each PNG with the Read tool. The checks cannot see cut-off text, overlapping cards, icons that did not mirror in right-to-left, an empty chart, placeholder copy or a wrong picture. Write one line per capture, naming the file and anything wrong.

Check: the notes have a line for every PNG, and each problem is fixed or reported.

7. Stop the server you started

kill "$(cat .screenshots.pid)" && rm .screenshots.pid

Check: curl -s http://localhost:3043/ can no longer connect.

Add screenshots/ to .gitignore: screenshots/.auth/ holds signed-in browser state.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.