松弛的个人

工程开发 社区

技能解读

当前原文的自动摘译,尚未人工审校。

设置

一次性:bash scripts/setup.sh 三种身份验证方法: 从 Slack 桌面应用程序自动提取 — 默认,零交互(macOS/Linux,应用程序必须关闭) 浏览器提取(指导 DevTools 步骤) 手动粘贴(如果您已有令牌)

通道标识符

使用通道 ID(来自sg channels)。格式:C...(公开)、G...(私人/团体 DM)、D...(DM)。

安全

只读 — 无发送/发布/删除命令 会话令牌 = 完全帐户访问权限。切勿公开凭据.json 使用不受支持的身份验证方法(会话令牌,而不是 OAuth)。有效,但未得到 Slack 令牌的正式祝福,有效期约为 1 年(d cookie TTL)。过期重新提取

速率限制

内置重试 429。第 2 层方法(搜索):20/分钟。第 3 级(历史):50/分钟。

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
工程开发
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@000alen · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
即装即用
是否需要外部接口密钥
不需要
兼容的系统
macOS · Linux
运行环境要求
Python >=3.11
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# slack-personal

Personal Slack workspace access via extracted session tokens (`xoxc-` + `xoxd-`). No Slack app creation or workspace admin approval needed.

## Setup

One-time: `bash scripts/setup.sh`

Three auth methods:
1. **Auto-extract** from Slack desktop app — default, zero interaction (macOS/Linux, app must be closed)
2. **Browser extraction** (guided DevTools steps)
3. **Manual paste** (if you already have tokens)

uv pins Python 3.11 automatically (needed for slacktokens LevelDB dep).

Credentials stored at `~/.config/slack-personal/credentials.json` (mode 600).

## CLI: `scripts/sg.py`

```bash
# Auth
sg auth                    # auto-extract from desktop app
sg auth --browser          # browser extraction guide
sg auth --manual           # paste tokens manually

# Browse
sg workspaces              # list accessible workspaces
sg channels [--limit N]    # list all channels with unread counts
sg info [channel-id]       # channel details or self info

# Read
sg read <channel-id> [--limit 20]      # read messages
sg search "query" [--sort timestamp]   # search across everything
sg unread [--limit 30]                 # unread summary

# Files
sg files [--channel C] [--limit 20]    # list shared files
sg download <file-url> [-o dir]        # download a file

# Export
sg export <channel-id> [--since 7d] [-o file.md]
```

## Channel identifiers

Use channel IDs (from `sg channels`). Format: `C...` (public), `G...` (private/group DM), `D...` (DM).

## Safety

- **Read-only** — no send/post/delete commands
- Session tokens = full account access. Never expose credentials.json
- Uses unsupported auth method (session tokens, not OAuth). Works but not officially blessed by Slack
- Token valid ~1 year (d cookie TTL). Re-extract when expired

## Rate limits

Built-in retry on 429. Tier 2 methods (search): 20/min. Tier 3 (history): 50/min.

## Integration with OpenClaw

```bash
cd /path/to/slack-personal && uv run sg search "keyword" --limit 10
cd /path/to/slack-personal && uv run sg unread
```

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。