Copy something from the previous assistant message to the clipboard via pbcopy (macOS).
What:$ARGUMENTS non-empty → extract the matching piece. Empty → the last fenced code block; no block → the main answer stripped of filler. Raw content only, no fences or preamble.
How: heredoc into pbcopy. Use the sentinel PCOPY_EOF; change it if the payload contains that string.
After: one line, Copied <what> (<N> chars). Nothing else. Can't find a match → say so, do nothing.
1---2name: pcopy3description: pcopy4---56# pcopy78Copy something from the previous assistant message to the clipboard via `pbcopy` (macOS).910**What:** `$ARGUMENTS` non-empty → extract the matching piece. Empty → the last fenced code block; no block → the main answer stripped of filler. Raw content only, no fences or preamble.1112**How:** heredoc into `pbcopy`. Use the sentinel `PCOPY_EOF`; change it if the payload contains that string.1314**After:** one line, `Copied <what> (<N> chars).` Nothing else. Can't find a match → say so, do nothing.
Run npx skillmds@latest add pawel-kica/pcopy in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
pcopy It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Pawel-Kica (@pawel-kica) published this skill. Their other Agent Skills are listed on their SkillMD profile.