Skip to main content
skill

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.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --skill development/best-practices
Open on GitHub

What 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.write and 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-practices

2Skills CLI (Vercel)

npx skills add davila7/claude-code-templates --skill best-practices -a claude-code

3Manually: put the files in place

~/.claude/skills/best-practices/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/best-practices/

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.

From the same set804

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor