Skip to content
Development
Skill

/naming-and-structure-cleanup

Use when naming conventions or file structure drift across a project and need to be made consistent without changing business logic.

From plugin
agent-powerups
8114 skills46 agents54 commands

Claude Code

$ npx -y skills add yeaight7/agent-powerups --skill naming-and-structure-cleanup --agent claude-code

SKILL.md

naming-and-structure-cleanup.SKILL.md
name: naming-and-structure-cleanup
description: Use when naming conventions or file structure drift across a project and need to be made consistent without changing business logic.

Purpose

Inconsistent naming (camelCase vs snake_case) and messy file structures make codebases hard to navigate. Enforce the dominant local convention with focused, logic-free diffs.

When to Use

  • Mixed naming conventions for the same kind of symbol or file
  • Closely related files scattered instead of co-located
  • Review feedback keeps flagging names/structure rather than logic

Inputs

  • The area to clean (directory or module)
  • The repo's type-check and test commands

Workflow

1. **Observe local conventions.** Before renaming, scan the project to determine the dominant convention. If 80% of files use camelCase, enforce camelCase:

   find src -type f | grep -cE "/[a-z]+[A-Z][a-zA-Z]*\."    # camelCase filenames
   find src -type f | grep -cE "/[a-z]+(_[a-z]+)+\."        # snake_case filenames
   grep -rnE "function [a-z]+_[a-z]+\(" src/                # snake_case functions in a camelCase repo

2. **Targeted renames.** Use the `safe-rename` command pattern to update variables, classes, or files. Ensure all imports are updated:

   git grep -ln "\bOldName\b" | xargs sed -i "s/\bOldName\b/NewName/g"   # then review the diff
   git mv src/old_location/Component.tsx src/feature/Component.tsx       # git mv preserves history
   git grep -n "old_location"                                            # no stale import paths remain

3. **File co-location.** Move files so that closely related logic is co-located (e.g., keeping `Button.tsx`, `Button.css`, and `Button.test.tsx` in the same directory).

4. **No logic changes.** Do not refactor the internal logic of functions while performing naming cleanups. Keep the diff focused purely on structure and names.

5. **Verify.** Run the project's type checker and test suite after every structural change.

Output

  • A rename/move-only diff with all imports updated
  • The convention evidence (counts) that justified the chosen direction

Verification

  • [ ] Dominant convention measured before renaming, not assumed
  • [ ] All imports/references updated — old names re-grepped with zero hits
  • [ ] Diff contains zero logic changes
  • [ ] Type checker and tests green after every structural change

Failure Modes

  • **Imposing taste over convention** — the repo's dominant style wins, not the cleaner's preference.
  • **Rename + refactor in one diff** — mixing logic changes into a rename makes both unreviewable.
  • **Substring renames** — search/replace without word boundaries renames symbols it shouldn't; re-grep the old name after.
Read more
@yeaight7
Ships withagent-powerups

Curated power-ups for coding agents: skills, slash commands, MCP configs, hooks, AGENTS.md templates, and workflows for serious software engineering. Claude Code, Codex, Antigravity CLI, Cursor and more

8114 skills46 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
8
Star history of yeaight7/agent-powerups on GitHub, a chart by star-history.com

Other skills on agent-powerups.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills13d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react4d252k
@facebook@facebookInstall Skill

Questions about naming-and-structure-cleanup.

Which coding agents can use naming-and-structure-cleanup?
naming-and-structure-cleanup installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.