code-transfer

🔓Unverified
by mhattingpete · v1.0.0 · Apache-2.0

Transfer code between files with line-based precision. Use when users request copying code from one location to another, moving functions or classes between files, extracting code blocks, or inserting

Install on your platform

We auto-selected OpenClaw based on this skill’s supported platforms.

1Run this command in your terminal. The skill is immediately available.
terminal

About This Skill

What it does

This skill enables precise transfer of code snippets between files. It allows users to specify the exact lines of code to be moved or copied, ensuring accuracy and minimizing unintended changes. The tool is particularly useful for refactoring projects, moving code between modules, or extracting specific functions into new files.

When to use it

  • Moving a function: A developer needs to move a single function from one Python file to another within a project.
  • Extracting a class: A user wants to extract a large class definition from a main application file into a separate utility module.
  • Copying code blocks: A user requires copying a specific block of JavaScript code from a component file to a shared library.
  • Refactoring: When refactoring, you need to move or copy sections of code while preserving line numbers for accurate updates.

Key capabilities

  • Line-based precision: Transfers only the specified lines of code.
  • File transfer: Moves code between different files within a project.
  • Code copying: Duplicates code blocks from one location to another.
  • Function/Class extraction: Facilitates moving larger code units like functions and classes.

Example prompts

  • "Move lines 15-20 of file_a.py to file_b.py."
  • "Copy the entire class definition from line 8 to line 32 in main.java to a new file called utils/MyClass.java."
  • “Extract the code block starting at line 5 and ending at line 12 of script.js into a new file named helpers.js.”

Tips & gotchas

The skill relies on accurate line numbers provided in the prompt. Double-check the line numbers to avoid unintended consequences or errors during the transfer process.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
v1.0.0
License
Apache-2.0
Author
mhattingpete
Installs
0

🔓 Unverified

Not yet reviewed. Use with caution.