htmlhint

GitHub

在.NET仓库中为静态HTML、生成前端输出或独立模板提供结构检查与无效属性检测。专注于静态HTML质量,避免用于服务端模板或JS/TS代码。

catalog/Tools/HTMLHint/skills/htmlhint/SKILL.md managedcode/dotnet-skills

Trigger Scenarios

仓库包含静态HTML文件或生成的前端输出 用户请求HTML结构检查或DOM质量linting

Install

npx skills add managedcode/dotnet-skills --skill htmlhint -g -y
More Options

Non-standard path

npx skills add https://github.com/managedcode/dotnet-skills/tree/main/catalog/Tools/HTMLHint/skills/htmlhint -g -y

Use without installing

npx skills use managedcode/dotnet-skills@htmlhint

指定 Agent (Claude Code)

npx skills add managedcode/dotnet-skills --skill htmlhint -a claude-code -g -y

安装 repo 全部 skill

npx skills add managedcode/dotnet-skills --all -g -y

预览 repo 内 skill

npx skills add managedcode/dotnet-skills --list

SKILL.md

Frontmatter
{
    "name": "htmlhint",
    "description": "Use HTMLHint in .NET repositories that ship static HTML output or standalone frontend templates. USE FOR: static HTML files; generated frontend output; standalone templates under wwwroot, dist, or other web folders; HTML structure checks. DO NOT USE FOR: raw .cshtml or .razor source with server-side directives; JavaScript or TypeScript linting. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.",
    "compatibility": "Requires a .NET repository with static HTML assets or generated frontend output; use on rendered output rather than raw Razor or Blazor source files."
}

HTMLHint for Static HTML in .NET Repositories

Trigger On

  • the repo has static HTML files, generated frontend output, or standalone templates under wwwroot/, dist/, or other web folders
  • the user asks for HTML structure checks, invalid attribute detection, or basic DOM-quality linting
  • the repo wants a narrow HTML gate separate from JS, CSS, and full-site runtime audits

Do Not Use For

  • raw .cshtml or .razor source with server-side directives; lint the rendered or published output instead
  • JavaScript or TypeScript linting; route that to eslint
  • runtime performance, accessibility, SEO, or headers; route that to webhint

Inputs

  • the nearest AGENTS.md
  • package.json
  • .htmlhintrc or equivalent config if present
  • the real static HTML target: source templates, built output, or deployed URL

Workflow

  1. Choose the right target first:
    • static HTML source files
    • generated build output such as dist/
    • a reachable URL when the page is already served
  2. Prefer repo-local installation and checked-in config for repeatable runs.
  3. Keep HTMLHint focused on static HTML correctness and lightweight policy.
  4. Add narrow scripts to package.json, for example:
    • htmlhint "dist/**/*.html"
    • htmlhint "wwwroot/**/*.html"
  5. If the repo has templating syntax that confuses the parser, lint the rendered output instead of forcing source templates through the tool.
  6. Use rule overrides deliberately for real project conventions; do not disable broad classes of checks just to make a noisy first pass green.
  7. Rerun the publish or frontend build flow if fixes touched generated or packaged HTML sources.

Bootstrap When Missing

  1. Detect current state:
    • rg --files -g 'package.json' -g '.htmlhintrc*' -g '*.html'
    • rg -n '"htmlhint"' --glob 'package.json' .
  2. Prefer a repo-local install:
    • npm install --save-dev htmlhint
  3. Add or refine .htmlhintrc only after confirming the actual target files.
  4. Add repeatable commands to AGENTS.md and package.json, then verify with:
    • npx htmlhint "dist/**/*.html"
    • npx htmlhint https://example.com
  5. Return status: configured if HTMLHint now owns a clear static-HTML gate, or status: improved if the existing setup was tightened.
  6. Return status: not_applicable when the repo's HTML is primarily server-rendered templates that should be validated after rendering instead.

Handle Failures

  • Parser noise on Razor, Blazor, or other server-side template syntax is a target-selection problem; lint built output instead of source templates.
  • URL-based checks can fail on auth, SPA routing, or environment drift; verify the served target is reachable and stable before trusting the result.
  • Large volumes of trivial attribute warnings usually mean the config was copied from another stack and needs to be adapted to the repo's real HTML conventions.

Deliver

  • a repeatable static HTML lint gate
  • clear targeting rules for source HTML versus rendered output
  • checked-in config that matches the repo's actual page structure

Validate

  • the lint target contains real static HTML, not unsupported template syntax
  • commands are reproducible from repo-local dependencies
  • HTMLHint ownership is kept separate from broader site-audit tooling
  • fixes were verified on the built or served output that actually ships

Ralph Loop

  1. Plan: analyze current state, target outcome, constraints, and risks.
  2. Execute one step and produce a concrete delta.
  3. Review the result and capture findings.
  4. Apply fixes in small batches and rerun checks.
  5. Update the plan after each iteration.
  6. Repeat until outcomes are acceptable.
  7. If a dependency is missing, bootstrap it or return status: not_applicable with a reason.

