微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🧵

终端直连 Threads 社交平台

Yarn - Control and Access Threads.com via the CLI · vv0.1.3
效率 安全 C 级 作者 jeizzon 公开目录收录
1k 下载 0 安装 3.6k 收藏 17 浏览

简介

通过 CLI 与 Meta 的 Threads 社交平台交互,支持浏览信息流、点赞/收藏内容、搜索用户、发帖回复及引用功能。

原始描述

Interact with Threads (by Meta) via the yarn-threads-cli. Use when the user wants to read their home feed, likes, saved posts, or a specific thread; look up...

通过你的 Agent 添加

安装目录:yarn-threads/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/yarn-control-and-access-threads-com-via-the-cli/
Codex CLI~/.codex/skills/yarn-control-and-access-threads-com-via-the-cli/
DeepSeek Harness~/.agents/skills/yarn-control-and-access-threads-com-via-the-cli/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


name: yarn-threads description: Interact with Threads (by Meta) via the yarn-threads-cli. Use when the user wants to read their home feed, likes, saved posts, or a specific thread; look up a profile; search users; or post, reply, or quote on Threads. Requires yarn-threads-cli installed (npm install -g yarn-threads-cli). Auth via Chrome/Firefox profile or manual session tokens.

yarn-threads

CLI for Threads (by Meta). Supports reading, browsing, and posting.

Auth

Three options (in order of preference):

Chrome profile (recommended)

yarn-threads --chrome-profile-dir "/path/to/Chrome/User Data/Default" <command>

Common paths:

  • macOS Chrome: ~/Library/Application Support/Google/Chrome/Default
  • macOS Chromium: ~/.config/chromium/Default
  • Linux Chrome: ~/.config/google-chrome/Default

Firefox profile

yarn-threads --firefox-profile default-release <command>

Manual tokens (from browser DevTools → Application → Cookies on threads.net)

yarn-threads --session-id <sessionid> --csrf-token <csrftoken> --user-id <ds_user_id> <command>

Verify auth: yarn-threads whoami

Key Commands

# Browse
yarn-threads home                        # Home feed
yarn-threads likes                       # Your liked posts
yarn-threads saved                       # Your saved/bookmarked posts

# Read
yarn-threads read <url-or-code>          # Single post
yarn-threads thread <url-or-code>        # Post + all replies
yarn-threads replies <url-or-code>       # Replies only

# Profiles
yarn-threads about <handle>              # User profile info
yarn-threads user-posts <handle>         # User's posts
yarn-threads followers <handle>          # User's followers
yarn-threads following <handle>          # Who user follows

# Search
yarn-threads search <query>              # Search users

# Post / Engage
yarn-threads post "text"                 # Create new post
yarn-threads reply <url-or-code> "text"  # Reply to a post
yarn-threads quote <url-or-code> "text"  # Quote a post

Output Flags

  • --json — structured JSON output (use for parsing media URLs, metadata)
  • --plain — stable plain text, no emoji/color (good for piping)
  • --json-full — includes raw API response (debugging)

Pagination

Feed/list commands support:

  • --all — fetch all pages
  • --max-pages <n> — limit pages
  • --cursor <cursor> — start from a specific page cursor

Media

When using --json, posts include CDN URLs for images and videos in the media fields. Analyze these with the image tool for visual context.

Examples

# Get last 2 pages of likes as JSON
yarn-threads likes --max-pages 2 --json

# Read a specific thread
yarn-threads read https://www.threads.net/@user/post/abc123

# Post with restricted replies
yarn-threads post "Hello Threads" --reply-control accounts_you_follow

# Get a profile
yarn-threads about zuck

See references/commands.md for full flag reference per command.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

threadsclimetasocial-mediaautomationapi-client

同类 Skill