web-naming

Enforces naming conventions for Web and React identifiers, files, components, hooks, and types.

1|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/rockcookies/skills --skill web-naming-rockcookies
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: web-naming
Source: https://github.com/rockcookies/skills/tree/main/skills/custom/web-naming
Command: npx skills add https://github.com/rockcookies/skills --skill web-naming-rockcookies

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Inconsistent naming across a frontend codebase—HTTPClient vs HttpClient, userID vs userId, numeric enums, IFoo interfaces, utils.ts dumping grounds—makes code harder to read, review, and refactor. This Skill provides a single, opinionated naming standard for Web/React UI code so teams stop debating names in PRs. ## Core Features & Use Cases - Identifier conventions: camelCase/PascalCase/SCREAMING_SNAKE_CASE rules, acronyms treated as words (HttpClient, userId), boolean prefixes (is/has/can/should), and no I-prefix interfaces. - Dual-track file naming: React components use PascalCase.tsx, hooks use useAuth.ts, and all other frontend modules use kebab-case, with repo-level overrides respected. - Type and constant naming: string unions preferred over numeric enums, discriminated union field naming (kind), branded type conventions (UserId, toUserId), and role-based constant names. - Three working modes: Coding mode for naming new code, Review mode for PR diffs, and Audit mode for repo-wide naming scans with parallel subagents. - Use Case: While reviewing a PR, you spot HTTPClient, userID, a numeric enum Status, and a utils.ts file—this Skill gives you the exact replacement for each and the rationale to justify the change. ## Quick Start Ask the AI to review the naming in your React component files and suggest corrections following the web-naming conventions.

Frequently Asked Questions about web-naming

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How should I name React component files and hooks?▼

React component files use PascalCase matching the component identifier, like UserProfile.tsx exporting UserProfile. Hook files start with use plus camelCase, like useAuth.ts. If the repo already standardizes on kebab-case component files, keep that repo convention instead.

Should I write HTTPClient or HttpClient, userID or userId?▼

Treat acronyms as ordinary words: HttpClient, parseUrl, and userId. Only capitalize the first letter in PascalCase and never uppercase the whole acronym, except for platform-mandated names like XMLHttpRequest.

String union vs numeric enum in TypeScript—which should I use?▼

Prefer string unions or as const objects for discrete states, like type Status = 'pending' | 'paid'. Numeric enums are discouraged because an uninitialized value silently becomes 0, which looks like a real state. If an enum is required, use explicit string members.

Why are utils.ts and helpers.ts files discouraged?▼

Names like utils, helpers, common, and misc do not communicate responsibility and grow into unmaintainable grab-bags over time. Split them by responsibility into focused modules such as date.ts, url.ts, or crypto.ts, one concept per file.

Does this naming guide apply to Vue or backend Node code?▼

No, it covers browser-side UI code only: React components, hooks, props, frontend modules, and their test files. Vue-specific SFC conventions belong to the vue-* skills, and pure backend Node or Hono libraries are out of scope.

When should repo conventions override these naming rules?▼

Repo-level conventions always win. If the repository's AGENTS.md or ESLint config mandates a different style, such as kebab-case component files or all-caps acronyms, follow the repo rather than this guide, and never mass-correct files during review.