regression-io/coder-config/refactor
Claude Code and agent skill by regression-io/coder-config
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Refactor large files into smaller sub-components. Do not create more large files. Refactor into modular, focused units.
Install
npx vskill@latest install regression-io/coder-config/refactorSKILL.md
Refactor Large Files
Break down large files into smaller, focused modules while preserving functionality.
When to Use
- File exceeds ~300-500 lines
- File has multiple unrelated responsibilities
- File is hard to navigate or understand
- User asks to refactor or modularize
- Before adding more code to an already large file
Process
Step 1: Analyze the File
- Identify distinct responsibilities/concerns
- Map dependencies between functions/classes
- Find natural boundaries for splitting
Questions to ask:
- What are the main "topics" in this file?
- Which functions call each other?
- What could be tested independently?
- Are there clear layers (API, business logic, data)?
Step 2: Plan the Split
Create a refactoring plan:
Guidelines:
- Each new file should have ONE clear purpose
- Keep related code together
- Preserve the public API (re-export from original if needed)
- New files should be <200 lines ideally
Step 3: Execute Incrementally
- Create new files one at a time
- Move code, update imports
- Test after each move
- Keep the original file as an index/entry point
Step 4: Clean Up
- Remove dead code
- Update imports throughout codebase
- Verify no circular dependencies
- Run tests
Anti-patterns to Avoid
- Don't create files with just 1-2 functions (too granular)
- Don't split by arbitrary line count (split by responsibility)
- Don't create new large files while refactoring
- Don't change functionality while refactoring (separate concerns)
Example
Before:
After:
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugin/skills/refactor/SKILL.md
Popularity
- Repository stars
- 46
- Repository forks
- 4
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/regression-io/coder-config/refactor)