npx skills add https://github.com/cygnusfear/agent-skills --skill file-name-wizard对代码库中的所有文件名和命名规范进行系统性审计,以识别不一致性、反模式和违反命名标准的情况。
使用 Glob 识别代码库中的所有文件:
.ts、.tsx、.js、.jsx 等)创建待审计所有文件的完整待办事项列表。
读取仓库中的所有 AGENTS.md 文件:
AGENTS.md(如果存在)AGENTS.md 文件提取命名约定:
Perform systematic audit of all filenames and naming conventions in the codebase to identify inconsistencies, anti-patterns, and violations of naming standards.
Use Glob to identify all files in the codebase:
.ts, .tsx, .js, .jsx, etc.)Create comprehensive todo list of all files to audit.
Read all AGENTS.md files in the repository:
AGENTS.md if existsAGENTS.md files广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
即使没有明确的 AGENTS.md 规则,也要识别模式:
*.service.ts、*.controller.ts)components/、utils/、lib/)对于待办事项列表中的每个文件:
与以下内容进行比较:
命名约定违规:
userAuth.service.ts 混合了 camelCase 和点号表示法)清晰度问题:
utils.ts、helpers.ts、stuff.ts)反模式:
temp.ts、test.ts、new-*.ts、*-v2.ts)index2.ts、common.ts)old-*.ts、legacy-*.ts)*-new.ts、*-enhanced.ts)组织问题:
*.service.ts)读取文件以验证:
存储在内存中:
File: path/to/filename.ts
Convention Used: camelCase
Should Be: kebab-case
Pattern: Violates directory convention
Issues:
- [具体问题]
Suggested Name: [better-name.ts]
Severity: [HIGH|MEDIUM|LOW]
在待办事项列表中标记文件为已审计。
审计完所有文件后:
创建一个带有 audit 标签的 tk 工单,并将报告作为其正文。使用 todos_oneshot(title: "Audit: Naming conventions", description: "<report content>", tags: "audit", type: "task")。
# Filename & Naming Convention Audit
**Date**: [时间戳]
**Files Audited**: X
**Issues Found**: Y
---
## Executive Summary
- **Critical Issues**: X (阻碍一致性)
- **High Priority**: Y (主要违规)
- **Medium Priority**: Z (次要不一致)
- **Low Priority**: W (建议)
**Most Problematic Directory**: [路径] (X 个问题)
---
## Issues by Severity
### CRITICAL: Convention Violations
#### Temporary/Migration Filenames
- `src/services/auth-v2.ts` - 迁移文件仍在使用中
- **Violates**: No version suffixes rule
- **Suggested**: `src/services/auth.ts` (替换旧文件)
- `src/utils/new-logger.ts` - 临时命名
- **Violates**: No "new-" prefix rule
- **Suggested**: `src/utils/logger.ts`
#### Wrong Case Convention
- `src/components/UserProfile.tsx` - PascalCase
- **Directory Standard**: kebab-case
- **Suggested**: `src/components/user-profile.tsx`
### HIGH: Consistency Violations
#### Inconsistent with Directory Pattern
- `src/services/database.ts` - Missing `.service.ts` suffix
- **Pattern**: All files in directory use `*.service.ts`
- **Suggested**: `src/services/database.service.ts`
#### Vague/Generic Names
- `src/utils/helpers.ts` - Too generic
- **Contains**: String manipulation functions
- **Suggested**: `src/utils/string-helpers.ts`
### MEDIUM: Clarity Issues
#### Misleading Names
- `src/lib/validator.ts` - Named as single purpose
- **Contains**: Multiple validators and formatters
- **Suggested**: Split or rename to `validators.ts`
### LOW: Suggestions
#### Verbose Names
- `src/components/user-authentication-form-component.tsx`
- **Redundant**: "component" suffix in components dir
- **Suggested**: `src/components/user-auth-form.tsx`
---
## Issues by Directory
### src/services/ (12 issues)
- **Pattern**: Should use `*.service.ts` suffix
- **Violations**:
- `database.ts` (missing suffix)
- `auth-helper.ts` (wrong suffix)
- `userService.ts` (wrong case)
### src/components/ (8 issues)
- **Pattern**: kebab-case without suffix
- **Violations**:
- `UserProfile.tsx` (PascalCase)
- `button-component.tsx` (redundant suffix)
[Continue for all directories]
---
## Pattern Analysis
### Most Common Violations
1. **Mixed case conventions** - 15 files
2. **Missing pattern suffixes** - 12 files
3. **Generic names** - 8 files
4. **Temporary names** - 5 files
### Directories Lacking Standards
- `src/lib/` - No clear convention (mix of all patterns)
- `src/shared/` - Inconsistent organization
- `tools/` - No established pattern
### Emerging Anti-Patterns
- Version suffixes appearing (`*-v2`, `*-new`)
- Component files with "component" in name
- Service files without `.service.ts` suffix
---
## AGENTS.md Coverage
### Documented Standards
- ✅ `src/components/` - Documented in `src/AGENTS.md`
- ✅ `src/services/` - Documented in `src/AGENTS.md`
- ❌ `src/lib/` - No documentation
- ❌ `src/utils/` - No documentation
- ❌ `tools/` - No documentation
### Missing Documentation Needed
- File naming conventions for `src/lib/`
- Grouping patterns for utilities
- Test file naming standards
- Config file organization rules
---
## Statistics
**By Issue Type**:
- Case Violations: X
- Pattern Violations: Y
- Generic Names: Z
- Temporary Names: W
- Misleading Names: V
**By Severity**:
- Critical: X
- High: Y
- Medium: Z
- Low: W
**By File Type**:
- TypeScript: X issues
- React Components: Y issues
- Test Files: Z issues
- Config Files: W issues
---
## Detailed File List
### Critical Issues
| File | Issue | Suggested Name | Reason |
|------|-------|----------------|--------|
| `src/auth-v2.ts` | Version suffix | `src/auth.ts` | Migration files not allowed |
| `src/UserProfile.tsx` | Wrong case | `src/user-profile.tsx` | Directory uses kebab-case |
### High Priority Issues
[Similar table]
### Medium Priority Issues
[Similar table]
### Low Priority Issues
[Similar table]
提供简洁摘要:
# Naming Convention Audit Complete
## Overview
- **Files Audited**: X
- **Issues Found**: Y
- **Directories with Issues**: Z
## Critical Issues (Immediate Action)
- X files with version/migration suffixes (`*-v2`, `*-new`)
- Y files with wrong case convention
- Z files in wrong locations
## Most Problematic Areas
1. **src/services/** - 12 issues (missing `.service.ts` suffix)
2. **src/components/** - 8 issues (case convention mix)
3. **src/lib/** - 6 issues (no clear standard)
## Top Violations
- Mixed case conventions: 15 files
- Missing pattern suffixes: 12 files
- Generic names: 8 files
## Missing Standards
- `src/lib/` lacks naming documentation
- `src/utils/` needs pattern definition
- Test files need naming standard
**Full Report**: tk ticket (tagged `audit`)
完整的命名审计包括:
完成审计后,请遵循手册 15.04 为所有发现的问题创建 tk 工单。
Weekly Installs
1.2K
Repository
First Seen
Feb 13, 2026
Security Audits
Installed on
amp1.0K
gemini-cli1.0K
opencode1.0K
codex1.0K
github-copilot1.0K
kimi-cli1.0K
Extract naming conventions:
Even without explicit AGENTS.md rules, identify patterns:
*.service.ts, *.controller.ts)components/, utils/, lib/)For EACH file in the todo list:
Compare to:
Naming Convention Violations :
userAuth.service.ts mixing camelCase and dot notation)Clarity Issues :
utils.ts, helpers.ts, stuff.ts)Anti-Patterns :
temp.ts, test.ts, new-*.ts, *-v2.ts)index2.ts, common.ts)old-*.ts, legacy-*.ts)*-new.ts, *-enhanced.ts)Organizational Issues :
*.service.ts)Read the file to verify:
Store in memory:
File: path/to/filename.ts
Convention Used: camelCase
Should Be: kebab-case
Pattern: Violates directory convention
Issues:
- [Specific issue]
Suggested Name: [better-name.ts]
Severity: [HIGH|MEDIUM|LOW]
Mark file as audited in todo list.
After auditing all files:
Create a tk ticket tagged audit with the report as its body. Use todos_oneshot(title: "Audit: Naming conventions", description: "<report content>", tags: "audit", type: "task").
# Filename & Naming Convention Audit
**Date**: [timestamp]
**Files Audited**: X
**Issues Found**: Y
---
## Executive Summary
- **Critical Issues**: X (blocks consistency)
- **High Priority**: Y (major violations)
- **Medium Priority**: Z (minor inconsistencies)
- **Low Priority**: W (suggestions)
**Most Problematic Directory**: [path] (X issues)
---
## Issues by Severity
### CRITICAL: Convention Violations
#### Temporary/Migration Filenames
- `src/services/auth-v2.ts` - Migration file still in use
- **Violates**: No version suffixes rule
- **Suggested**: `src/services/auth.ts` (replace old one)
- `src/utils/new-logger.ts` - Temporary naming
- **Violates**: No "new-" prefix rule
- **Suggested**: `src/utils/logger.ts`
#### Wrong Case Convention
- `src/components/UserProfile.tsx` - PascalCase
- **Directory Standard**: kebab-case
- **Suggested**: `src/components/user-profile.tsx`
### HIGH: Consistency Violations
#### Inconsistent with Directory Pattern
- `src/services/database.ts` - Missing `.service.ts` suffix
- **Pattern**: All files in directory use `*.service.ts`
- **Suggested**: `src/services/database.service.ts`
#### Vague/Generic Names
- `src/utils/helpers.ts` - Too generic
- **Contains**: String manipulation functions
- **Suggested**: `src/utils/string-helpers.ts`
### MEDIUM: Clarity Issues
#### Misleading Names
- `src/lib/validator.ts` - Named as single purpose
- **Contains**: Multiple validators and formatters
- **Suggested**: Split or rename to `validators.ts`
### LOW: Suggestions
#### Verbose Names
- `src/components/user-authentication-form-component.tsx`
- **Redundant**: "component" suffix in components dir
- **Suggested**: `src/components/user-auth-form.tsx`
---
## Issues by Directory
### src/services/ (12 issues)
- **Pattern**: Should use `*.service.ts` suffix
- **Violations**:
- `database.ts` (missing suffix)
- `auth-helper.ts` (wrong suffix)
- `userService.ts` (wrong case)
### src/components/ (8 issues)
- **Pattern**: kebab-case without suffix
- **Violations**:
- `UserProfile.tsx` (PascalCase)
- `button-component.tsx` (redundant suffix)
[Continue for all directories]
---
## Pattern Analysis
### Most Common Violations
1. **Mixed case conventions** - 15 files
2. **Missing pattern suffixes** - 12 files
3. **Generic names** - 8 files
4. **Temporary names** - 5 files
### Directories Lacking Standards
- `src/lib/` - No clear convention (mix of all patterns)
- `src/shared/` - Inconsistent organization
- `tools/` - No established pattern
### Emerging Anti-Patterns
- Version suffixes appearing (`*-v2`, `*-new`)
- Component files with "component" in name
- Service files without `.service.ts` suffix
---
## AGENTS.md Coverage
### Documented Standards
- ✅ `src/components/` - Documented in `src/AGENTS.md`
- ✅ `src/services/` - Documented in `src/AGENTS.md`
- ❌ `src/lib/` - No documentation
- ❌ `src/utils/` - No documentation
- ❌ `tools/` - No documentation
### Missing Documentation Needed
- File naming conventions for `src/lib/`
- Grouping patterns for utilities
- Test file naming standards
- Config file organization rules
---
## Statistics
**By Issue Type**:
- Case Violations: X
- Pattern Violations: Y
- Generic Names: Z
- Temporary Names: W
- Misleading Names: V
**By Severity**:
- Critical: X
- High: Y
- Medium: Z
- Low: W
**By File Type**:
- TypeScript: X issues
- React Components: Y issues
- Test Files: Z issues
- Config Files: W issues
---
## Detailed File List
### Critical Issues
| File | Issue | Suggested Name | Reason |
|------|-------|----------------|--------|
| `src/auth-v2.ts` | Version suffix | `src/auth.ts` | Migration files not allowed |
| `src/UserProfile.tsx` | Wrong case | `src/user-profile.tsx` | Directory uses kebab-case |
### High Priority Issues
[Similar table]
### Medium Priority Issues
[Similar table]
### Low Priority Issues
[Similar table]
Provide concise summary:
# Naming Convention Audit Complete
## Overview
- **Files Audited**: X
- **Issues Found**: Y
- **Directories with Issues**: Z
## Critical Issues (Immediate Action)
- X files with version/migration suffixes (`*-v2`, `*-new`)
- Y files with wrong case convention
- Z files in wrong locations
## Most Problematic Areas
1. **src/services/** - 12 issues (missing `.service.ts` suffix)
2. **src/components/** - 8 issues (case convention mix)
3. **src/lib/** - 6 issues (no clear standard)
## Top Violations
- Mixed case conventions: 15 files
- Missing pattern suffixes: 12 files
- Generic names: 8 files
## Missing Standards
- `src/lib/` lacks naming documentation
- `src/utils/` needs pattern definition
- Test files need naming standard
**Full Report**: tk ticket (tagged `audit`)
A complete naming audit includes:
After completing the audit, follow handbook 15.04 to create tk tickets for all surfaced issues.
Weekly Installs
1.2K
Repository
First Seen
Feb 13, 2026
Security Audits
Installed on
amp1.0K
gemini-cli1.0K
opencode1.0K
codex1.0K
github-copilot1.0K
kimi-cli1.0K
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装