agentleFS
cobuchancobuchan/compounding-operator/skills/copy-paste-via-file/SKILL.md

copy-paste-via-file

Skill0 starsChanged 4 months agoMITView on GitHub

Whenever the assistant needs the user to copy-paste a command, code snippet, prompt, or any text where chat-rendered formatting could mangle line wrapping, regex literals, or string contents (e.g. DevTools console one-liners, terminal commands with quoted JSON, long URLs, multi-line prompts), write the exact text to a file and open it so the user can copy it clean. Use whenever the assistant is about to say "paste this command into..." or similar, especially for browser DevTools console pastes, complex shell commands, or anything containing regex literals, escaped quotes, or backticks.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the file extension that matches the destination (.js for DevTools, .sh for shell, .txt for prompts, .sql for queries).

    line 25
  2. Very specific:

    Write the content with the Write tool.

    line 26
  3. Distinctive:

    Faster on retries: If the first paste fails, the user doesn't re-format from chat — they re-copy from the same file.

    line 43

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Copy-Paste Via File

Chat-rendered code blocks can hard-wrap inside string literals and regex bodies when copied, producing SyntaxError: Invalid or unexpected token or silent corruption. Especially common when pasting into a browser DevTools Console, an SSH terminal, or a form field that doesn't normalize whitespace.

When to Use

Trigger this skill whenever the assistant is about to ask the user to copy-paste any of:

  • A DevTools Console one-liner (especially with regex literals like /\s+/g).
  • A multi-quote, multi-escape shell command.
  • A long URL with query parameters that may wrap.
  • A multi-paragraph prompt body (system prompt, debate brief, email draft) where chat may add hanging indents.
  • Any JSON literal embedded in a JS expression.

Skip when the snippet is short, single-token, and contains no escapes (e.g. a single CLI flag, a path, a 2-3 word answer). Trust the user's chat copy for those.

How to Apply

  1. Pick a stable, descriptive file path under the active project's working area, e.g. ~/projects/<project>/scratch/<short-name>.<ext>. Reuse an existing path if the same kind of probe is being repeated.
  2. Use the file extension that matches the destination (.js for DevTools, .sh for shell, .txt for prompts, .sql for queries).
  3. Write the content with the Write tool. Do not add wrapping fences, language tags, or "copy this:" preamble. The file content is exactly what gets pasted.
  4. Open the file in a plain-text editor via the shell (e.g. open -a TextEdit <path> on macOS) so the user can select-all / copy cleanly.
  5. Tell the user the file path (one line), that the open command was run (one line), and what to do with the copied text (one line). No more.

Example

User says: "I need to inspect every input on this signup page."

Assistant action:

  1. Write(~/projects/my-app/scratch/devtools-form-audit-probe.js, <one-line JS>)
  2. Bash(open -a TextEdit <path>)
  3. Reply: "Saved to <path>. Opened in TextEdit. Select all, copy, paste into the DevTools Console, Enter."

Why

  • No mangling. A plain-text editor preserves exact bytes; chat copy can fold lines.
  • Auditable. The exact pasted command stays on disk for replay or to share with another agent.
  • Faster on retries. If the first paste fails, the user doesn't re-format from chat — they re-copy from the same file.

Standing Authorization

Once you've validated this pattern works for your own workflow, treat it as standing permission — don't re-ask each time. Just do it whenever the trigger conditions match.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.