
Code Transfer
Moving code between files is tedious when you need line-level precision, and this handles it cleanly. It switches between native tools for small jobs and a batch execution mode that saves 90% tokens when reorganizing 10+ files. The line_insert.py script is the standout feature here, letting you drop code at exact line numbers without wrestling with Edit's context matching. Use it when refactoring monolithic files into modules, extracting classes, or moving functions around. The workflow examples are thorough, showing the full extract-validate-insert-verify cycle. One catch: you still need to manage imports and dependencies yourself, but at least the mechanical transfer part is automated.
- skills.sh installs
- 173
- GitHub stars
- 693
- last updated
- Mar 6, 2026
Install
$ npx -y skills add mhattingpete/claude-skills-marketplace --skill code-transfer --agent claude-codeInstalls into .claude/skills of the current project.
Files
Code Transfer
Transfer code between files with precise line-based control. Dual-mode operation: native tools (1-10 files) or execution mode (10+ files, 90% token savings).
Operation Modes
Basic Mode (Default)
Use Read, Edit, Bash scripts for 1-10 file operations. Works immediately, no setup required.
Execution Mode (10+ files)
from api.filesystem import batch_copy
from api.code_analysis import find_functions
functions = find_functions('app.py', pattern='handle_.*')
operations = [{
'source_file': 'app.py',
'start_line': f['start_line'],
'end_line': f['end_line'],
'target_file': 'handlers.py',
'target_line': -1
} for f in functions]
batch_copy(operations)
When to Use
- "copy this code to [file]"
- "move [function/class] to [file]"
- "extract this to a new file"
- "insert at line [number]"
- "reorganize into separate files"
Core Operations
1. Extract Source Code
Read(file_path="src/auth.py") # Full file
Read(file_path="src/auth.py", offset=10, limit=20) # Line range
Grep(pattern="def authenticate", -n=true, -A=10) # Find function
Sponsors
Details
- Repository
- github.com/mhattingpete/claude-skills-marketplace
- License
- Apache-2.0
- First seen
- Jun 11, 2026
More from mhattingpete/claude-skills-marketplace
All 18- Flowchart Creator749
- Codebase Documenter594
- Architecture Diagram Creator500
- File Operations417
- Git Pushing411
- Test Fixing386
- Code Auditor341
- Timeline Creator335
- Dashboard Creator332
- Code Refactor301
- Feature Planning295
- Code Execution293
- Review Implementing256
- Conversation Analyzer248
- Technical Doc Creator221
- Ensemble Solving218
- Project Bootstrapper211