Token导航 LogoToken导航TokenDH.com
效率操作浏览器clawhub未标认证来源可访问clear审计通过

snapdomsnapdom 图像

Agent Skill

snapdom 用于处理图像、截图、视觉识别或图片素材相关工作,适合在 OpenClaw 中需要让 Agent 分析图片、整理视觉素材或辅助图像流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

894

周安装

38

GitHub Stars

公开资料未说明

下载量

313
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install snapdom

简介

snapdom 用于将 DOM 子树导出为多种图像格式,保留样式和背景。

  • 适合在 OpenClaw 中需要让 Agent 分析图片或处理视觉素材时使用。
  • 支持 SVG、PNG、JPG 等格式输出,包含字体和内联样式渲染。
  • 安装前建议确认权限范围、维护状态及是否会触发页面渲染或截图操作。
  • 可结合来源仓库和 README 进一步核验具体用法和限制条件。

SKILL.md

name
snapdom
description
DOM capture engine that can export any DOM subtree as SVG, PNG, JPG, WebP, Canvas, or Blob, supporting inline styles, fonts, background images, pseudo-elements, and Shadow DOM.

snapdom — DOM Capture Engine

Use Cases

Use this skill when users request to take a screenshot of a web page element, DOM node, or HTML fragment, export it as an image, generate a web page snapshot, or convert any DOM element to an image/Canvas.

Installation

NPM:

npm i @zumer/snapdom

CDN (script tag):

<script src="https://unpkg.com/@zumer/snapdom/dist/snapdom.js"></script>

Quick Start

Shortcuts (One-off export)

import { snapdom } from '@zumer/snapdom';

// Export a DOM element as PNG
const png = await snapdom.toPng(document.querySelector('#card'));
document.body.appendChild(png);

// Other formats
const blob = await snapdom.toBlob(document.querySelector('#card'));
const svgImg = await snapdom.toSvg(document.querySelector('#card'));

Reusable Capture (Clone once, export multiple times)

const result = await snapdom(document.querySelector('#card'));
const png = await result.toPng();
const jpg = await result.toJpg({ quality: 0.92 });
await result.download({ format: 'jpg', filename: 'card.jpg' });

Common Options

OptionTypeDefaultDescription
scalenumber1Output scale multiplier
width / heightnumber-Force output dimensions
qualitynumber1JPG/WebP quality 0~1
backgroundColorstring"#fff"Background color for JPG/WebP
embedFontsbooleanfalseEmbed non-icon fonts
useProxystring''CORS proxy URL
excludestring[]-CSS selectors to exclude
filterfunction-Filter function (el) => boolean
debugbooleanfalseOutput silent errors to console.warn

Examples

// High-definition screenshot (2x)
await snapdom.toPng(el, { scale: 2 });

// CORS cross-origin images
await snapdom.toPng(el, { useProxy: 'https://proxy.corsfix.com/?' });

// Exclude elements
await snapdom.toPng(el, { exclude: ['.cookie-banner', '.tooltip'] });

// Filter out display:none elements
await snapdom.toPng(document.body, {
  filter: el => window.getComputedStyle(el).display !== 'none'
});

xbrowser Integration

When capturing in a xbrowser environment, SnapDOM must be run through the browser's execution context. Recommended pattern:

// After an xbrowser snapshot, execute in the page via evaluate
await browser.evaluate(async (selector) => {
  const { snapdom } = window._snapdom || await import('https://unpkg.com/@zumer/snapdom/dist/snapdom.mjs');
  const el = document.querySelector(selector);
  if (!el) throw new Error(`Element not found: ${selector}`);
  const result = await snapdom(el, { scale: 2, embedFonts: true });
  const dataUrl = await result.toPng();
  return dataUrl;
}, selector);

See references/api_reference.md for detailed API documentation and full options list.

Plugins

Install official plugins:

npm install @zumer/snapdom-plugins

Register and use:

import { snapdom } from '@zumer/snapdom';
import { filter, timestampOverlay } from '@zumer/snapdom-plugins';

snapdom.plugins(
  [filter, { preset: 'grayscale' }],
  [timestampOverlay, { position: 'bottom-right' }]
);

const out = await snapdom(element);
const png = await out.toPng();

Plugin lifecycle hooks: beforeSnapbeforeCloneafterClonebeforeRenderafterRenderbeforeExportafterExport.

Example Reference assets/demo.html

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

OpenClaw

76.17%
按下载量换算238

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

操作浏览器

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

安装前确认

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

来源信息

继续浏览同类 Skills