html-to-image

html-to-image is a skill for Claude Code, Codex from inclusionAI/AWorld. It costs 46 tokens per session (631 once invoked), scanned A, original, MIT.

A tool that renders an HTML file or HTML text in a browser and saves the result as a PNG image. HTML is the markup used to structure web pages and visual layouts.

In plain words
What is it for?
Use it to screenshot HTML at a chosen width, capture a full page or fixed viewport, and create images for information graphics, social posts, or data visualizations.
Why use it?
It converts web-based designs such as cards or infographics into image files that can be shared or published.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./.claude/skills/xhs-publisher/publish_xhs.sh -t "标题" -c "正文" -i card.png.

Good fit Use it to screenshot HTML at a chosen width, capture a full page or fixed viewport, and create images for information graphics, social posts, or data visualizations.

Compare 6 skills from other repositories ↓
About the project

AWorld is an agent harness, meaning a framework that coordinates an AI agent’s tools, memory, context, and execution so expert knowledge can be turned into reusable skills and autonomous agents. It is for building domain-specific agent applications and workflows, with the catalogue entries representing skills, agents, and commands that operate within the AWorld ecosystem.

inclusionAI/AWorld · 1,246 stars · on GitHub · aworldagents.com

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/inclusionAI/AWorld
agentmods
npx agentmods add skills/inclusionai/aworld/html-to-image

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for html-to-image

README.md
[![agentmods](https://agentmods.dev/badge/skills/inclusionai/aworld/html-to-image/github.svg)](https://agentmods.dev/skills/inclusionai/aworld/html-to-image)
Your own site
<a href="https://agentmods.dev/skills/inclusionai/aworld/html-to-image"><img src="https://agentmods.dev/badge/skills/inclusionai/aworld/html-to-image/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for html-to-image

Your own site · 80×15
<a href="https://agentmods.dev/skills/inclusionai/aworld/html-to-image"><img src="https://agentmods.dev/badge/skills/inclusionai/aworld/html-to-image.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 631 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.00631
Opus 5.5 $0.00018 $0.00252
Sonnet 5.5 $0.00009 $0.00126
Haiku 4.5 $0.00005 $0.00063

Measured 1mo ago against content hash c70e9093b72c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

html-to-image scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (html_to_image.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

examples/skill_agent/skills/html-to-image/SKILL.md · 69 lines

What it actually says

HTML 转图片 (html-to-image)

概述

将 HTML 文件或内容通过 agent-browser 渲染为图片。典型用法:Claude 生成精美 HTML → 本 skill 截图 → 得到可直接发布的图片。

工具路径

  • 脚本:.claude/skills/html-to-image/html_to_image.sh
  • 依赖:agent-browser(CDP 已连接)、python3

用法

./html_to_image.sh -o <output> [-f <html_file> | -c <html_content>] [-w <width>] [-p <cdp_port>] [--full]

参数

参数 说明 必填 默认
-o 输出图片路径(.png) 是 -
-f HTML 文件路径(与 -c 二选一) 二选一 -
-c HTML 内容字符串(与 -f 二选一) 二选一 -
-w 视口宽度 否 1080
-e 视口高度(不指定则全页截图) 否 -
-p CDP 端口 否 9222
--full 全页截图(忽略视口高度限制) 否 默认开启

示例

# 从 HTML 文件截图
./html_to_image.sh \
  -f card.html -o card.png

# 直接传入 HTML 内容
./html_to_image.sh \
  -c '<html><body><h1>Hello</h1></body></html>' \
  -o hello.png

# 指定宽度(适配手机尺寸)
./html_to_image.sh \
  -f infographic.html -o output.png -w 750

# 固定视口截图(非全页)
./html_to_image.sh \
  -f page.html -o output.png -w 1080 -e 1920 --no-full

典型工作流

  1. Claude 根据内容生成精美 HTML(信息图、卡片等)
  2. 使用本 skill 截图为 PNG
  3. 将截图传给 xhs-publisher 发布到小红书
# 生成图片
./html_to_image.sh -f card.html -o card.png

# 发布到小红书
./.claude/skills/xhs-publisher/publish_xhs.sh -t "标题" -c "正文" -i card.png
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 69 lines · 46 tokens per session scan A c70e9093b72c

Subscribe to this mod's changes

html-to-image is a skill published in the GitHub repository inclusionAI/AWorld (1,246 stars, last pushed 2d ago), licensed MIT. It adds 46 tokens to every session and 631 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

hive.browser-automation

Required before any hive-browser CLI command. The browser is driven from the terminal by running hive-browser ... --json via terminalexec — not via MCP tools. Teaches the browser lifecycle rules (the bridge attaches to the USER'S running Chrome — never kill or launch browser processes; timeouts are transport issues…

aden-hive/hive · 142 tokens

hive.linkedin-automation

Read before automating LinkedIn with browser tools. LinkedIn combines shadow DOM (#interop-outlet), strict Trusted Types CSP that silently drops innerHTML, Lexical composer, native beforeunload dialogs that hang the bridge, and aggressive spam filters — each has bitten us at least once. Verified flows for profile…

aden-hive/hive · 99 tokens

hive.x-automation

Read before automating X / Twitter with browser tools. Verified flows for post, reply, delete, search-and-engage, plus the Draft.js compose quirks that silently disable the send button. Includes the daily-reply and job-market-reply playbooks. Requires hive.browser-automation for the underlying screenshot + coordinate…

aden-hive/hive · 81 tokens

hive.slack-notifications-setup

Set up a Slack notification channel (Sentinel) for a colony by driving the browser — reuse or create the "Hive Sentinel" Slack app from a JSON manifest, install it, capture the bot + app tokens, create/select the channel via the Slack API, and turn Sentinel on so the colony can ping the user on Slack and accept…

aden-hive/hive · 136 tokens

browser-edge-cases

SOP for debugging browser automation failures on complex websites. Use when browser tools fail on specific sites like LinkedIn, Twitter/X, SPAs, or sites with Shadow DOM.

aden-hive/hive · 40 tokens

peekaboo

Capture and automate macOS UI with the Peekaboo CLI.

spinabot/brigade · 17 tokens