Stop selecting and copying text from your AI agent.
You wrote a query. A curl command. A code block. Now you need it in your clipboard. In Codex, say $pb. In other hosts, use /pb or plain language like copy that.
How it works
Copy the artifact. Skip the selection.
Work with your agent
Write code, build queries, generate commands. Whatever you're doing — keep going.
Invoke the clipboard helper
Use $pb in Codex, /pb in slash-command hosts, or plain language like copy that. The agent finds the most recent useful artifact and copies it to your clipboard.
Paste it wherever
⌘V into your terminal, editor, browser, Slack — wherever it needs to go. No selecting, no highlighting, no dragging.
Works everywhere
One clipboard workflow. Multiple agent hosts.
agent-pb works best as a Codex skill, but the same artifact-selection behavior is portable to Claude Code and other rule-based coding tools.
Claude Code
Plugin install with slash-style usage.
/pb
Codex
Install the bundled skill into $CODEX_HOME/skills and invoke it explicitly.
$pb
Cursor
Add to .cursorrules
"copy that"
Windsurf
Add to .windsurfrules
"copy that"
GitHub Copilot
Add to .github/copilot-instructions.md
"copy that"
What it actually does
Useful defaults for real coding sessions.
-
🔪Picks the right thing automatically Queries, shell commands, code blocks, URLs, configs — ranked by what you're most likely to paste next. Or tell it exactly what to grab.
-
🖥️Cross-platform clipboard macOS
pbcopy, Linuxxclip/wl-copy, WSL/Windowsclip.exe. Auto-detects your platform. -
🧹Clean output Strips markdown fences, preserves indentation, no trailing newlines. What lands in your clipboard is what you'd have selected manually — minus the effort.
-
🔒Won't copy secrets Tokens, API keys, credentials — skipped unless you explicitly ask. Your clipboard is sacred.
-
🧈Works with any AI coding agent Bundled skill for Codex, plugin path for Claude Code, and a portable rules snippet for Cursor, Windsurf, Copilot, and similar hosts.
Install
Claude Code (plugin)
/plugin marketplace add ashrocket/agent-pb
/plugin install agent-pb@agent-pb
Codex
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills/pb"
curl -sL https://raw.githubusercontent.com/ashrocket/agent-pb/main/skills/pb/SKILL.md \
-o "${CODEX_HOME:-$HOME/.codex}/skills/pb/SKILL.md"
$pb
$pb the AQL query
copy that
Cursor / Windsurf / Copilot
curl -sL https://raw.githubusercontent.com/ashrocket/agent-pb/main/snippets/pb-rules.md >> .cursorrules
Some hosts may ask for approval before writing to the system clipboard. Something broken? File an issue. Want to improve it? PRs welcome.