Skill-Details

social-media-scout

Focused on social-platform data lookup rather than general social-media work.

ÜbereinstimmungMöglichGeprüft für soziale medien
Quelle43college/43-agent-skillsExterne Quelle
Gemeldete Installationen40Nur Popularitätssignal

Vor Nutzung prüfen

Die automatische Prüfung bewertet Relevanz, nicht Sicherheit oder Empfehlung. Lies vor der Nutzung die Quellanweisungen.

Gespeicherte Quellvorschau

SKILL.md

Dieser Auszug wurde bei der Prüfung gespeichert. Die externe Quelle enthält die vollständige und aktuelle Version.

---
name: social-media-scout
description: 跨平台社交媒体数据查询。支持抖音、TikTok、小红书、微博、B站、快手、Instagram、YouTube、Twitter、微信公众号等平台。当需要查询社交媒体账号信息、搜索内容、获取视频/帖子数据、查看评论、解析分享链接、下载视频、获取微信公众号文章列表或提取文章内容时使用此技能。
---

# Social Media Scout — 跨平台社交媒体数据查询

> 作者:43 COLLEGE 凯寓 (KAIYU) 出品
> 版本:v1.0

通过 TikHub API 获取 926+ 个社交媒体接口的数据。

## 首次配置

如果命令报错找不到 config.json、api_key 为占位符、或返回 401,读取本目录下的 `SETUP.md` 并按其中的流程引导用户完成配置。

## 跨平台兼容

| | macOS / Linux | Windows |
|---|---|---|
| Python 命令 | `python3` | `python` |
| Skill 路径 | `~/.claude/skills/social-media-scout/` | `%USERPROFILE%\.claude\skills\social-media-scout\` |
| JSON 参数 | `--args '{"key": "value"}'` | `--args "{\"key\": \"value\"}"` |

## 调用架构(重要,先读这段)

本 skill 有两条调用路径,理解这个是避免踩坑的前提:

| 模式 | 地址 | 依赖 | 适用场景 |
|------|------|------|----------|
| MCP 模式 | `https://mcp.tikhub.io/tools/call` | 需要 `tikhub-mcp-proxy.exe` 在后台运行 | 代理已启动时 |
| REST 直调 | `https://api.tikhub.io/api/v1/...` | 无额外依赖,直接 HTTP 调用 | 代理未运行时(常见) |

`call_tool()` 已实现自动降级:先尝试 MCP,404/连接失败时自动切换 REST。也可用 `rest_call()` 或 CLI `rest-call` 命令直接走 REST。

**工具名 → REST 路径映射规则**:
```
{platform}_{module}_{method} → /api/v1/{platform}/{module}/{method}
```
示例:
- `douyin_search_fetch_user_search` → `/api/v1/douyin/search/fetch_user_search`
- `douyin_web_handler_user_profile` → `/api/v1/douyin/web/handler_user_profile`

**HTTP 方法规则**:搜索类(工具名含 `_search_`)用 POST + JSON body,其余用 GET + query params。如果猜错会自动 405 重试。

## 资源位置

- 脚本目录: `scripts/`(skill 根目录下,相对路径)
- API 配置: `scripts/config.json`(含 API Key、MCP 代理路径)
- MCP 代理(Windows): 按 `config.json` 中 `mcp_proxy_exe` 路径配置
- MCP 代理(Mac): 不适用,使用 REST 直调模式即可
- TikHub 文档: https://docs.tikhub.io
- API Key 管理: https://user.tikhub.io

## 使用场景

- 查询用户资料(抖音/TikTok/小红书等)
- 搜索关键词相关的视频、笔记、帖子
- 通过分享链接解析视频数据
- 获取视频评论、用户粉丝/关注列表
- 查看平台热搜榜单
- 下载无水印视频
- 获取微信公众号文章列表(需 ghid)
- 提取微信公众号指定文章内容

## 调用方式

**所有命令必须先 cd 到 skill 根目录再执行。** Python 命令参考跨平台兼容表。

```bash
# macOS/Linux 示例(Windows 将 python3 替换为 python,单引号替换为转义双引号)

# 调用工具(MCP 优先,自动降级 REST)
python3 scripts/tikhub_client.py call <tool_name> --args '{"param": "value"}'

# 直接走 REST API(推荐,跳过 MCP 代理)
python3 scripts/tikhub_client.py rest-call <tool_name> --args '{"param": "value"}'

# 按平台列出工具
python3 scripts/tikhub_client.py list --platform douyin

# 按关键词搜索工具
python3 scripts/tikhub_client.py list --keyword search
```

Python 内联调用(推荐用于复杂任务):
```python
import os, sys
# 必须用绝对路径,确保从任何 cwd 都能加载
skill_dir = os.path.expanduser("~/.claude/skills/social-media-scout")
sys.path.insert(0, os.path.join(skill_dir, "scripts"))
from tikhub_client import call_tool, rest_call, parse_user_search_results, extract_video_url, download_file
```

## 常用工具速查

### 抖音 (douyin)

搜索类(推荐 `douyin_search_*`,比 `douyin_web_fetch_*_search_*` 更稳定):

| 场景 | 工具名 | 关键参数 |
|------|--------|----------|
| 综合搜索 | `douyin_search_fetch_general_search_v1` | `keyword`, `cursor`(0), `sort_type`("0") |
| 搜索用户 | `douyin_search_fetch_user_search` | `keyword`, `offset`("0"), `count`("10") |
| 搜索视频 | `douyin_search_fetch_video_search_v1` | `keyword`, `cursor`(0) |

用户资料:

| 场景 | 工具名 | 关键参数 |
|------|--------|----------|
| 用户资料(sec_uid) | `douyin_web_handler_user_profile` | `sec_user_id` |
| 用户资料(uid) | `douyin_web_fetch_user_profile_by_uid` | `uid` |
| 用户资料(抖音号) | `douyin_web_fetch_user_profile_by_short_id` | `short_id` |

作品获取(获取全部作品用 App 接口,Web 接口有分页深度限制约 80 条):

| 场景 | 工具名 | 关键参数 |
|------|--------|----------|
| 用户作品(App,推荐) | `douyin_app_fetch_user_post_videos` | `sec_user_id`, `max_cursor`("0"), `count`("20") |
| 用户作品(Web) | `douyin_web_fetch_user_post_videos` | `sec_user_id`, `max_cursor`("0"), `count`("50") |
| 单个视频 | `douyin_web_fetch_one_video` | `aweme_id` |
| 分享链接解析 | `douyin_web_fetch_one_video_by_share_url` | `share_url` |
| 高清视频链接 | `douyin_app_fetch_video_high_quality_play_url` | `aweme_id` |

互动数据:

| 场景 | 工具名 | 关键参数 |
|------|--------|----------|
| 视频评论 | `douyin_web_fetch_video_comments` | `aweme_id`, `cursor`("0"), `count`("20") |
| 粉丝列表 | `douyin_web_fetch_user_fans_list` | `sec_user_id`, `max_time`("0"), `count`("20") |
| 
Vollständige Quelle auf GitHub lesen (öffnet externe Seite)
Kontext

Verwandte Arbeit