Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问许可证需确认审计异常

cuj-screenshotscuj 截图

Agent Skill

cuj-screenshots 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

196

周安装

8

GitHub Stars

2

下载量

63
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cuj-screenshots(cuj 截图)
来源仓库:https://github.com/zeroasterisk/cuj-screenshots
仓库路径:skills/cuj-screenshots
安装命令:
npx skills add https://github.com/zeroasterisk/cuj-screenshots --skill cuj-screenshots
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/zeroasterisk/cuj-screenshots --skill cuj-screenshots

简介

cuj-screenshots 通过无头浏览器自动化捕获 Web 应用用户旅程的视觉快照。

  • 适用于前端变更后的即时可视化验证,确保 UI 改动符合预期效果。
  • 支持生成 GIF 动图与静态截图,便于团队协作与 bug 复现汇报。
  • 应集成到开发流程中,每次组件更新后自动触发截图任务。
  • 需配置稳定的测试环境 URL,避免网络波动影响截图一致性。

SKILL.md

CUJ Screenshots Skill

Automate visual documentation of web app user journeys using headless browser automation.

When to Use This

Always run CUJ captures after UI changes. This is part of the dev loop, not just documentation.

Triggered By:

  • Any frontend component change
  • CSS/styling updates
  • New features that affect user flow
  • Bug fixes that change visible behavior
  • Before sharing work with humans ("here's what it looks like now")

The Loop:

Make UI change → Run CUJs → Review screenshots →
  ├─ Looks good? → Update GIFs, commit, share link
  └─ Looks wrong? → Fix bug, repeat

Proactive Use:

When finishing UI work, don't just say "done" — capture CUJs, update the GIFs, and share:

"Updated the task card styling. Here's the new CUJ: https://github.com/user/repo/blob/main/docs/CUJs.md"

This gives your human instant visual feedback without them needing to run the app.

What It Does

  1. Launches headless Chromium via Playwright
  2. Navigates through a defined user journey
  3. Captures screenshots at each step
  4. Stitches screenshots into an animated GIF
  5. Outputs to a docs folder for commit

Requirements

  • Playwright: uv run --with playwright python script.py
  • Chromium: Auto-installed by Playwright on first run
  • ImageMagick: For GIF creation (convert command)

Install Playwright browsers (one-time):

uv run --with playwright playwright install chromium

Quick Start

1. Define Your CUJ

Create a Python script for each journey:

import asyncio
from playwright.async_api import async_playwright
import os

async def capture_my_cuj():
    output_dir = "/tmp/cuj-screenshots/my-cuj"
    os.makedirs(output_dir, exist_ok=True)

    async with async_playwright() as p:
        browser = await p.chromium.launch(headless=True)
        context = await browser.new_context(
            viewport={"width": 390, "height": 844},  # Mobile
            device_scale_factor=2  # Retina
        )
        page = await context.new_page()

        # Step 1
        await page.goto("http://localhost:5173")
        await page.wait_for_timeout(1500)
        await page.screenshot(path=f"{output_dir}/01-initial.png")

        # Step 2: Interact
        await page.click("button:has-text('Submit')")
        await page.wait_for_timeout(1000)
        await page.screenshot(path=f"{output_dir}/02-submitted.png")

        # ... more steps

        await browser.close()

if __name__ == "__main__":
    asyncio.run(capture_my_cuj())

2. Run Capture

uv run --with playwright python my_cuj.py

3. Create GIF

convert -delay 150 -loop 0 /tmp/cuj-screenshots/my-cuj/*.png output.gif
  • -delay 150 = 1.5 seconds per frame (hundredths of a second)
  • -loop 0 = infinite loop

4. Commit & Share

mv output.gif docs/gifs/my-cuj.gif
git add docs/gifs/my-cuj.gif docs/CUJs.md
git commit -m "docs: add my-cuj GIF"
git push

Viewport Presets

DeviceWidthHeightScale
iPhone 12 Pro3908442
iPhone SE3756672
Pixel 53938512.75
Desktop12807201
Desktop HD192010801

Common Interactions

# Click button by text
await page.click("button:has-text('Submit')")

# Fill input
await page.fill("input[name='email']", "test@example.com")

# Select dropdown
await page.select_option("select#plan", "premium")

# Wait for element
await page.wait_for_selector(".success-message")

# Scroll
await page.evaluate("window.scrollBy(0, 300)")

# Keyboard shortcut
await page.keyboard.press("Escape")

Full Workflow Example

See scripts/capture-cujs.py for a complete example that:

  • Starts backend + frontend servers
  • Captures multiple CUJs
  • Generates GIFs
  • Updates CUJs.md

Tips

  • Wait times: Use wait_for_timeout(1000) after interactions for animations
  • Selectors: Prefer text= or has-text() over fragile CSS selectors
  • Error handling: Wrap interactions in try/except, screenshot on error
  • Naming: Use numbered prefixes (01-, 02-) for sort order
  • GIF size: Keep under 500KB for GitHub README display

CUJs.md Documentation

Create a docs/CUJs.md file to document each journey with embedded GIFs:

# Critical User Journeys (CUJs)

## CUJ 1: App Tour

**Goal:** Navigate the main app layout.

**Steps:**
1. Open app → Activity tab
2. Switch to Live tab
3. Return to Activity

![App Tour](./gifs/cuj1-app-tour.gif)

---

## CUJ 2: Create Task

**Goal:** Create a new plan and task.

**Steps:**
1. Click "+ Plan"
2. Enter name, submit
3. Click "+ Task"
4. Enter name, submit

![Create Task](./gifs/cuj2-create-task.gif)

This serves as both documentation and visual regression baseline.

Verifying UI Changes

After making UI changes:

  1. Run the CUJ capture scripts
  2. Review the new screenshots (you can read image files!)
  3. If they look correct, update GIFs and commit
  4. Update CUJs.md if steps changed
  5. If something's wrong, you caught a bug!

Full Workflow

# 1. Make UI changes
# 2. Start servers
# 3. Capture CUJs
uv run --with playwright python scripts/capture-cujs.py

# 4. Review screenshots (agent can view these)
# 5. Create GIFs
convert -delay 150 -loop 0 /tmp/cuj-screenshots/cuj1/*.png docs/gifs/cuj1.gif

# 6. Update CUJs.md with new steps/descriptions
# 7. Commit everything
git add docs/CUJs.md docs/gifs/
git commit -m "docs: update CUJ screenshots after UI changes"
git push

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.15%
按下载量换算21

Claude

33.01%
按下载量换算21

Cursor

18.77%
按下载量换算12

Gemini CLI

9.62%
按下载量换算6

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills