Skip to content

Latest commit

Β 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ¦₯ copypaste

why retype when copy do trick

A Claude Code skill that makes AI act like a lazy human β€” copy, don't regenerate.

License: MIT Claude Code Session cost


caveman compresses how the AI talks. copypaste compresses how the AI acts β€” and redundant actions cost far more than chatty prose.

Before / After

Same prompt, same result β€” the only difference is how the agent gets there. Token counts are the output the agent produces (estimated at ~4 chars/token).

"Add a GPL-3.0 license to the project"

πŸ€– diligent agent β€” ~8,000 tokens πŸ¦₯ copypaste agent β€” ~40 tokens
Write(LICENSE) β€” types out all 674 lines of the GPL from memory, one legal clause at a time, hoping nothing gets hallucinated in a license text curl -s https://www.gnu.org/licenses/gpl-3.0.txt -o LICENSE

"Rename fetchUser β†’ loadUser across the codebase" (14 files)

πŸ€– diligent agent β€” ~6,000 tokens πŸ¦₯ copypaste agent β€” ~50 tokens
Reads all 14 files, rewrites all 14 files in full β€” every untouched line retyped as collateral grep -rl fetchUser src | xargs sed -i '' 's/fetchUser/loadUser/g'

"Run the benchmark again"

πŸ€– diligent agent β€” ~600 tokens πŸ¦₯ copypaste agent β€” ~12 tokens
Writes the entire 40-line benchmark script into the console again β€” the same script it already wrote an hour ago bash scripts/bench.sh

Same files, byte-identical results β€” up to 200Γ— fewer tokens on the actions where the skill hits. How much of a session those actions make up varies; the demo below is the measured floor.

Demo

Same project, same three prompts, recorded live β€” treat the βˆ’18% as the minimum: a short scripted session where each antipattern fires only once. In long real sessions the savings compound as scripts and templates get reused instead of rebuilt.

Without the skill β€” Claude types out all 201 lines of the Apache-2.0 license from memory, then rebuilds the release pipeline from scratch on every run:

without copypaste β€” $0.62/session

With the skill β€” one curl for the license, a tsconfig from the template library, and the release script is written once and simply rerun:

with copypaste β€” $0.51/session

The problem

AI agents are diligent in the most expensive way possible. They:

  • πŸ“ "copy" a file by reading it and typing every byte back out β€” and if it's not 100% identical, they rewrite it from scratch
  • πŸ“œ type LICENSE texts and configs from memory (burning tokens and hallucinating options)
  • πŸ” write a script inline, then on the next run write the whole script again instead of rerunning the file
  • πŸ”¨ rewrite entire files to change three lines
  • πŸ” re-explore the same codebase every single session

Humans don't work like this. Lazy humans β€” i.e. good engineers β€” reach for cp, curl, sed, git, and yesterday's script.

Measured

Same session, twice β€” identical Node project, identical three prompts (add Apache-2.0 license + tsconfig β†’ build a release script β†’ rerun it), Claude Code, whole-session cost via /cost:

without copypaste with copypaste
Session cost $0.62 $0.51 (βˆ’18%)
Apache-2.0 license typed out from memory one curl
Release script, run 2 rewritten from scratch bash scripts/release.sh

n=1, so treat it as an illustration, not a benchmark. But note why the number beats output-compression skills (caveman measures ~8.5% on real tasks): avoided actions β€” a license typed out, a script regenerated, a file rewritten β€” cost hundreds to thousands of tokens each, and the savings grow with session length as scripts and templates get reused instead of rebuilt.

Benchmarked (n=5 per arm, every result verified correct)

Paired headless sessions, identical prompts, two models β€” full methodology, raw data, and the honest story of what broke in bench/:

scenario sonnet opus
add Apache-2.0 license β€” βˆ’29% cost, βˆ’74% tokens β€” vanilla Opus typed all 201 lines from memory 5/5 times
repeat-work (report + 2 reruns) βˆ’36% tokens, βˆ’3% cost βˆ’19% cost, βˆ’56% tokens β€” script saved & reran 5/5 vs 0/5
bulk rename (16 files) βˆ’3% +11% β€” vanilla already uses sed
copy 408-line config +30% β€” skill not needed: vanilla already does cp +28%
whole-run aggregate +2.4% βˆ’9.4%

The honest read: the skill pays exactly where models are wasteful β€” boilerplate "known by heart" and repeated work β€” and is pure overhead where the model's defaults are already lazy. Opus wastes more than sonnet, so it saves more; headless is still the conservative floor versus interactive sessions (the βˆ’18% demo above). Your mileage depends on how much of your day looks like the top two rows.

⚠️ These numbers are the conservative end: measured on sonnet in headless mode, the laziest default combination we've seen. In everyday interactive use (CLI/desktop) with Opus β€” where our demo caught the model typing a 201-line license from memory β€” the wasteful defaults are stronger, so the savings percentage is likely higher. Interactive-Opus benchmarking is the next planned run.

Install

As a plugin (recommended β€” one command, auto-updates):

/plugin marketplace add egorthinks/copypaste
/plugin install copypaste@copypaste

Or manually, the artisanal way:

git clone https://github.com/egorthinks/copypaste.git && cd copypaste
mkdir -p ~/.claude/skills ~/.claude/templates
cp -R skills/copypaste skills/copypaste-audit ~/.claude/skills/

That's it. The skill triggers automatically whenever Claude copies/creates files, scaffolds a project, or writes scripts. Per-project install: copy into <project>/.claude/skills/ instead.

Headless note: in non-interactive runs (claude -p) the model often skips auto-invoking skills entirely. If you script Claude, ask for it explicitly β€” start the prompt with Use the copypaste skill. (or /copypaste).

The rules

# Rule Instead of… Do…
1 Never retype what exists reading + rewriting content cp, mv, then Edit the diff
1b Scaffold by copying configs from memory generators (tsc --init), known-good configs
1c Bulk text from real sources inventing prose user's own texts, templates, public domainΒΉ
2 Scripts are files re-typing yesterday's script save once β†’ bash scripts/thing.sh
3 Transform, don't regenerate hand-editing N files one sed / jq / yq applied N times
4 Check before you create writing your own leftPad repo, stdlib, installed deps
5 Minimal diff Write (full rewrite) Edit (three lines)
6 Cheapest tool that works reading 5000 lines for one value grep -n value file
7 Git is your copy machine re-editing code back by hand checkout / revert / cherry-pick
8 Remember, don't re-explore ten greps every session one line in CLAUDE.md
9 Grow a template library scaffolding from zero each time ~/.claude/templates/ that grows with use
10 Fixtures come from reality inventing "realistic" JSON curl real response once β†’ fixtures/
11 Generators make generated files hand-editing lockfiles rerun npm install / alembic / protoc

ΒΉ Never copyrighted content from other people's sites β€” that's a legal problem, not laziness.

Commands

Command What it does
/copypaste Apply the rules explicitly (they also trigger automatically)
/copypaste-audit Scan the current session for wasted tokens β€” full-file rewrites, regenerated scripts, from-memory boilerplate β€” and report occurrences, estimated waste, and the #1 habit to fix

The test

Before every action, one question:

"Would a lazy human type all this out?"

If they'd reach for cp, curl, sed, or an old script β€” so does Claude.

License

MIT β€” which, per Rule 1b, was curl'd from the canonical SPDX source, not typed from memory. Practice what you preach. πŸ¦₯

About

πŸ¦₯ why retype when copy do trick β€” Claude Code skill that makes AI act like a lazy human: cp/curl/sed/git over regeneration, Edit over rewrite, saved scripts over re-typed ones

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages