Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器clawhub未标认证来源可访问clear审计提醒

slack-thread-exportSlack thread 导出

Agent Skill

用于处理 Slack 工作区里的频道、消息、线程、用户和通知信息。它适合让 Agent 查询团队沟通记录、整理上下文、回复线程或辅助协作提醒。使用时需要确认机器人或用户 token 是否具备目标频道访问权,私有频道和历史消息通常有额外权限限制;发送消息、@成员或批量读取对话时,应避免泄露内部讨论和敏感工作信息。

总安装

9,337

周安装

397

GitHub Stars

公开资料未说明

下载量

3,271
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:slack-thread-export(Slack thread 导出)
来源仓库:https://github.com/devdha/slack-thread-export
安装命令:
openclaw skills install slack-thread-export
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install slack-thread-export

简介

slack-thread-export 用于将 Slack 线程消息导出为 CSV 文件。

  • 适合在 OpenClaw 中收集讨论内容、归档决策记录或分析互动模式。
  • 通过 clawhub 安装,需配合 Chrome 扩展使用登录会话。
  • 安装前应确认导出路径权限与 CSV 格式兼容性。
  • 仅支持当前登录账户可见内容,私有线程可能无法完整导出。

SKILL.md

name
slack-thread-export
description
Export Slack thread messages from a logged-in Slack web 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; archive thread activity; or turn Slack search results into reusable CSV/JSONL datasets. Especially useful for requests like "export this user's work-related thread messages", "collect Slack thread history into CSV", or "crawl Slack from my logged-in browser session".

Slack thread export

Use this skill when Slack data must be exported from a real logged-in browser tab instead of a bot token or admin API.

Scope and non-goals

This skill is intentionally optimized for logged-in Slack Web exports through an attached Chrome Browser Relay tab.

It is meant to be good at:

  • exporting thread replies for one user across selected channels
  • building CSV/JSONL archives from Slack search
  • narrowing results by channel/date and optionally reducing non-work noise
  • surviving partial failures with resumable raw output and failed-channel retries

It is not meant to be:

  • a generic Slack admin/export replacement
  • a bot-token or SCIM-based export tool
  • a guaranteed complete legal/compliance archive
  • a universal classifier for "work-related" messages

Workflow

  1. Ensure the user has attached the Slack tab with Browser Relay and use profile="chrome".
  2. Use the browser tool or openclaw browser --browser-profile chrome to confirm the attached tab is the correct Slack workspace.
  3. Read localStorage.localConfig_v2 from the Slack tab to get the active team metadata and xoxc token used by the web client.
  4. Query Slack's internal search.messages endpoint from inside the page context using fetch('/api/search.messages', ...) so the logged-in browser session supplies the right cookies/session context.
  5. Export in small batches:

- Prefer channel-by-channel queries over one huge query. - Prefer page-by-page loops (count=100, increment page). - Back off on ratelimited with sleep/retry. - Stop when count == 0 or < 100 for a page.

  1. Exclude unwanted records before writing files:

- Drop IM/MPIM results. - Keep only records whose permalink includes thread_ts= when the user wants thread replies. - Apply user-requested business filters (channel whitelist, keyword filter, date range, etc.).

  1. Save both:

- raw JSONL for audit/debugging - cleaned CSV for the user's actual deliverable

How it works

This skill does not scrape visible Slack DOM rows as the primary path. Instead it piggybacks on the same internal search flow used by Slack Web:

  1. Attach to the user's already logged-in Slack browser tab.
  2. Read the active workspace metadata from localStorage.localConfig_v2.
  3. Reuse the web client's xoxc token inside the page context only.
  4. Call fetch('/api/search.messages', ...) from the attached Slack page so the request inherits the browser session cookies and client context.
  5. Page through Slack search results and transform them into exportable rows.

This is more reliable than host-side requests because Slack search often expects both the token and the live logged-in browser session.

Operational numbers and limits

Use these defaults unless there is a clear reason not to:

  • count=100 per search.messages request

