From e07acc6d81b227f471e432798b3bcf7a3c46f682 Mon Sep 17 00:00:00 2001 From: Valentin Silyutin Date: Mon, 24 Aug 2026 00:31:57 +0400 Subject: [PATCH] format-html@1.0.0 --- format-html/SKILL.md | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 format-html/SKILL.md diff --git a/format-html/SKILL.md b/format-html/SKILL.md new file mode 100644 index 0000000..ca9becb --- /dev/null +++ b/format-html/SKILL.md @@ -0,0 +1,46 @@ +--- +name: format-html +description: Prettify raw HTML markup provided by the user. Use when the user sends HTML and asks to make it readable, format, indent, or pretty-print it. Output is properly indented (4 spaces), with elements placed on new lines according to nesting depth, and text inside tags kept on a single line. Fix missing or extra opening/closing tags as part of the cleanup. +license: MIT +metadata: + author: Valentin Silyutin + version: "1.0.0" +--- + +# HTML Formatting + +Your task is to format the HTML code provided by the user. Make it clean, valid, and readable, and output **only the resulting HTML code** without any markdown commentary or explanations. + +## Formatting Rules + +1. **Indentation:** Use **4 spaces** per nesting level. Do not use tabs. +2. **Line Breaks & Nesting:** + - Place each block-level element on a new line matching its indentation level. + - Void tags (e.g., ``, `
`, ``, ``, ``, `
`, ``) must be placed on their own line when nested inside block elements. + - **Inline Elements:** Keep inline elements (e.g., ``, ``, ``, ``, ``) inline with surrounding text to preserve natural whitespace and avoid unintended spacing bugs. +3. **Text Nodes:** Keep regular text inside block tags on a single line — do not wrap based on arbitrary line width. +4. **Preserved Content (`
`, `