跳到正文
Skillpedia
图片与图标7.4k · #13286

agent-first-screenshots

它能做什么

这个技能让智能体操作真实的应用,并为电子邮件简报、落地页、社交帖子或演示文稿截取截图。适合需要正确显示的产品图片、又不想手动修饰的人。

适用场景

  • ✓你想为电子邮件简报、落地页或社交帖子获取应用截图的时候。
  • ✓应用已经改变,你需要重新制作旧截图的时候。
  • ✓你想在使用截图之前检查是否有文字重叠或版式错乱的时候。

技能链接

https://github.com/Devin-AXIS/iPolloWork/blob/main/.opencode/skills/agent-first-screenshots/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/Devin-AXIS/iPolloWork/blob/main/.opencode/skills/agent-first-screenshots/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请为我们的落地页截取主要仪表盘界面的最新截图。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会打开正在运行的应用,像用户一样浏览,等待界面稳定后再截取图片。在接受每张截图之前,它都会检查是否存在视觉缺陷。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Agent-First Screenshots

An agent-first screenshot is produced by an agent driving the real app via CDP, gated by structural + pixel + vision verification before it ships. It turns screenshots from hand-crafted artifacts into a regenerable pipeline.

Use this for "take/redo screenshots / make marketing images" tasks. It is NOT e2e evidence — for pass/fail proof use the fraimz skill.

The Zero-Defect Bar

A shippable screenshot has ZERO obvious visual defects — the bar is not "the content is present", it is: would a human glancing at it immediately spot something broken? Overlapping or clipped text, misaligned/collapsed layout, garbled or mid-transition content, blank regions, stray modals/tooltips — any of these disqualifies the frame. Full stop.

The One Method

Operate the app like a power user preparing a demo, not like a developer hacking the DOM. The app already looks great: get it into a real, settled state through the UI and capture it cleanly. Never rebuild or fake it.

Golden Rules

  1. Only remove, never add. Hiding a leaf distraction (notification badge, "Sign in" footer link, status text) via display:none is safe. Never inject fake HTML, override flex/height/width on structural containers, add fixed-position overlays, or mutate the DOM tree — the layout engine will collapse (scroll areas shrink to 0, content disappears).
  2. If a feature isn't available, don't fake it. Enable it through the settings UI like a real user, or skip the shot and say so.
  3. Each shot starts from a clean reload. location.reload(), wait for full render, navigate through the UI, minimal leaf cleanup, verify, capture. Never carry CSS hacks across shots.
  4. Get state naturally. Click the real tabs/buttons/pickers; close panels via their close buttons (not CSS); run real multi-turn tasks so content is impressive — no toy data, no mid-stream captures.
  5. Match the target aspect ratio via CDP metrics override (e.g. 1440x900 at deviceScaleFactor: 2), then wait ~1s and re-verify — the override can trigger re-layout.

Verify with three channels, in a loop

innerText existing does not mean visible; a healthy DOM rect does not mean it rendered. Every frame must pass all three before it ships:

  1. DOM pre-check (cheap, before capture): scroll area height > 100px (not collapsed), hero text inside the viewport rect, no unexpected modal/overlay. If it fails: reload and redo — never fix with more CSS.

  2. Pixel post-check (truth, after capture): decode the PNG and sample the DOM-derived hero rects. Calibration: for text-on-white UI, background ratio is a bad signal (85–92% background is normal). Variance is the reliable signal: content-filled region variance > ~200 (often 1000+); blank/flat region < 50. Whole-image bgRatio > 0.97 → blank frame.

  3. Vision check (mandatory gate): deterministic stats CANNOT catch the defects that matter most — overlap, clipping, misalignment, double-rendering. Hand the PNG to a vision-capable model with a zero-defect rubric returning JSON:

    { any_obvious_defect: bool,   // the gate — if true, REJECT
      overlapping_text_or_elements: bool, clipped_or_cutoff: bool,
      misaligned_or_broken_layout: bool, blank_or_empty_regions: bool,
      stray_modal_tooltip_or_panel: bool, legible: bool,
      polish_score: 1-5, defects: ["..."] }
    

    If any_obvious_defect is true the frame is rejected regardless of layers 1–2. Diagnose, fix the root cause (settle the state, close the picker, reload), recapture.

Reusable scripts in this skill's directory: screenshot-verify.mjs (verify an existing PNG) and capture-verify.mjs (capture at 2x + verify regions + save only on pass); both use sharp.

Common failure modes

Symptom Fix
Overlapping/clipped text (layers 1–2 pass) Unsettled/edit-mode/wrong-width state — settle, use preview mode, gate on vision
Blank screenshot / 32px scroll area Structural element was CSS-hidden — reload, close panels via UI
Overlay (picker/modal) on every shot It was opened and never closed — Escape before capturing
In DOM but not in pixels Clipped/blank render — trust variance + vision, not innerText

Anti-patterns

Injecting fake components; overriding flex properties; fixed-position overlays; carrying state across shots; verifying via innerText only; proof-frame mindset (the goal is "

常见问题

它会伪造或重建应用的界面吗?

不会。技能要求截取真实的应用,绝不添加虚假内容或改变页面结构。

这些截图能证明某个功能可以正常工作吗?

不能。技能说明它们不是测试证据,通过或失败的证明需要另一种方法。

什么样的截图才算合格?

不能有明显的视觉缺陷,例如文字被截断、元素重叠或意外弹窗。

详情

作者的原始描述

Agent-first screenshots — an agent drives the real app via CDP and produces clean, defect-free product screenshots (newsletters, landing pages, social, decks, PR). Dual-channel verification (DOM + pixels + vision) in a capture loop. Use for any "take/redo screenshots of the app" task.

repo: Devin-AXIS/iPolloWork

热度

GitHub 星标
7.4k
排名
#13286
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能