html

GitHub

用于创建和修订包含语义化HTML、响应式布局及本地交互的完整离线HTML报告、落地页和信息图。流程涵盖受众分析、源码构建、多端视口自动化QA测试、视觉审查及最终发布,确保文件自包含且质量达标。

packages/builtin-skill-html/SKILL.md SourceWeft/SourceWeft

Trigger Scenarios

需要生成完整的HTML页面或报告 要求对现有HTML内容进行修订和重新发布 需要包含本地交互功能的可视化页面

Install

npx skills add SourceWeft/SourceWeft --skill html -g -y
More Options

Non-standard path

npx skills add https://github.com/SourceWeft/SourceWeft/tree/main/packages/builtin-skill-html -g -y

Use without installing

npx skills use SourceWeft/SourceWeft@html

指定 Agent (Claude Code)

npx skills add SourceWeft/SourceWeft --skill html -a claude-code -g -y

安装 repo 全部 skill

npx skills add SourceWeft/SourceWeft --all -g -y

预览 repo 内 skill

npx skills add SourceWeft/SourceWeft --list

SKILL.md

Frontmatter
{
    "name": "html",
    "description": "Create and revise polished self-contained HTML reports, landing pages, infographics and local interactive visualizations with responsive layout and final-file QA. Use the separate html-slides skill for paginated browser presentations."
}

HTML pages

Create a complete offline index.html with semantic HTML, intentional typography, responsive layout and browser-local interactions. Use the existing artifact workflow and skill selection; no new product entry or mode selector.

  1. Establish the audience, information hierarchy and expected interactions. Read references/page-design.md and references/quality.md.
  2. Author a full UTF-8 document with an early charset declaration and viewport meta. Use normal document flow. Keep source, images and local scripts together in a sandbox project directory. Do not add Reveal, slide IDs, fixed presentation canvases or presentation font-size rules.
  3. Confirm the provisioned SOURCEWEFT_HTML_RUNTIME and SOURCEWEFT_HTML_FONTS exist. Missing tooling, fonts or required model configuration must be reported; do not substitute runtime dependencies, system fonts or CDN assets.
  4. Bundle the final document with node /skills/html/scripts/build.cjs /workspace/draft.html /workspace/index.html. Assets and selected fonts become part of the file. Use embedded font families from the provisioned catalog, or explicitly provision authorized custom fonts with their hashes and license information. Keep Canvas/SVG typography consistent with embedded fonts.
  5. Run node /skills/html/scripts/qa.cjs /workspace/index.html /workspace/qa. Default viewports are 1440×900, 768×1024 and 390×844; inspect the whole page, including its tail. Interactive pages must supply a local interaction-checks.cjs module as the third argument. It exports an async function(page), asserts the requested behavior using the existing Playwright API, and returns true only after all checks pass. These are ordinary project tests, not a new platform protocol.
  6. Before publishing, run review_html_visuals with task-specific criteria against every image path listed in the QA qa.json images array (in batches of at most 24). QA slices each viewport's full page into parts no taller than 2,000 px, so a long page has several images per viewport; review all of them. Never pass a hand-made full-page screenshot: a result naming an image with unsupported dimensions means rerunning QA to obtain slices, not skipping the review. Major visual defects, missing content, failed interactions, unavailable models and incomplete QA block delivery. Rebuild and recheck after any change.
  7. Publish with artifactType=html, the actual final source file and the QA expectedContentDigest. An optional preview image can come from successful QA. Report only completed checks and the committed artifact/version.

Revisions

Load the artifact through prepare_sandbox_workspace, specifying its artifact ID and a sandbox destination. Retain the returned sourceArtifact.versionNo; pass an explicit artifactVersionId when the user selected a historical version. Modify the relevant sections or functionality, rebuild, rerun QA and publish with republishArtifactId plus the captured expectedVersionNo. Do not silently overwrite a concurrent revision.

Local execution

Use browser-local computation and state. The iframe has an opaque origin and cannot use the host's cookies, browser storage or the network. When the user wants the page to remember data or to link to websites, read references/storage.md: data is saved through the host's window.sourceweft.storage after declaring the storage capability, and plain http(s) links open after the viewer confirms. External services, login flows and multi-file website hosting need a separately agreed scope. The file must retain its content and interactions after this generating skill is disabled.

Version History

  • 66a6a34 Current 2026-11-07 08:57

Same Skill Collection

packages/builtin-skill-feynman/SKILL.md
packages/builtin-skill-html-slides/SKILL.md
packages/builtin-skill-image-generate/SKILL.md
packages/builtin-skill-meeting-summary/SKILL.md
packages/builtin-skill-ppt-deck/SKILL.md
packages/builtin-skill-report/SKILL.md
packages/builtin-skill-video-presentation/SKILL.md

Metadata

Files
0
Version
66a6a34
Hash
ed3d1c98
Indexed
2026-11-07 08:57

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-07 20:51
浙ICP备14020137号-1