best-practices

best-practices is a skill for Claude Code from shennawardana23/skillme. It costs 49 tokens per session (1,644 once invoked), scanned A, original, Apache-2.0.

A checklist and guide for improving web code’s security, browser compatibility, and code quality, based on Lighthouse-style audits.

In plain words
What is it for?
Use it for security audits, vulnerability checks, code-quality reviews, and modernizing web applications.
Why use it?
It helps find common security risks and compatibility problems before they affect users. It also points out unsafe patterns such as putting untrusted input directly into a page.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the skillme plugin — 137 skills, 2 commands shipped together

Good fit Use it for security audits, vulnerability checks, code-quality reviews, and modernizing web applications.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shennawardana23/skillme/best-practices
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add shennawardana23/skillme --skill best-practices
Clone the repo
git clone --depth 1 https://github.com/shennawardana23/skillme

Made for: Claude Code.

Or install skillme, the plugin that ships this one along with the rest of its 137 skills, 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/shennawardana23/skillme/best-practices/github.svg)](https://agentmods.dev/skills/shennawardana23/skillme/best-practices)
Your own site
<a href="https://agentmods.dev/skills/shennawardana23/skillme/best-practices"><img src="https://agentmods.dev/badge/skills/shennawardana23/skillme/best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/shennawardana23/skillme/best-practices"><img src="https://agentmods.dev/badge/skills/shennawardana23/skillme/best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,644 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00049 $0.01644
Opus 5 $0.00024 $0.00822
Sonnet 5 $0.00010 $0.00329
Haiku 4.5 $0.00005 $0.00164

Measured 11d ago against content hash 0e2a551e9f0b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/best-practices/SKILL.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Best practices

Modern web development standards based on Lighthouse best practices audits. Covers security, browser compatibility, and code quality patterns.

Security

HTTPS everywhere:

<!-- ❌ Mixed content -->
<img src="http://example.com/image.jpg">

<!-- ✅ HTTPS only -->
<img src="https://example.com/image.jpg">

Avoid protocol-relative URLs (//example.com/...) — they hide the actual scheme from reviewers. Send Strict-Transport-Security: max-age=31536000; includeSubDomains; preload.

Input sanitization:

// ❌ XSS vulnerable
element.innerHTML = userInput;
document.write(userInput);

// ✅ Safe text content
element.textContent = userInput;

// ✅ If HTML needed, sanitize
import DOMPurify from 'dompurify';
element.innerHTML = DOMPurify.sanitize(userInput);

Secure cookies (server-side):

Set-Cookie: session=abc123; Secure; HttpOnly; SameSite=Strict; Path=/

Beyond these, a real security posture needs: a CSP with nonces (script-src, frame-ancestors, base-uri, form-action); Trusted Types (require-trusted-types-for 'script') to stop raw strings reaching innerHTML/eval even under a strict CSP; Subresource Integrity hashes on every third-party <script>/<link> you don't control; the standard security-header set (HSTS, X-Content-Type-Options, Referrer-Policy, Permissions-Policynever X-XSS-Protection, it's deprecated and was itself a vulnerability); and npm audit run regularly, watching specifically for prototype-pollution via recursive merges of untrusted input (_.merge, $.extend). Full syntax and code for all of these is in references/security-hardening.md — load it when implementing or auditing any of them.

Browser compatibility

Ship an HTML5 doctype, <meta charset="UTF-8"> as the first element in <head>, and a responsive viewport meta tag. Detect features ('IntersectionObserver' in window, CSS @supports), never sniff the user agent — UA strings are brittle and spoofable. Prefer bundling polyfills at build time (Babel/SWC + core-js) over runtime checks, and never load a polyfill from a third-party CDN you don't control — the 2024 polyfill.io supply-chain attack served malware to ~100k sites via exactly that pattern. Full markup and polyfill-loading code: references/compatibility-and-legacy-apis.md.

Read the full file on GitHub · 120 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 120 lines · 49 tokens per session scan A 0e2a551e9f0b

Subscribe to this mod's changes

best-practices is a skill published in the GitHub repository shennawardana23/skillme (2 stars, last pushed 13d ago), licensed Apache-2.0. It adds 49 tokens to every session and 1,644 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

receiving-code-review

Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation.

obra/superpowers · 38 tokens

requesting-code-review

Use when completing tasks, implementing major features, or before merging to verify work meets requirements.

obra/superpowers · 22 tokens

ego-lite-simplify

Find and implement evidence-backed simplifications in the ego-lite repository. Use when reviewing the codebase for dead code, duplicated state or APIs, speculative abstractions, unnecessary compatibility layers, hand-written infrastructure, excessive tests or documentation, or when the user asks to reduce code size or…

citrolabs/ego-lite · 68 tokens

review-loop

Bounded review-apply-resolve convergence loop for a GitHub PR (draft PRs are fine). Runs up to N=5 iterations of pr-reviewer → implement-suggestion (--resolve-all) → polish simplify, converging until every review thread is resolved — through a fix OR a reply (answered question, recorded rationale) — so the PR is left…

mthines/agent-skills · 446 tokens

create-pr

Generates a short, narrative GitHub pull request description (≤ 25 lines, hard ceiling 40), pushes the branch, opens the PR as a draft, then runs review-loop (pr-reviewer → implement-suggestion → polish simplify, up to 5 iterations) until every review thread is resolved via fix or reply. Scale down with --no-review…

mthines/agent-skills · 188 tokens

implement-suggestion

Implements review-comment suggestions across one or more PRs. Multi-PR mode (default when $ARGUMENTS contains PR URLs; empty $ARGUMENTS auto-detects the active PR) per PR: resolves a worktree, fetches every actionable comment from both human teammates AND AI code-review bots (claude[bot], coderabbitai[bot], …)…

mthines/agent-skills · 314 tokens