Required Result Format

  • status: complete | clean | improved | configured | not_applicable | blocked
  • plan: concise plan and current step
  • actions_taken: concrete changes made
  • verification: commands, checks, or review evidence
  • remaining: unresolved items or none

Example Requests

  • "Add HTMLHint for the built static site in this repo."
  • "Lint the generated HTML before deployment."
  • "Why is HTMLHint failing on Razor pages?"

Version History

  • 7ab7f03 Current 2026-07-25 05:26

Same Skill Collection

catalog/Frameworks/gRPC/skills/grpc/SKILL.md
catalog/Frameworks/Official-Astro/skills/astro-developer/SKILL.md
catalog/Frameworks/Official-DotNet-ASPNetCore/skills/configuring-opentelemetry-dotnet/SKILL.md
catalog/Frameworks/Official-DotNet-ASPNetCore/skills/dotnet-webapi/SKILL.md
catalog/Frameworks/Official-DotNet-ASPNetCore/skills/minimal-api-file-upload/SKILL.md
catalog/Frameworks/Orleans/skills/orleans/SKILL.md
catalog/Frameworks/ThreeJS-WebGPU-TSL/skills/webgpu-threejs-tsl/SKILL.md
catalog/Libraries/Official-DotNet-Data/skills/optimizing-ef-core-queries/SKILL.md
catalog/Platform/Official-DotNet-Advanced/skills/csharp-scripts/SKILL.md
catalog/Platform/Official-DotNet-Advanced/skills/nuget-trusted-publishing/SKILL.md
catalog/Platform/Official-DotNet-Blazor/skills/create-blazor-project/SKILL.md
catalog/Platform/Official-DotNet-Blazor/skills/fetch-and-send-data/SKILL.md
catalog/Platform/Official-DotNet-Blazor/skills/support-prerendering/SKILL.md
catalog/Platform/Official-DotNet-Blazor/skills/use-js-interop/SKILL.md
catalog/Platform/Official-DotNet-Experimental/skills/exp-mock-usage-analysis/SKILL.md
catalog/Platform/Official-DotNet-Experimental/skills/exp-simd-vectorization/SKILL.md
catalog/Platform/Official-DotNet-Test-Migration/skills/migrate-xunit-to-mstest/SKILL.md
catalog/Platform/Official-DotNet-Test-Migration/skills/migrate-xunit-to-xunit-v3/SKILL.md
catalog/Platform/Official-DotNet-Upgrade/skills/dotnet-aot-compat/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/code-testing-extensions/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/filter-syntax/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/find-untested-sources/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/platform-detection/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/scaffold-dotnet-test-project/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/test-gap-analysis/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/testability-obstacle/SKILL.md
catalog/Testing/Playwright/skills/playwright-visual-testing/SKILL.md
catalog/Testing/xUnit/skills/xunit/SKILL.md
catalog/Tools/Code-Analysis/skills/code-analysis/SKILL.md
catalog/Tools/Official-DotNet-Diagnostics/skills/analyzing-dotnet-performance/SKILL.md
catalog/Tools/Official-DotNet-Diagnostics/skills/clr-activation-debugging/SKILL.md
catalog/Tools/Official-DotNet-Diagnostics/skills/dotnet-trace-collect/SKILL.md
catalog/Tools/Official-DotNet-Diagnostics/skills/dump-collect/SKILL.md
catalog/Tools/Official-DotNet-MSBuild/skills/binlog-failure-analysis/SKILL.md
catalog/Tools/Official-DotNet-MSBuild/skills/copy-to-output-directory/SKILL.md
catalog/Tools/Official-DotNet-MSBuild/skills/msbuild-server/SKILL.md
catalog/Tools/Official-DotNet-MSBuild/skills/resolve-project-references/SKILL.md
catalog/Tools/ReportGenerator/skills/reportgenerator/SKILL.md
catalog/Tools/ReSharper-CLT/skills/resharper-clt/SKILL.md
catalog/Tools/Roslynator/skills/roslynator/SKILL.md
catalog/Tools/Stylelint/skills/stylelint/SKILL.md
external-sources/upstreams/webgpu-claude-skill/skills/webgpu-threejs-tsl/SKILL.md
catalog/Frameworks/ASP.NET-Core/skills/aspnet-core/SKILL.md
catalog/Frameworks/Aspire/skills/aspire/SKILL.md
catalog/Frameworks/Azure-Functions/skills/azure-functions/SKILL.md
catalog/Frameworks/Blazor/skills/blazor/SKILL.md
catalog/Frameworks/Entity-Framework-6/skills/entity-framework6/SKILL.md
catalog/Frameworks/Entity-Framework-Core/skills/entity-framework-core/SKILL.md
catalog/Frameworks/MAUI/skills/maui/SKILL.md

Metadata

Files
0
Version
0559476
Hash
c0ba1469
Indexed
2026-07-25 05:26

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 05:24
浙ICP备14020137号-1 $mapa de visitantes$