Skip to content

Commit fa768a5

Browse files
isaacrowntreeclaude
andcommitted
fix(send): convert - bullets to • for Slack, remove digest command
Slack mrkdwn renders - as a literal hyphen, not a bullet. Auto-convert - and * list items to • (U+2022) for proper bullet rendering. Remove digest command — extracted to triptechtravel/claude-skills repo as a Claude Code skill that orchestrates slackbuzz, clickup, and gh CLIs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b714566 commit fa768a5

4 files changed

Lines changed: 49 additions & 33 deletions

File tree

internal/text/mrkdwn.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ var (
3535
// Convert to ───── divider (Slack has no native HR in mrkdwn text)
3636
mdHorizontalRule = regexp.MustCompile(`(?m)^[\s]*([-*_]){3,}\s*$`)
3737

38+
// Markdown unordered list: - item or * item at start of line → • item
39+
// Slack renders - as a literal hyphen, not a bullet. • is the real bullet.
40+
mdUnorderedList = regexp.MustCompile(`(?m)^(\s*)[-*]\s+`)
41+
3842
// Markdown ordered list: 1. item → 1. item (already works, but detect for hints)
3943
mdOrderedList = regexp.MustCompile(`(?m)^\s*\d+\.\s+`)
4044

@@ -95,9 +99,13 @@ func ConvertMarkdownToMrkdwn(text string) string {
9599
text = mdBoldDoubleAsterisk.ReplaceAllString(text, "*$1*")
96100
text = mdBoldDoubleUnderscore.ReplaceAllString(text, "*$1*")
97101

98-
// Horizontal rules: --- → ─────
102+
// Horizontal rules: --- → ───── (must come before bullet conversion)
99103
text = mdHorizontalRule.ReplaceAllString(text, "─────")
100104

105+
// Unordered lists: - item or * item → • item
106+
// Slack renders - as a literal hyphen; • is the actual bullet character.
107+
text = mdUnorderedList.ReplaceAllString(text, "${1}• ")
108+
101109
return text
102110
}
103111

@@ -152,7 +160,7 @@ Slack mrkdwn formatting reference:
152160
` + "`code`" + ` Inline code
153161
` + "```code```" + ` Code block
154162
> quote Blockquote
155-
• item Bullet list (or - item)
163+
• item Bullet list (- and * auto-convert to •)
156164
1. item Numbered list
157165
<url|label> Hyperlink
158166
:emoji: Emoji shortcode

internal/text/mrkdwn_test.go

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,24 @@ func TestConvertMarkdownToMrkdwn(t *testing.T) {
132132
want: "> This is a quote",
133133
},
134134
{
135-
name: "bullet list",
135+
name: "bullet list with hyphens",
136136
input: "- item one\n- item two",
137-
want: "- item one\n- item two",
137+
want: "• item one\n• item two",
138+
},
139+
{
140+
name: "bullet list with asterisks",
141+
input: "* item one\n* item two",
142+
want: "• item one\n• item two",
143+
},
144+
{
145+
name: "nested bullet list",
146+
input: "- top\n - nested",
147+
want: "• top\n • nested",
148+
},
149+
{
150+
name: "hyphen in middle of text is not a bullet",
151+
input: "this is a - test",
152+
want: "this is a - test",
138153
},
139154
{
140155
name: "emoji shortcodes",
@@ -151,7 +166,7 @@ func TestConvertMarkdownToMrkdwn(t *testing.T) {
151166
{
152167
name: "full release notes style",
153168
input: "## 🎨 UX & Design\n- **New animations** throughout\n- Fixed **spacing** issue",
154-
want: "*🎨 UX & Design*\n- *New animations* throughout\n- Fixed *spacing* issue",
169+
want: "*🎨 UX & Design*\n *New animations* throughout\n Fixed *spacing* issue",
155170
},
156171

157172
// Edge cases

pkg/cmd/root/root.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import (
77
"github.com/triptechtravel/slackbuzz-cli/pkg/cmd/auth"
88
"github.com/triptechtravel/slackbuzz-cli/pkg/cmd/channel"
99
"github.com/triptechtravel/slackbuzz-cli/pkg/cmd/completion"
10-
"github.com/triptechtravel/slackbuzz-cli/pkg/cmd/digest"
11-
"github.com/triptechtravel/slackbuzz-cli/pkg/cmd/doctor"
10+
"github.com/triptechtravel/slackbuzz-cli/pkg/cmd/doctor"
1211
"github.com/triptechtravel/slackbuzz-cli/pkg/cmd/dm"
1312
"github.com/triptechtravel/slackbuzz-cli/pkg/cmd/file"
1413
"github.com/triptechtravel/slackbuzz-cli/pkg/cmd/later"
@@ -30,8 +29,6 @@ func NewCmdRoot(f *cmdutil.Factory) *cobra.Command {
3029
Short: "Slack CLI - message, search, and manage channels from the command line",
3130
Long: `Work with Slack channels, messages, and users from your terminal.
3231
33-
Integrates with ClickUp and GitHub CLIs for cross-tool developer workflows.
34-
3532
GETTING STARTED
3633
slackbuzz app create Create a Slack app with required scopes
3734
slackbuzz auth login Log in with bot/user tokens
@@ -40,8 +37,6 @@ INBOX & ACTIVITY
4037
slackbuzz activity See mentions, DMs, and threads (alias: inbox)
4138
slackbuzz threads Threads you're participating in
4239
slackbuzz dm list DM conversations with recent activity
43-
slackbuzz digest Cross-tool briefing (Slack + ClickUp + GitHub)
44-
4540
MESSAGING
4641
slackbuzz message list <chan> Read channel/thread history
4742
slackbuzz message send <chan> Send a message
@@ -103,10 +98,6 @@ TIPS
10398
laterCmd.GroupID = "inbox"
10499
cmd.AddCommand(laterCmd)
105100

106-
digestCmd := digest.NewCmdDigest(f)
107-
digestCmd.GroupID = "inbox"
108-
cmd.AddCommand(digestCmd)
109-
110101
// Messaging commands
111102
messageCmd := message.NewCmdMessage(f)
112103
messageCmd.GroupID = "messaging"

skills/slackbuzz-cli/SKILL.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Use the `slackbuzz` CLI instead of raw Slack API calls. It handles authenticatio
1313
- User wants to check Slack activity, inbox, or threads
1414
- User needs to search Slack messages or files
1515
- User wants to react to messages, set status, or manage saved items
16-
- User asks for a morning briefing or digest across Slack/ClickUp/GitHub
1716
- User mentions Slack channels, users, or message timestamps
1817

1918
## Authentication
@@ -108,21 +107,6 @@ slackbuzz dm list
108107

109108
Activity detects ClickUp task IDs and GitHub PR/issue URLs in messages and shows actionable hints.
110109

111-
## Cross-Tool Digest
112-
113-
```bash
114-
# Full briefing: Slack + ClickUp + GitHub
115-
slackbuzz digest
116-
117-
# Scoped briefings
118-
slackbuzz digest --slack-only
119-
slackbuzz digest --github-only
120-
slackbuzz digest --clickup-only
121-
slackbuzz digest --since 1d
122-
```
123-
124-
Integrates with `clickup` and `gh` CLIs if installed. Gracefully skips unavailable tools.
125-
126110
## Reactions
127111

128112
```bash
@@ -208,7 +192,7 @@ The CLI automatically selects the correct token for each command. You do not nee
208192
| `react`, `react remove` | **Bot** | Reactions via bot |
209193
| `notify` | **Bot** | System/automated notifications |
210194
| `thread link` | **Bot** | Generates permalinks |
211-
| `activity`, `threads`, `digest` | **User** | Slack search API (user-only) |
195+
| `activity`, `threads` | **User** | Slack search API (user-only) |
212196
| `dm list` | **User** | Slack search API (user-only) |
213197
| `message search`, `file search` | **User** | Slack search API (user-only) |
214198
| `later list`, `add`, `remove` | **User** | Stars API (user-only) |
@@ -271,7 +255,25 @@ The CLI automatically strips common shell escape artifacts from message text bef
271255
- **Case-insensitive resolution**: User lookup matches display names and usernames regardless of case
272256
- **Permission feedback**: Missing tokens or scopes produce clear error messages. Use `slackbuzz auth status` to check capabilities.
273257
- **Deeplinks**: Output includes clickable Slack deeplinks
274-
- **Cross-tool**: Digest combines Slack, ClickUp, and GitHub activity
258+
## Formatting
259+
260+
Messages auto-convert standard Markdown to Slack mrkdwn:
261+
- `**bold**``*bold*`
262+
- `# Header``*Header*` (bold on its own line)
263+
- `[text](url)``<url|text>`
264+
265+
```bash
266+
# Auto-conversion happens by default
267+
slackbuzz send '#releases' "## 🚀 v5.4.0\n- **New feature**: offline images"
268+
269+
# Use --blocks for Block Kit rendering (richer formatting, auto-splits long messages)
270+
slackbuzz send '#releases' --blocks "## Release Notes\n- *Feature*: offline images"
271+
272+
# Use --raw to disable auto-conversion
273+
slackbuzz send '#dev' --raw "**this stays as double asterisks**"
274+
```
275+
276+
Formatting hints are shown on stderr when Markdown syntax is detected and converted.
275277

276278
## Agent Mode
277279

0 commit comments

Comments
 (0)