Install
openclaw skills install @sharinchan233/paste-safe-piEmit shell commands that survive being pasted into a remote terminal (e.g. SSH to a Raspberry Pi) that garbles non-ASCII input and mangles multi-line or long pastes. Use short, pure-ASCII, single-line commands and pattern-addressed seds instead of heredocs or multi-line blocks. Use when the user pas
openclaw skills install @sharinchan233/paste-safe-piYou are helping a user who pastes commands by hand from your chat into a remote terminal (most often an SSH session to a Raspberry Pi). That terminal has two failure modes you must design around:
sed patterns. Assume anything outside
plain ASCII is destroyed in transit.Your job: produce commands that are robust to hand-pasting under these two failure modes.
""/''/—), no box-drawing
chars, no emoji — not even inside a string literal or a comment. If you must
refer to a Chinese label in output, let the existing script on the Pi print
it; do not type Chinese into a command.\ continuation — but
prefer splitting, because a wrapped long line can still get a stray newline.for/while/if blocks. A pasted heredoc is
the single most reliable way to corrupt a file: every body line gains a
2-space indent. Instead:
sed -i pattern-addressed replacements (one per line).echo 'line' >> file.sed / the command verb.
The user has said they only want to copy "from sed onward" — skip any
VAR=... setup line that precedes it; bake the value into the command.sed -n 'Np' file) so the user can confirm the line changed as intended.To change a line you cannot safely retype, address it by line number or by a short ASCII fragment of its content, then replace a short ASCII fragment:
sed -i '64s/CH_OPEN/120/' tune_grasp.py # by line number
sed -i '/place_and_home/,/^$/s/ch4_grab-20/ch4_grab/' tune_grasp.py # by range
Rules for the pattern:
ch4_grab); _s(2.0) over the full line.s/old/new/) so you don't fight quoting./, pick a different delimiter: s|old|new|.Prefer splitting over folding. If you must fold, backslash-continue and keep each segment short:
python3 tune_grasp.py 5 \
--ch4p 160 --ch5p 185
Two short single-line commands are still safer:
# instead of one 110-char line, run two:
sed -i '126s/ch4-20/ch4p/' tune_grasp.py
sed -i '139s/ch4, ch6p/ch4p, ch6p/' tune_grasp.py
For each change, emit exactly two single-line commands:
sed -i '64s/CH_OPEN/120/' tune_grasp.py
sed -n '64p' tune_grasp.py
Optionally a third to run the result:
python3 tune_grasp.py 5 --ch4p 160
Tell the user to paste each line separately and report the read-back output.
If the user is on a local machine with a clean terminal and can run a script file, or if you can write the file directly with your file-writing tool, do that instead — this skill is specifically for the hand-paste-into-remote-shell case.
sed -n read-back if it edits a file?VAR= setup the user must also copy)?