1---
2name: dotnet-webhint
3version: "1.0.0"
4category: "Code Quality"
5description: "Use webhint in .NET repositories that ship browser-facing frontends. Use when a repo needs CLI audits for accessibility, performance, security headers, PWA signals, SEO, or runtime page quality against a served site or built frontend output."
6compatibility: "Requires a .NET repository with a browser-facing site or frontend build output; works best against a reachable local or deployed URL and a checked-in `.hintrc`."
7metadata:
8 source: https://skillmd.com/skills/aibot88/dotnet-webhint
9---
10
11# webhint for Browser-Facing Frontends in .NET Repositories
12
13## Trigger On
14
15- the repo ships a browser-facing site and the user asks about accessibility, performance, SEO, security headers, or page quality
16- the repo has `.hintrc`, `hint` scripts, or a served local frontend that should be audited
17- the team needs more than syntax linting and wants runtime-oriented site checks
18
19## Do Not Use For
20
21- JavaScript or TypeScript semantic linting; route that to `dotnet-eslint` or `dotnet-biome`
22- stylesheet-only linting; route that to `dotnet-stylelint`
23- static HTML structure checks alone; route that to `dotnet-htmlhint`
24
25## Inputs
26
27- the nearest `AGENTS.md`
28- `package.json`
29- `.hintrc` if present
30- the real audit target: local dev URL, preview URL, deployed URL, or built output
31
32## Workflow
33
341. Choose the audit surface deliberately:
35 - running local URL such as `https://localhost:3000`
36 - preview or deployed URL
37 - local connector against built output when no browser runtime is needed
382. Prefer repo-local installation and a checked-in `.hintrc`.
393. Start from a documented preset such as `web-recommended`, then customize only for real repo requirements.
404. Add repeatable scripts to `package.json`, for example:
41 - `hint https://localhost:3000`
42 - `hint https://example.test --config .hintrc`
435. Keep runtime prerequisites explicit:
44 - supported Node.js version
45 - browser availability when the connector needs Chromium-based automation
466. Treat findings as categorized work:
47 - headers and transport
48 - accessibility and HTML issues
49 - performance
50 - PWA and manifest signals
517. Re-run the audit after fixes on the same URL or build output so results are comparable.
52
53## Bootstrap When Missing
54
551. Detect current state:
56 - `rg --files -g 'package.json' -g '.hintrc*'`
57 - `rg -n '"hint"' --glob 'package.json' .`
582. Prefer a repo-local install:
59 - `npm install --save-dev hint`
603. Create or refine `.hintrc` with a known baseline such as `web-recommended`.
614. Add repeatable commands to `AGENTS.md` and `package.json`, then verify with:
62 - `npx hint https://localhost:3000`
63 - `npx hint -c ./.hintrc https://example.com`
645. Return `status: configured` if the repo now has a working site-audit gate, or `status: improved` if the baseline was tightened.
656. Return `status: not_applicable` when the repo does not expose a stable browser-facing surface that can be audited in the current task.
66
67## Handle Failures
68
69- Missing-browser errors usually mean the environment lacks Chrome, Chromium, or Edge for the selected connector.
70- WSL is a poor default for browser-backed runs; prefer a native environment or switch to a `jsdom`-style connector when appropriate.
71- `EACCES` or install-permission failures are usually fixed by installing `hint` as a repo devDependency instead of relying on a global tool.
72- If the audit target is unstable, authenticated, or still booting, fix the serving workflow first; otherwise the noise is not actionable.
73
74## Deliver
75
76- a repeatable webhint audit command and config
77- a stable target URL or build-output strategy
78- categorized runtime-quality findings the team can act on
79
80## Validate
81
82- the audited target matches the site that actually ships
83- browser or connector prerequisites are documented
84- webhint is not being used as a substitute for ESLint or Stylelint
85- reruns on the same target produce consistent comparisons
86
87## Ralph Loop
88
891. Plan: analyze current state, target outcome, constraints, and risks.
902. Execute one step and produce a concrete delta.
913. Review the result and capture findings.
924. Apply fixes in small batches and rerun checks.
935. Update the plan after each iteration.
946. Repeat until outcomes are acceptable.
957. If a dependency is missing, bootstrap it or return `status: not_applicable` with a reason.
96
97### Required Result Format
98
99- `status`: `complete` | `clean` | `improved` | `configured` | `not_applicable` | `blocked`
100- `plan`: concise plan and current step
101- `actions_taken`: concrete changes made
102- `verification`: commands, checks, or review evidence
103- `remaining`: unresolved items or `none`
104
105## Example Requests
106
107- "Run webhint against the local frontend before release."
108- "Add accessibility and security-header audits for this site."
109- "Why does webhint fail in CI but not locally?"