Skip to main content

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

TypeConventionExample
Directorieskebab-casemy-directory/
Pythonsnake_casemy_module.py
TypeScriptkebab-casemy-service.ts
ReactPascalCaseMyComponent.tsx
DocsUPPER-KEBABREADME.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
  • file-structure-analysis - Full analysis
  • project-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 mv for 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-documenter instead)
  • Mixed-language project with conflicting conventions (use per-directory rules)
  • No team consensus on conventions (establish standards first)
  • Single file rename (use manual git mv instead)
  • CI/CD relies on exact filenames (update CI first)

Anti-Patterns (Avoid)

Anti-PatternProblemSolution
Renaming without git mvLoses file historyAlways use git mv for tracked files
No reference updatesBroken imports/includesScan and update references
Batch rename special filesBreaks conventions (README.md)Exclude special patterns
Applying wrong conventionPython PascalCase → incorrectMatch convention to file type
No validation modeDestructive with no previewAlways offer check-only mode first
Skipping backupCan't undo mistakesCreate checkpoint before batch ops
Ignoring conflictsMultiple files → same nameDetect and report conflicts
Not checking complianceUnknown improvementCalculate 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