Skip to content
Back to skills

Clip

ASecurity

Copy the snippet I recommended in my last response (a command, query, Slack or PR text) to the clipboard exactly, with no terminal wrap newlines. Use for '/clip', 'clip that', 'copy the command', 'put that on my clipboard'. /clip 2 picks the second snippet.

  • 25 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added November 15, 2026
ai-agentsgoshellbashsql

Works with

  • terminal
  • cli

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add tinh2/skills-hub-registry --skill clip --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Clip?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Clip
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tinh2-clip/badge)](https://www.skillsdirectory.com/skills/tinh2-clip)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: clip
description: "Copy the snippet I recommended in my last response (a command, query, Slack or PR text) to the clipboard exactly, with no terminal wrap newlines. Use for '/clip', 'clip that', 'copy the command', 'put that on my clipboard'. /clip 2 picks the second snippet."
user-invocable: true
version: "1.0.1"
category: meta
platforms:
  - CLAUDE_CODE
---

Put the pasteable snippet from my most recent response on the clipboard, exactly as written. Use this instead of the built-in `/copy`, which copies the whole response, and instead of selecting text in the terminal, which picks up hard-wrap newlines and indentation.

## Step 1: Find the snippets

Look at my most recent response and list every snippet the user would paste or run:

- fenced code blocks (commands, SQL, config, `/compact` focus text)
- an inline command I told them to type
- a drafted message (Slack, PR description, Jira text) meant to be pasted

Skip prose, headings, explanations, and code shown only to illustrate something.

If the response has no such snippet, say so in one line and stop. Don't copy prose as a fallback.

## Step 2: Pick one

- With an argument: a number picks that snippet in order (`/clip 2`). A word picks the snippet that contains or is labeled by it (`/clip sql`).
- With no argument and one snippet: take it.
- With no argument and several: take the one the user acts on next, usually the first actionable one. List the others with numbers so they can run `/clip 2`.

## Step 3: Copy it exactly

- Copy the snippet's text only: no code fences, no backticks around inline code, no leading `$ ` or `> `, no trailing newline.
- Don't change the content. No reflowing, no edits to wording, dashes or quotes.
- Use a quoted heredoc so the shell interprets nothing, and strip the final newline:

```bash
cat <<'CLIP_EOF' | perl -pe 'chomp if eof' | pbcopy
<snippet text exactly>
CLIP_EOF
```

## Step 4: Verify the clipboard

- Run `pbpaste | wc -l`: pass is 0 for a one-line snippet, or the snippet's real line count minus one for a multi-line one. A higher count means wrap newlines or a trailing newline got in; redo Step 3.
- Run `pbpaste | head -c 80` and confirm it starts with the snippet's first characters (no `$ `, fence, or backtick).

## Step 5: Confirm in one line

Say what is on the clipboard (its first few words) and, if there were others, their numbers. Nothing else.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.