206
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill fradser/dotclaude --skill refactor- SKILL.md4.2 KB
Overview
This skill automates aggressive code refactoring using the code-simplifier agent. It determines a refactor scope from given paths, semantic queries, or recent session changes and applies thorough improvements immediately without interactive confirmations. The goal is clearer, more consistent, and maintainable code while preserving functionality.
How this skill works
When invoked, the skill resolves targets: existing file/directory paths, a code search for semantic descriptions, or recently modified files from the current session. It then launches a refactoring subagent (refactor:code-simplifier) with an aggressive mode flag. The agent loads refactor best-practices, detects languages and frameworks, and applies automated transformations: removing legacy hacks and unused code, renaming for clarity, and enforcing quality standards.
When to use it
- You want immediate, project-scoped cleanup without step-by-step approvals.
- You have specific files or directories to modernize and can provide paths.
- You can describe a subsystem (e.g., "authentication") and want all matching files refactored.
- You modified files in the current session and want them consolidated/refactored.
- You need aggressive removal of legacy compatibility code and dead exports.
Best practices
- Prefer precise file or directory paths when possible to limit scope.
- Provide short semantic queries for broader, automatic discovery (agent will include all matches).
- Run tests or CI after refactor; the skill preserves behavior but changes structure.
- Commit or stash unrelated work before running; git is the rollback safety net.
- Use /refactor-project explicitly for a full project-wide refactor request.
Example use cases
- Refactor recently edited feature files from an active coding session to clean up interim hacks.
- Provide 'user login components' as an argument and automatically modernize all authentication-related code.
- Refactor a legacy module directory to remove compatibility shims and unused exports.
- Target a set of shell scripts or build scripts to simplify and standardize patterns.
- Quickly tidy up a focused package after a spike change, trusting git for reversions.
FAQ
No. This skill is fully automated and executes refactors immediately per the determined scope.
How do I undo changes if something breaks?
Use git to revert specific files, for example: git checkout -- <files>.
What if I run the skill with a vague description?
The agent performs a code search and includes all matching files in the refactor scope automatically.