Agent skill
refactor-rename-for-clarity
[Code Quality] Performs systematic renaming to improve code clarity: variables, functions, classes, files. Use when names are unclear, misleading, or inconsistent with their purpose.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/refactor-rename-for-clarity
SKILL.md
Refactor: Rename for Clarity
Improve code readability through better naming.
Naming Principles
1. Names Should Reveal Intent
// BAD: let d: Int
// GOOD: let elapsedDays: Int
2. Names Should Be Searchable
// BAD: if status == 1 { }
// GOOD: if status == .active { }
3. Names Should Match Abstraction Level
// BAD: func getFromNetworkAndParseJSON()
// GOOD: func fetchUserProfile()
Common Patterns
| Bad Name | Better Name | Why |
|---|---|---|
| data | userResponse | Specific type |
| temp | previousValue | Purpose clear |
| flag | isEnabled | Boolean pattern |
| doIt() | submitForm() | Action + target |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?