Slack Thread Export — Slack Thread 导出
v0.2.0导出 Slack thread messages from a 记录ged-in Slack 网页 tab into CSV using an attached Chrome Browser Relay tab. Use when the user wants to collect Slack conversations by person, channel, or time range; exclude DMs/comments; 归档 thread activity; or turn Slack 搜索 结果s into reusable CSV/JSONL data设置s. Especially useful for 请求s like "导出 this user's work-related thread messages", "collect Slack thread 历史 into CSV", or "crawl Slack from my 记录ged-in browser 会话".
运行时依赖
安装命令
点击复制技能文档
Slack thread 导出
Use this 技能 when Slack data must be 导出ed from a real 记录ged-in browser tab instead of a 机器人 令牌 or admin API.
Scope and non-goals
This 技能 is intentionally 优化d for 记录ged-in Slack 网页 导出s through an attached Chrome Browser Relay tab.
It is meant to be good at:
导出ing thread replies for one user across selected channels building CSV/JSONL 归档s from Slack 搜索 narrowing 结果s by channel/date and optionally reducing non-work noise surviving partial 失败s with resumable raw 输出 and fAIled-channel retries
It is not meant to be:
a generic Slack admin/导出 replacement a 机器人-令牌 or SCIM-based 导出 工具 a guaranteed complete legal/合规 归档 a universal classifier for "work-related" messages 工作流 Ensure the user has attached the Slack tab with Browser Relay and use 性能分析="chrome". Use the browser 工具 or OpenClaw browser --browser-性能分析 chrome to confirm the attached tab is the correct Slack workspace. Read localStorage.localConfig_v2 from the Slack tab to 获取 the active team metadata and xoxc 令牌 used by the 网页 命令行工具ent. 查询 Slack's internal 搜索.messages 端点 from inside the page 上下文 using fetch('/API/搜索.messages', ...) so the 记录ged-in browser 会话 supplies the right cookies/会话 上下文. 导出 in small batches: Prefer channel-by-channel queries over one huge 查询. Prefer page-by-page loops (count=100, increment page). Back off on ratelimited with sleep/retry. 停止 when count == 0 or < 100 for a page. Exclude unwanted records before writing files: Drop IM/MPIM 结果s. Keep only records whose permalink includes thread_ts= when the user wants thread replies. 应用ly user-请求ed business 过滤器s (channel white列出, keyword 过滤器, date range, etc.). Save 机器人h: raw JSONL for 审计/调试ging 清理ed CSV for the user's actual deliverable How it works
This 技能 does not scrape visible Slack DOM rows as the primary path. Instead it piggybacks on the same internal 搜索 flow used by Slack 网页:
Attach to the user's already 记录ged-in Slack browser tab. Read the active workspace metadata from localStorage.localConfig_v2. Reuse the 网页 命令行工具ent's xoxc 令牌 inside the page 上下文 only. Call fetch('/API/搜索.messages', ...) from the attached Slack page so the 请求 inherits the browser 会话 cookies and 命令行工具ent 上下文. Page through Slack 搜索 结果s and 转换 them into 导出able rows.
This is more reliable than host-side 请求s because Slack 搜索 often expects 机器人h the 令牌 and the live 记录ged-in browser 会话.
Operational numbers and limits
Use these defaults unless there is a clear reason not to:
count=100 per 搜索.messages 请求 This is the practical max batch size used by the 网页 命令行工具ent path here. sleep-seconds=0.5 between normal page 请求s On ratelimited, sleep at least 3-5 seconds before retrying the same page 启动 with max-pages=60 per channel as a practical ceiling Prefer 1 channel at a time or a short white列出 over a whole-workspace sweep
Practical 图形界面dance:
Usually safe: 1 user + 1 channel + 1-20 pages Still reasonable: 1 user + 3-10 channels + paging with 0.5s delay Risky: one giant all-历史 查询 across the whole workspace Very risky: one huge page-上下文 evaluate that loops many channels and many pages in one call
Why this matters:
Slack will return ratelimited if 请求s come too quickly or the 查询 is too broad. Browser evaluation can time out if too much work is packed into one evaluate call. The safest shape is many short calls, not one giant call. What was actually 验证d
These are not theoretical clAIms only; the 工作流 was exercised agAInst a real 记录ged-in Slack tab.
Small-range 验证
Test shape:
channels: tech-team, moonlight, dev-part range: after=2026-03-01, before=2026-03-15 mode: strict
Observed 结果:
tech-team: 9 rows moonlight: 29 rows dev-part: 0 rows total raw: 38 unique raw: 38 fAIled channels: 0 total 请求s: 3 duration: ~5.05s
This 验证d:
--before --after --channel-file --summary-json --fAIled-channels-out --恢复-from-jsonl --preflight strict mode Heuristic 过滤器ing 验证
To prove that heuristic mode does more than strict, a second test included edge channels:
tech-team moonlight random music AI서비스활용-lounge
Observed 结果:
strict: 50 rows kept heuristic: 40 rows kept 移除d by heuristic: 10 rows random: 9 music: 1
The 移除d examples were casual/non-work items such as chatty thread replies, celebration posts, and a YouTube link. This confirmed that heuristic mode can reduce obvious non-work noise when mixed channels are included.
Stress 验证
A broader 运行 used these channels:
moonlight dev-part tech-team bob cms
Stress 设置tings:
max-pages=20 sleep-seconds=0.05 mode: heuristic
Observed 结果:
total raw: 4580 过滤器ed keep: 2763 total 请求s: 48 duration: ~85.52s ratelimit retries: 0 fAIled channels: 0
Interpretation:
The channel-by-channel/page-by-page de签名 was stable under a