code-transfer

code-transfer is a skill for Claude Code from mhattingpete/claude-skills-marketplace. It costs 43 tokens per session (1,058 once invoked), scanned A, original, Apache-2.0.

A method for moving selected code between files using exact line positions, including functions, classes, or other code blocks.

In plain words
What is it for?
It helps extract code into new files, move functions or classes, copy blocks, insert them at chosen lines, and handle many transfers.
Why use it?
It avoids imprecise copying and makes it easier to reorganize code without manually rebuilding each section.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the code-operations-plugin plugin — 4 skills shipped together

Good fit It helps extract code into new files, move functions or classes, copy blocks, insert them at chosen lines, and handle many transfers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mhattingpete/claude-skills-marketplace/code-transfer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mhattingpete/claude-skills-marketplace --skill code-transfer
Clone the repo
git clone --depth 1 https://github.com/mhattingpete/claude-skills-marketplace

Made for: Claude Code.

Or install code-operations-plugin, the plugin that ships this one along with the rest of its 4 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-transfer

README.md
[![agentmods](https://agentmods.dev/badge/skills/mhattingpete/claude-skills-marketplace/code-transfer/github.svg)](https://agentmods.dev/skills/mhattingpete/claude-skills-marketplace/code-transfer)
Your own site
<a href="https://agentmods.dev/skills/mhattingpete/claude-skills-marketplace/code-transfer"><img src="https://agentmods.dev/badge/skills/mhattingpete/claude-skills-marketplace/code-transfer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-transfer

Your own site · 80×15
<a href="https://agentmods.dev/skills/mhattingpete/claude-skills-marketplace/code-transfer"><img src="https://agentmods.dev/badge/skills/mhattingpete/claude-skills-marketplace/code-transfer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,058 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.01058
Opus 5 $0.00022 $0.00529
Sonnet 5 $0.00009 $0.00212
Haiku 4.5 $0.00004 $0.00106

Measured 13d ago against content hash b224f1619fc8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

code-transfer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/line_insert.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

code-operations-plugin/skills/code-transfer/SKILL.md · 139 lines

How it starts

The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

2. Insert at Specific Line

Use line_insert.py script for line-based insertion:

python3 skills/code-transfer/scripts/line_insert.py <file> <line_number> <code> [--backup]

Examples:

# Insert function at line 50
python3 skills/code-transfer/scripts/line_insert.py src/utils.py 50 "def helper():\n    pass"

# Insert with backup
python3 skills/code-transfer/scripts/line_insert.py src/utils.py 50 "code" --backup

# Insert at beginning
python3 skills/code-transfer/scripts/line_insert.py src/new.py 1 "import os"

When to use:

  • User specifies exact line number
  • Inserting into new/empty files
  • Inserting at beginning/end without context

3. Insert Relative to Content

Use Edit when insertion point is relative to existing code:

Edit(
  file_path="src/utils.py",
  old_string="def existing():\n    pass",
  new_string="def existing():\n    pass\n\ndef new():\n    return True"
)

Read the full file on GitHub · 139 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago First seen · 139 lines · 43 tokens per session scan A b224f1619fc8

Subscribe to this mod's changes

code-transfer is a skill published in the GitHub repository mhattingpete/claude-skills-marketplace (671 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 43 tokens to every session and 1,058 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

security-compliance

Guides security professionals in implementing defense-in-depth security architectures, achieving compliance with industry frameworks (SOC2, ISO27001, GDPR, HIPAA), conducting threat modeling and risk assessments, managing security operations and incident response, and embedding security throughout the SDLC.

sangrokjung/claude-forge · 56 tokens

stride-analysis-patterns

Apply STRIDE methodology to systematically identify threats. Use when analyzing system security, conducting threat modeling sessions, or creating security documentation.

sangrokjung/claude-forge · 30 tokens

review-loop

Run the adversarial verification loop — implement, then hand the change to a fresh checker that did not write it, fix what it finds, and re-dispatch until APPROVE. Use before claiming any behavioural change is done, and on requests like "review loop", "adversarial review", "independent review", "get this verified"…

sangrokjung/claude-forge · 100 tokens

prompts-chat

Use when searching, installing, or improving AI skills and prompts via prompts.chat or skills.sh. Triggers on skill search, prompt lookup, install skill, improve prompt, prompts.chat.

sangrokjung/claude-forge · 41 tokens

humanize-korean

A Korean editing tool that removes translation-like phrasing and common AI writing habits while preserving facts, numbers, names, and quotations. It is intended for existing Korean prose, not for writing new marketing copy.

sangrokjung/claude-forge · 145 tokens

continuous-learning-v2

Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.

sangrokjung/claude-forge · 33 tokens