spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / plugins / slack-quote-formatter / README.md
87 lines · 3.3 KBPreviewCodeRaw
1# Slack Quote Formatter
2
3Enhances the visual display of Slack forwarded and quoted messages with distinctive Unicode box formatting.
4
5## Overview
6
7When Claude Code receives messages from Slack that include forwarded messages, they typically appear as plain text:
8
9```
10[Forwarded Message]
11From: Felix Klock
12Message: I assume it would be a matter of reviewing the entries...
13```
14
15This plugin transforms these plain blocks into visually distinctive formatted quotes:
16
17```
18╔════════════════════════════════════════════════════════════════════╗
19║ FORWARDED MESSAGE ║
20╠════════════════════════════════════════════════════════════════════╣
21║ From: Felix Klock ║
22╟────────────────────────────────────────────────────────────────────╢
23║ I assume it would be a matter of reviewing the entries... ║
24╚════════════════════════════════════════════════════════════════════╝
25```
26
27## Features
28
29- Unicode box drawing characters for clear visual boundaries
30- Distinct header section highlighting "FORWARDED MESSAGE"
31- Sender information prominently displayed
32- Message content indented for quote-like appearance
33- Automatic text wrapping for long messages
34- Handles multiple forwarded messages in a single prompt
35
36## Installation
37
38This plugin is included in the Claude Code plugins repository. To enable it:
39
401. Add the plugin to your project's `.claude/settings.json`:
41 ```json
42 {
43 "plugins": [
44 "path/to/plugins/slack-quote-formatter"
45 ]
46 }
47 ```
48
492. Or install via the Claude Code plugin command:
50 ```
51 /plugin add slack-quote-formatter
52 ```
53
54## How It Works
55
56The plugin registers a `UserPromptSubmit` hook that:
57
581. Intercepts incoming prompts
592. Detects `[Forwarded Message]` blocks in the Slack context
603. Transforms them into formatted boxes with visual distinction
614. Passes the transformed prompt to Claude
62
63## Configuration
64
65No configuration required. The plugin automatically activates when Slack forwarded messages are detected.
66
67## Plugin Structure
68
69```
70slack-quote-formatter/
71├── .claude-plugin/
72│ └── plugin.json # Plugin metadata
73├── hooks/
74│ ├── hooks.json # Hook configuration
75│ └── format_slack_quotes.py # Transformation logic
76└── README.md
77```
78
79## Why Visual Distinction Matters
80
81When working with Slack context in Claude Code, quoted messages can easily blend into the surrounding text, making it harder to:
82
83- Identify what content is quoted vs. original
84- Understand the source of different pieces of information
85- Parse complex threads with multiple forwarded messages
86
87This plugin makes quoted content immediately recognizable, improving readability and reducing confusion.