source-refactoring
CommunityRefactor code with clean, consistent exports.
Authorbkinsey808
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Patterns for splitting functions and components into their own files while ensuring consistent exports, JSDoc preservation, and test colocation. This guide helps teams decompose large files into focused modules to improve maintainability, reuse, and clarity across a codebase.
Core Features & Use Cases
- One function per file by default to promote focused, reusable units.
- Single symbol exports: use default export for single-symbol files; support multi-symbol files with named exports when necessary.
- Naming conventions: name files after the symbol for single-symbol files; use kebab-case for multi-symbol files that export multiple symbols.
- JSDoc preservation: carry over existing documentation and comments during refactoring.
- Test colocations: move and colocate tests next to the new source file.
- Import management: update all references to moved symbols across the codebase.
Quick Start
Identify a candidate function or component to extract, create a new file named after the symbol, and move its tests beside the new source file.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: source-refactoring Download link: https://github.com/bkinsey808/songshare-effect/archive/main.zip#source-refactoring Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.