- This is the practical max batch size used by the web client path here.

  • sleep-seconds=0.5 between normal page requests
  • On ratelimited, sleep at least 3-5 seconds before retrying the same page
  • Start with max-pages=60 per channel as a practical ceiling
  • Prefer 1 channel at a time or a short whitelist over a whole-workspace sweep

Practical guidance:

  • 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-history query across the whole workspace
  • Very risky: one huge page-context evaluate that loops many channels and many pages in one call

Why this matters:

  • Slack will return ratelimited if requests come too quickly or the query 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 validated

These are not theoretical claims only; the workflow was exercised against a real logged-in Slack tab.

Small-range validation

Test shape:

  • channels: tech-team, moonlight, dev-part
  • range: after=2026-03-01, before=2026-03-15
  • mode: strict

Observed result:

  • tech-team: 9 rows
  • moonlight: 29 rows
  • dev-part: 0 rows
  • total raw: 38
  • unique raw: 38
  • failed channels: 0
  • total requests: 3
  • duration: ~5.05s

This validated:

  • --before
  • --after
  • --channel-file
  • --summary-json
  • --failed-channels-out
  • --resume-from-jsonl
  • --preflight
  • strict mode

Heuristic filtering validation

To prove that heuristic mode does more than strict, a second test included edge channels:

  • tech-team
  • moonlight
  • random
  • music
  • ai서비스활용-lounge

Observed result:

  • strict: 50 rows kept
  • heuristic: 40 rows kept
  • removed by heuristic: 10 rows

- random: 9 - music: 1

The removed 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 validation

A broader run used these channels:

  • moonlight
  • dev-part
  • tech-team
  • bob
  • cms

Stress settings:

  • max-pages=20
  • sleep-seconds=0.05
  • mode: heuristic

Observed result:

  • total raw: 4580
  • filtered keep: 2763
  • total requests: 48
  • duration: ~85.52s
  • ratelimit retries: 0
  • failed channels: 0

Interpretation:

  • The channel-by-channel/page-by-page design was stable under a moderately aggressive run.
  • This does not guarantee immunity from rate limiting in all workspaces.
  • It does show that the design is more robust than one giant search/evaluate call.

Important constraints

  • Do not assume the Slack API is callable directly from host Python with only the xoxc token. In practice the browser session context matters; call from the page context first.
  • Do not try one giant all-history query first; Slack rate-limits and long browser evaluations will time out.
  • Do not claim the export is complete if channel-level calls failed. Report partial coverage clearly.
  • Treat the xoxc token and any cookies as sensitive. Do not echo them back to the user or store them in exported files.
  • Do not silently widen "work-related" to mean everything. If the user wants "all work-related threads," state clearly that this is a heuristic unless they also provide a channel whitelist, date range, or keyword rule.
  • Do not present heuristic filtering as moderation-, compliance-, HR-, or legal-grade classification.

Publish-ready status

At this stage, the skill is suitable for beta/publication-candidate use when these caveats are respected:

  • Requires an attached, logged-in Slack web tab via Browser Relay
  • Relies on Slack web client behavior that may change over time
  • Uses heuristic filtering for "work-like" exports unless strict or raw mode is chosen
  • Is strongest for operator-led exports, not unattended compliance archiving

If publishing publicly, describe it as an advanced/browser-relay Slack export skill rather than a universal Slack export solution.

Failure semantics

Handle failures explicitly:

  • invalid_auth

- Meaning: wrong tab, logged-out tab, or a host-side request that lacks the browser session context. - Fix: confirm the attached Slack tab is logged in and re-run from page context.

  • ratelimited

- Meaning: too many requests too quickly or query scope too broad. - Fix: sleep and retry the same page; reduce channel count; add after: date filters.

  • browser evaluate timeout

- Meaning: too much work packed into one evaluate call. - Fix: split by channel and page; keep each evaluate short.

  • partial export

- Meaning: some channels completed and some failed. - Fix: save raw progress, report completed channels, and retry only failed channels.

