Skip to content

Feature Request: Add /copy command to copy messages to clipboard #5512

Description

@NightMachinery

Feature Request: /copy [N=1] slash command

Summary

Add a /copy slash command that copies the last N Claude Code messages as Markdown to the OS clipboard.

Proposed Usage

/copy        # Copies the last message (Claude's response)
/copy 3      # Copies the last 3 messages (alternating user/Claude)
/copy 5      # Copies the last 5 messages

Expected Behavior

  • Default N=1 (copies just Claude's last response)
  • Messages should be copied as properly formatted Markdown
  • Should include both user messages and Claude responses when N > 1
  • Should integrate with OS clipboard (works with Cmd+V/Ctrl+V)
  • Should preserve code blocks, formatting, and structure

Use Cases

  • Quickly share Claude's responses in documentation
  • Copy code snippets and explanations for use elsewhere
  • Archive conversation snippets for later reference
  • Share troubleshooting responses with team members

Implementation Notes

  • Should work across platforms (macOS, Linux, Windows)
  • Consider using a clipboard library like pyperclip or similar
  • Messages should maintain original formatting and structure
  • Could potentially support additional formats (plain text, HTML) as options

This would significantly improve the workflow when working with Claude Code responses that need to be shared or documented elsewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions