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

generate-readme-screenshotsgenerate README screenshots 控制

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

698

周安装

30

GitHub Stars

1,691

下载量

245
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/coder/mux --skill generate-readme-screenshots

简介

辅助 README 文档整理与改写,提升说明文可读性。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中提炼结构、统一术语或检查链接。
  • 通过 GitHub 安装,使用 npx skills add 命令添加技能。
  • 应保留项目事实,避免将未确认信息写成确定结论。
  • generate-readme-screenshots 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Generate README Screenshots

Purpose

The README screenshots in docs/img/*.webp are not manually captured — they are deterministically generated from Storybook stories defined in src/browser/stories/App.readmeScreenshots.stories.tsx. When any of these stories change visually (detected by Chromatic or local inspection), the corresponding WebP assets must be regenerated and committed.

Quick Reference

# 1. Build Storybook
make storybook-build

# 2. Serve the static build (keep running in background)
python3 -m http.server 6006 -d storybook-static &

# 3. Capture all screenshots (3800px, WebP quality 90)
bun run scripts/capture-readme-screenshots.ts

# 4. Capture a single story
bun run scripts/capture-readme-screenshots.ts --story CodeReview

Prerequisites

The capture pipeline requires these tools. If any are missing, stop immediately and report the issue to the user with full detail — do not silently skip or produce degraded output.

DependencyPurposeCheck command
bunScript runtimebun --version
playwrightHeadless browser automationbun -e "require('playwright')"
sharpImage processing (resize, WebP)bun -e "require('sharp')"
python3Static file server for Storybook buildwhich python3

Prerequisite Verification

Before running the pipeline, verify all dependencies:

bun --version && \
bun -e "require('playwright'); require('sharp'); console.log('deps ok')" && \
which python3

If any of these fail:

  1. Do not proceed with screenshot generation.
  2. Report the exact failing command and error to the user.
  3. Suggest remediation:

- Missing playwright: bun add -d playwright && bunx playwright install chromium - Missing sharp: bun add -d sharp - Missing python3: suggest installing Python or using an alternative static server - Missing bun: this is a hard requirement — the entire repo uses bun

Architecture

Resolution & Output

ParameterValue
CSS Viewport1900 × 1188
Device Scale Factor (DPR)2
Native capture resolution3800 × 2376
Output formatWebP (quality 90, lanczos3 resampling)
Output directorydocs/img/

Story → Screenshot Mapping

Story Export NameOutput FileHas Interaction
CodeReviewcode-review.webpNo
AgentStatusSidebaragent-status.webpNo
GitStatusPopovergit-status.webpYes (open dialog + toggle mode)
PlanMermaidWithCostsplan-mermaid.webpNo
AutoModeAgentSwitchingauto-mode.webpYes (open creation card)
CostsTabRichcosts-tab.webpNo
ContextManagementDialogcontext-management.webpYes (open settings dialog)
MobileServerModemobile-server-mode.webpNo
OrchestrateAgentsorchestrate-agents.webpNo

Key Files

FileRole
src/browser/stories/App.readmeScreenshots.stories.tsxStory definitions and mock data
scripts/capture-readme-screenshots.tsPlaywright + Sharp capture pipeline
src/browser/stories/mockFactory.tsDeterministic mock data factories
src/browser/stories/mocks/orpc.tsMock ORPC backend (terminal, git, secrets)
docs/img/*.webpOutput screenshot assets

Step-by-Step Procedure

1. Build Storybook

make storybook-build

This produces storybook-static/ in the repo root.

2. Start a Static Server

The capture script expects Storybook at http://localhost:6006. Use a background bash task (not nohup or & in foreground) so the server survives:

# As a background bash task with ~10min lifetime
python3 -m http.server 6006 -d storybook-static

Verify the server is reachable:

bun -e "const r = await fetch('http://localhost:6006'); console.log(r.status)"
Important: curl may succeed when bun fetch fails (different DNS resolution). Always verify with bun -e "fetch(...)" since the capture script uses bun's fetch.

3. Run the Capture Script

bun run scripts/capture-readme-screenshots.ts --storybook-url http://localhost:6006

The script:

  • Iterates all 9 stories sequentially
  • Opens a fresh Playwright page per story
  • Waits for networkidle + 2s stabilization
  • Runs playInteraction if defined (with up to 3 retries for flaky interactions)
  • Captures full-page PNG, then converts to WebP via Sharp
  • Writes to docs/img/<outputFile>

4. Handle Failures

Stories with playInteraction (GitStatusPopover, AutoModeAgentSwitching, ContextManagementDialog) can be flaky under sequential load due to UI timing. The script retries each up to 3 times. If failures persist:

# Retry individual failed stories
bun run scripts/capture-readme-screenshots.ts --story GitStatusPopover
bun run scripts/capture-readme-screenshots.ts --story AutoModeAgentSwitching

5. Verify & Commit

# Check all 9 files are present and 3800px wide
for f in code-review agent-status git-status plan-mermaid auto-mode costs-tab context-management mobile-server-mode orchestrate-agents; do
  bun -e "const s = require('sharp'); const m = await s('docs/img/${f}.webp').metadata(); console.log('${f}:', m.width + 'x' + m.height)"
done

# Stage and commit
git add docs/img/*.webp
git commit -m "regenerate README screenshots at 3800px"

When to Run This

  1. Chromatic flags visual changes in any Docs/README Screenshots story
  2. Story data changes in App.readmeScreenshots.stories.tsx or mockFactory.ts
  3. UI component changes that affect the visual appearance of screenshot stories
  4. Explicit user request to refresh README images
  5. After rebasing on main when upstream changes affect shared UI components

Troubleshooting

"Storybook is not running"

The capture script verifies Storybook is reachable before starting. Ensure:

  • make storybook-build completed successfully
  • The static server is running on port 6006
  • Verify with bun -e "fetch('http://localhost:6006')" (not just curl)

Interactive stories fail with timeout

Radix popovers/tooltips portal to document.body and require precise hover timing. The retry logic handles most cases. If persistent:

  • Run the failing story individually (--story <Name>)
  • Check if the story's mock data or selectors drifted from the actual component

Images look wrong (clipped, misaligned)

  • Check viewport constants in capture-readme-screenshots.ts (1900×1188, DPR 2)
  • Screenshots use viewport-only capture (not fullPage) — if content overflows the viewport, the story layout needs adjustment, not the capture script
  • The StoryDef interface supports a postProcess hook for custom Sharp pipelines if a future story needs cropping/compositing, but no current stories use it

Why there is no ProductHero screenshot story

Intentional — README now uses mux-demo.gif as the hero media. The README screenshot pipeline covers only the 9 docs/img/*.webp assets that remain in README, starting with code-review.webp.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

33.98%
按下载量换算83

Claude

30.69%
按下载量换算75

Cursor

16.32%
按下载量换算40

Gemini CLI

9.55%
按下载量换算23

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

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

来源信息

继续浏览同类 Skills