AgentSkillsCN

html-semantic

编写语义清晰、易于访问的HTML5代码,用于页面结构的构建。

SKILL.md
--- frontmatter
name: html-semantic
description: Написання семантичного та доступного HTML5 коду. Використовуй для структури сторінок.
version: 1.0.0

Rules

  1. Semantic Tags: Use <main>, <nav>, <header>, <footer>, <section>, <article>. Avoid <div> for structural elements.

  2. Headings: Ensure a logical heading hierarchy (H1 -> H2 -> H3).

  3. Alt Text: All images must have descriptive alt attributes or empty alt for decorative images.

  4. Smart Links: Detect and wrap actionable text patterns in appropriate links:

    • Phone numbers -> <a href="tel:+1234567890">...</a>
    • Emails -> <a href="mailto:example@com">...</a>
    • Physical addresses -> <a href="https://maps.google.com/?q=...">...</a> (optional, based on context)
  5. Modern Link Security:

    • Reverse Tabnabbing: For target="_blank", ALWAYS use rel="noopener".
    • XSS Prevention: Never use javascript: pseudo-protocol in href.
    • Referrer Leakage: Use referrerpolicy attribute (e.g., no-referrer or strict-origin-when-cross-origin) instead of relying solely on rel="noreferrer".