best-practices · davila7 — Claude Code skill: what it does, how to install
Checks web code against Lighthouse standards, patches dependency vulnerabilities, and sets up browser security headers.
npx claude-code-templates@latest --skill development/best-practicesWhat best-practices does
This skill brings Lighthouse-aligned web quality checks into Claude Code. It scans front-end files for insecure code, missing metadata, and retired browser features. That keeps code current.
The instructions cover Content Security Policy rules, cookie attributes, and running npm audit. In HTML markup, the skill checks doctype tags, viewport declarations, and UTF-8 encoding. It also flags document.write and replaces synchronous XHR with fetch.
HTML sanitization patterns rely on having dompurify installed in the project.
What it helps with
- configure strict CSP and HSTS HTTP headers
- replace deprecated
document.writeand sync XHR calls - audit project dependencies with
npm audit - enable passive event listeners for touch and wheel handlers
Example prompts for the agent
- Run a security audit and patch vulnerable dependencies
- Set up CSP and security headers for this web app
- Review my code for deprecated browser APIs and unhandled errors
How to install best-practices
1claude-code-templates
npx claude-code-templates@latest --skill development/best-practices2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill best-practices -a claude-code3Manually: put the files in place
~/.claude/skills/best-practices/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/best-practices/
Manually: put the files in place
.agents/skills/best-practices/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/best-practices/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates best-practices2Manually: put the files in place
.github/skills/best-practices/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/best-practicesManually: put the files in place
.devin/skills/best-practices/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about best-practices
How to install best-practices in Claude Code?
Run npx claude-code-templates@latest --skill development/best-practices in your terminal.
What does best-practices do?
It guides Claude Code to audit front-end files using Lighthouse standards, configure security headers, and update deprecated web APIs.
Does this skill require external libraries?
For safe HTML injection patterns, your project must have dompurify installed.
Similar skills
All skills for Frontend and UI →best-practices by other authors comes first.