Naming Enforcement Skill
Overview
Skill for validating and enforcing CODITECT file and directory naming conventions, with ability to automatically fix violations.
When to Use
Use this skill when:
- Checking naming convention compliance
- Fixing naming inconsistencies
- Preparing for production deployment
- Enforcing team standards
- Cleaning up legacy projects
Capabilities
Level 1: Validation
- Check files against naming rules
- Report violations
- Calculate compliance percentage
Level 2: Suggestions
- All Level 1 capabilities
- Generate fix commands
- Preview before/after
Level 3: Auto-Fix
- All Level 2 capabilities
- Execute renames with git mv
- Update references
Naming Rules
| Type | Convention | Example |
|---|---|---|
| Directories | kebab-case | my-directory/ |
| Python | snake_case | my_module.py |
| TypeScript | kebab-case | my-service.ts |
| React | PascalCase | MyComponent.tsx |
| Docs | UPPER-KEBAB | README.md |
Usage
Check Only
/agent naming-convention-enforcer "Check naming conventions"
With Fix Suggestions
/agent naming-convention-enforcer "Check and suggest fixes"
Auto-Fix
/agent naming-convention-enforcer "Fix naming violations"
Output
Validation Report
## Naming Convention Report
Compliance: 88%
Violations: 14
| File | Should Be |
|------|-----------|
| MyFile.md | my-file.md |
| API_Handler.py | api_handler.py |
## Fix Commands
git mv MyFile.md my-file.md
git mv API_Handler.py api_handler.py
Standards Applied
- FILE-NAMING-CONVENTIONS.md
Related Skills
file-structure-analysis- Full analysisproject-organization- Complete organization
Example
Input: "Check docs/ for naming issues"
Output:
Compliance: 88%
Violations: 12
Case Issues:
- API-Guide.md → api-guide.md
- Setup_Doc.md → setup-doc.md
Pattern Issues:
- readme.md → README.md
- claude.md → CLAUDE.md
Fix commands generated.
Success Output
When successful, this skill MUST output:
✅ SKILL COMPLETE: naming-enforcement
Completed:
- [x] Naming conventions validated across target directory
- [x] Compliance score calculated
- [x] Violations identified with fix commands
- [x] All renames executed (if auto-fix mode)
Outputs:
- reports/naming-violations.md (Violation report)
- scripts/fix-naming.sh (Generated fix commands)
Compliance: 92% (12 violations fixed)
Completion Checklist
Before marking this skill as complete, verify:
- All target files scanned
- Compliance percentage calculated
- Violations categorized by type (case, pattern, extension)
- Fix commands use
git mvfor tracked files - No duplicate renames in fix script
- References updated if auto-fix executed
- All renamed files still compile/run
- Git status clean after renames
- Compliance report generated
- Backup created before destructive operations
Failure Indicators
This skill has FAILED if:
- ❌ File scan incomplete (missed directories)
- ❌ Fix commands would cause conflicts (same target)
- ❌ Git mv failed for tracked files
- ❌ Compliance score not calculated
- ❌ References broken after rename (imports, includes)
- ❌ Wrong case convention applied to file type
- ❌ Special files renamed (README.md → readme.md)
- ❌ No validation mode available (only destructive)
When NOT to Use
Do NOT use this skill when:
- Working with third-party code (respect original conventions)
- Files are auto-generated (fix generator instead)
- Legacy system with frozen naming (use
naming-convention-documenterinstead) - Mixed-language project with conflicting conventions (use per-directory rules)
- No team consensus on conventions (establish standards first)
- Single file rename (use manual
git mvinstead) - CI/CD relies on exact filenames (update CI first)
Anti-Patterns (Avoid)
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Renaming without git mv | Loses file history | Always use git mv for tracked files |
| No reference updates | Broken imports/includes | Scan and update references |
| Batch rename special files | Breaks conventions (README.md) | Exclude special patterns |
| Applying wrong convention | Python PascalCase → incorrect | Match convention to file type |
| No validation mode | Destructive with no preview | Always offer check-only mode first |
| Skipping backup | Can't undo mistakes | Create checkpoint before batch ops |
| Ignoring conflicts | Multiple files → same name | Detect and report conflicts |
| Not checking compliance | Unknown improvement | Calculate before/after percentages |
Principles
This skill embodies:
- #1 Recycle → Extend → Re-Use → Create - Extends existing files via renaming, doesn't recreate
- #3 Keep It Simple - Simple naming rules applied consistently
- #5 Eliminate Ambiguity - Clear naming conventions remove confusion
- #8 No Assumptions - Validates conventions before applying
- #9 Confirm Destructive - Requires approval for batch renames
Full Standard: CODITECT-STANDARD-AUTOMATION.md
Version: 1.0.0 Created: 2026-01-02