Recommended query patterns

Use these building blocks:

  • User filter: from:<@USER_ID>
  • Thread-only: is:thread
  • Channel filter: in:#channel-name
  • Time filter if needed: after:YYYY-MM-DD

Typical query:

from:<@UXXXX> is:thread in:#tech-team after:2026-01-01

Preferred output columns

Use these columns unless the user asks otherwise:

  • datetime_utc
  • channel_name
  • channel_id
  • thread_ts
  • username
  • text
  • permalink
  • source_query_channel

Scripts

  • scripts/export_slack_threads.py — channel-by-channel Slack thread exporter driven through the attached Chrome relay tab.
  • scripts/retry_failed_channels.py — rerun export using the failed-channels-out file from a previous run.

Run scripts with explicit parameters instead of editing code in place.

Example:

python3 skills/slack-thread-export/scripts/export_slack_threads.py \
  --target-id <attached-tab-id> \
  --user-id U04SFF458BC \
  --team-id T01AY79ELUC \
  --channels tech-team moonlight dev-part \
  --after 2026-01-01 \
  --before 2026-03-15 \
  --mode heuristic \
  --failed-channels-out exports/slack/failed.txt \
  --summary-json exports/slack/summary.json \
  --out-csv exports/slack/out.csv \
  --out-jsonl exports/slack/out.jsonl

If coverage is too broad

Narrow the export before retrying:

  • Use a shorter date range.
  • Use channel whitelist first.
  • Export raw first, then run a second-pass filter for “work-like” heuristics.
  • Sample channel distribution first, then choose high-signal channels before doing the full export.

Retry workflow

When a run is partial:

  1. Keep the raw JSONL from the first run.
  2. Save failed channels with --failed-channels-out.
  3. Retry only those channels using scripts/retry_failed_channels.py.
  4. If needed, pass --resume-from-jsonl so the retry output starts from the previous raw capture instead of rebuilding from zero.

Retry example:

python3 skills/slack-thread-export/scripts/retry_failed_channels.py \
  --target-id <attached-tab-id> \
  --user-id U04SFF458BC \
  --team-id T01AY79ELUC \
  --failed-channels-file exports/slack/failed.txt \
  --resume-from-jsonl exports/slack/out.jsonl \
  --out-csv exports/slack/retry.csv \
  --out-jsonl exports/slack/retry.jsonl \
  --summary-json exports/slack/retry-summary.json \
  --failed-channels-out exports/slack/retry-failed.txt

Supported options

The script now supports these operational controls:

  • --channel-file — read channel names from a file
  • --after / --before — date windowing
  • --resume-from-jsonl — continue from a previous raw export
  • --failed-channels-out — save failed channels for targeted retry
  • --summary-json — save structured run summary
  • --preflight — sample page-1 volume per channel before full export
  • --mode strict|raw|heuristic

- strict: export only the requested channel/date slice, no work-like heuristic filtering - raw: keep everything collected after the query constraints; useful for audit/review datasets - heuristic: apply work-related channel/text filtering after collection

  • --keyword / --channel-hint — extend heuristic filtering for a specific workspace

Filtering guidance

For “work-related” exports, prefer this order:

  1. Channel whitelist / channel-name hints
  2. Explicit date range
  3. Keyword heuristic on message text
  4. Manual review for edge channels

If the user says "all work-related threads", explain that this is heuristic unless they provide a strict channel whitelist or date range.

Mode selection guide

Use strict when:

  • the user already knows which channels matter
  • the goal is faithful export within explicit channel/date constraints
  • the user does not want extra classifier behavior

Use raw when:

  • the user wants a review dataset first
  • a human or later pipeline will do the filtering
  • auditability matters more than noise reduction

Use heuristic when:

  • the user asks for "work-related" rather than a strict channel list
  • there are mixed-signal channels in scope
  • reducing obvious non-work chatter is valuable

If unsure, start with strict or raw, then derive a second-pass heuristic export for comparison.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

93.3%
按下载量换算3,052

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills