file-naming-convention
File Naming Convention
Overview
Use this skill to standardize repository file names with kebab-case and explicit role suffixes, then execute safe rename/refactor steps with minimal churn.
When To Use
Trigger this skill when requests include any of these intents:
- Define or refine file naming standards.
- Rename files to
kebab-case. - Introduce role-based suffixes such as
.controller.ts,.manager.ts,.store.ts. - Refactor large modules and align new files with consistent naming.
- Audit naming anti-patterns and produce a migration checklist.
Workflow
- Confirm scope: whole repo, one package, or one module.
- Classify each target file by single primary role (controller, manager, service, etc.).
- Generate target names with this shape:
<domain>.<role>.tsor<domain>-<subdomain>.<role>.ts. - Apply renames safely (prefer
git mv) and update imports/exports/barrels. - Run minimal validation for affected modules (type check, tests, or lint as applicable).
- Report changes with a compact mapping: old name -> new name.
Decision Rules
- Always use lowercase kebab-case for domain/subdomain segments.
- Keep one file, one primary role.
- Use whitelist-only suffixes for this repository:
.service.ts,.utils.ts,.types.ts,.test.ts.manager.ts,.store.ts,.repository.ts,.config.ts.controller.ts,.provider.ts
- React hook 模块例外:凡文件主职责是导出可复用 React hook,必须放在
hooks/目录下,并命名为use-<domain>.ts或use-<domain>.tsx;此类文件不使用.service.ts等角色后缀。 - Do not use vague names like
controller.ts,common.ts,helpers.tsat broad scope. - Do not mix multi-role suffixes in one file name (for example
chat.service.manager.ts). index.tsis only for export aggregation; no business logic.
Reference
For the full suffix catalog, testing filename rules, anti-patterns, and migration policy, read:
More from peiiii/nextclaw
ui-ux-pro-max
Use when the user wants professional UI/UX design guidance, design-system generation, UX review, or stack-specific frontend guidance through a bundled local UI/UX Pro Max dataset and Python search runtime.
2impeccable
Use when the user wants distinctive, production-grade frontend design, anti-generic AI aesthetics, UX critique, technical UI audits, or final polish through bundled Impeccable references and an optional upstream detector CLI.
2lark-cli
Use when the user wants to operate Lark or Feishu via the local lark-cli (@larksuite/cli), including install, app credentials, OAuth, readiness checks, and safe read/write boundaries.
1opencli
Use when the user wants to use websites, browser login sessions, Electron apps, or external CLIs through a local OpenCLI setup, especially when setup guidance, readiness checks, and safe task execution are needed.
1find-skills
Use when the user wants to discover, evaluate, and install external agent skills from the open skills ecosystem, especially through the Vercel Skills CLI.
1superpowers
Use when the user wants a disciplined software development workflow with design-first planning, implementation plans, TDD, systematic debugging, code review, or verification-before-completion, adapted from obra/superpowers.
1