跳到正文
Skillpedia
网站与界面(前端)7.1k · #13589

html-coder

它能做什么

这项技能指导编写结构正确、支持无障碍访问并使用现代功能的 HTML 页面。它适合需要正确构建可用网页的开发者和非专业人士。

适用场景

  • ✓当你需要一个简单的网页或结构正确的表单时。
  • ✓当你希望检查 HTML 的无障碍性和有效性的时候。
  • ✓当你希望在 OpenSquilla 工作区中预览页面的时候。

技能链接

https://github.com/TokenRhythm/opensquilla/blob/main/src/opensquilla/skills/bundled/html-coder/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请帮我做一个简单的无障碍联系页面,包含表单和清晰布局,并且可以预览。”

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

工作原理

智能体会创建一个专门的项目文件夹,存放 HTML、CSS 和 JavaScript 文件,检查标记的有效性和无障碍性,然后在工作区预览中打开。全程使用相对于浏览器的文件引用。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

HTML Coder Skill

Expert skill for professional HTML development with focus on semantic markup, accessibility, HTML5 features, and standards-compliant web content.

When to Use This Skill

  • Creating HTML documents with semantic structure
  • Building accessible forms with HTML5 validation
  • Implementing responsive markup and multimedia
  • Using HTML5 APIs (Canvas, SVG, Storage, Geolocation)
  • Troubleshooting validation or accessibility issues

OpenSquilla Webpage Delivery

For a new runnable webpage when workspace file-authoring tools are available:

  1. Create a filesystem-safe, dedicated project subdirectory such as webpage-<topic-slug>/; never place a generated site directly in the workspace root.
  2. Keep index.html, local CSS/JavaScript, and every local asset inside that project root, using browser-relative references.
  3. Validate the finished project, then call open_workspace_preview with the entry file and the complete dedicated root:
{
  "path": "webpage-<topic-slug>/index.html",
  "bundle": "directory",
  "bundle_root": "webpage-<topic-slug>"
}

Do not bundle the entire workspace. When a caller explicitly requests source-only output, forbids tool calls, or supplies its own deterministic writer, follow that narrower caller contract instead. When file authoring or open_workspace_preview is unavailable, return only the requested guidance or source and do not claim that a runnable project was opened.

Core Capabilities

  • Semantic HTML: Document structure, content sections, accessibility-first markup
  • Forms: All input types, validation attributes, fieldsets, labels
  • Media: Responsive images, audio/video, Canvas, SVG
  • HTML5 APIs: Web Storage, Geolocation, Drag & Drop, Web Workers
  • Accessibility: ARIA, screen reader support, WCAG compliance

Essential References

Core documentation for HTML experts:

Best Practices

Semantic HTML - Use elements that convey meaning: <article>, <nav>, <header>, <section>, <footer>, not div soup.

Accessibility First - Proper heading hierarchy, alt text, labels with inputs, keyboard navigation, ARIA when needed.

HTML5 Validation - Leverage built-in validation (required, pattern, type="email") before JavaScript.

Responsive Images - Use <picture>, srcset, and loading="lazy" for performance.

Performance - Minimize DOM depth, optimize images, defer non-critical scripts, use semantic elements.

Quick Patterns

Semantic Page Structure

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Page Title</title>
</head>
<body>
  <header><nav><!-- Navigation --></nav></header>
  <main><article><!-- Content --></article></main>
  <aside><!-- Sidebar --></aside>
  <footer><!-- Footer --></footer>
</body>
</html>

Accessible Form

<form method="post" action="/submit">
  <fieldset>
    <legend>Contact</legend>
    <label for="email">Email:</label>
    <input type="email" id="email" name="email" required
           pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$">
    <button type="submit">Send</button>
  </fieldset>
</form>

Responsive Image

<picture>
  <source media="(min-width: 1200px)" srcset="large.webp">
  <source media="(min-width: 768px)" srcset="medium.webp">
  <img src="small.jpg" alt="Description" loading="lazy">
</picture>

Troubleshooting

  • Validation: W3C Validator (validator.w3.org), check unclosed tags, verify nesting
  • Accessibility: Lighthouse audit, screen reader testing, keyboard nav, color contrast
  • Compatibility: Can I Use (caniuse.com), feature detection, pr
常见问题

页面保存在哪里?

保存在专门的项目子文件夹中,而不是工作区根目录,以便保持整洁。

它会检查无障碍性吗?

会。该技能包含无障碍指南,并对表单进行验证。

如果预览工具不可用怎么办?

该技能说明,只返回所需的指导,不尝试打开预览。

详情

作者的原始描述

Expert HTML development skill for building web pages, forms, and interactive content. Use when creating HTML documents, structuring web content, implementing semantic markup, adding forms and media, working with HTML5 APIs, or needing HTML templates, best practices, and accessibility guidance. Supports modern HTML5 standards and responsive design patterns.

repo: TokenRhythm/opensquilla

热度

GitHub 星标
7.1k
排名
#13589
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能