Dotnet-skills dotnet-htmlhint
Use HTMLHint in .NET repositories that ship static HTML output or standalone frontend templates. Use when a repo needs a focused CLI lint gate for DOM structure, invalid attributes, and basic HTML correctness checks on static pages.
install
source · Clone the upstream repo
git clone https://github.com/managedcode/dotnet-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/managedcode/dotnet-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/catalog/Tools/HTMLHint/skills/dotnet-htmlhint" ~/.claude/skills/managedcode-dotnet-skills-dotnet-htmlhint && rm -rf "$T"
manifest:
catalog/Tools/HTMLHint/skills/dotnet-htmlhint/SKILL.mdsource content
HTMLHint for Static HTML in .NET Repositories
Trigger On
- the repo has static HTML files, generated frontend output, or standalone templates under
,wwwroot/
, or other web foldersdist/ - 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
or.cshtml
source with server-side directives; lint the rendered or published output instead.razor - JavaScript or TypeScript linting; route that to
dotnet-eslint - runtime performance, accessibility, SEO, or headers; route that to
dotnet-webhint
Inputs
- the nearest
AGENTS.md package.json
or equivalent config if present.htmlhintrc- the real static HTML target: source templates, built output, or deployed URL
Workflow
- Choose the right target first:
- static HTML source files
- generated build output such as
dist/ - a reachable URL when the page is already served
- Prefer repo-local installation and checked-in config for repeatable runs.
- Keep HTMLHint focused on static HTML correctness and lightweight policy.
- Add narrow scripts to
, for example:package.jsonhtmlhint "dist/**/*.html"htmlhint "wwwroot/**/*.html"
- If the repo has templating syntax that confuses the parser, lint the rendered output instead of forcing source templates through the tool.
- Use rule overrides deliberately for real project conventions; do not disable broad classes of checks just to make a noisy first pass green.
- Rerun the publish or frontend build flow if fixes touched generated or packaged HTML sources.
Bootstrap When Missing
- Detect current state:
rg --files -g 'package.json' -g '.htmlhintrc*' -g '*.html'rg -n '"htmlhint"' --glob 'package.json' .
- Prefer a repo-local install:
npm install --save-dev htmlhint
- Add or refine
only after confirming the actual target files..htmlhintrc - Add repeatable commands to
andAGENTS.md
, then verify with:package.jsonnpx htmlhint "dist/**/*.html"npx htmlhint https://example.com
- Return
if HTMLHint now owns a clear static-HTML gate, orstatus: configured
if the existing setup was tightened.status: improved - Return
when the repo's HTML is primarily server-rendered templates that should be validated after rendering instead.status: not_applicable
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
- Plan: analyze current state, target outcome, constraints, and risks.
- Execute one step and produce a concrete delta.
- Review the result and capture findings.
- Apply fixes in small batches and rerun checks.
- Update the plan after each iteration.
- Repeat until outcomes are acceptable.
- If a dependency is missing, bootstrap it or return
with a reason.status: not_applicable
Required Result Format
:status
|complete
|clean
|improved
|configured
|not_applicableblocked
: concise plan and current stepplan
: concrete changes madeactions_taken
: commands, checks, or review evidenceverification
: unresolved items orremainingnone
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?"