Token导航 LogoToken导航

Agent Skill · 研究检索

threads-api(threads API 搜索)

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

threads-api 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 39,020。

总安装 1,479周安装 61GitHub Stars 31下载 483核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:threads-api(threads API 搜索)
来源仓库:https://github.com/rawveg/skillsforge-marketplace
仓库路径:skills/threads-api
安装命令:
npx skills add https://github.com/rawveg/skillsforge-marketplace --skill threads-api
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/rawveg/skillsforge-marketplace --skill threads-api

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于辅助 API 设计、接口文档编写及服务集成说明。适合梳理 endpoint、生成 OpenAPI 草稿或检查字段命名规范。使用时需结合实际业务语义与鉴权机制,避免虚构数据结构。

安装命令:npx skills add https://github.com/rawveg/skillsforge-marketplace --skill threads-api。建议优先参考现有代码或 schema 文件,确保接口定义准确。

来源仓库内路径:skills/threads-api

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/rawveg/skillsforge-marketplace --skill threads…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

threads-api 怎么安装?

在终端执行 npx skills add https://github.com/rawveg/skillsforge-marketplace --skill threads-api。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

threads-api 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

threads-api 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

threads-api 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

threads-api 用的人多吗?

公开数据是累计安装 1,479 次,近一周安装 61 次,下载 483 次,GitHub 31 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

threads-api 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
threads-api

threads API 搜索 · 本页

1,47931接触敏感数据MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Threads API Skill

Comprehensive assistance with Meta's Threads API development for building applications that integrate with the Threads social platform.

When to Use This Skill

This skill should be triggered when you are:

  • Building Threads integrations - Creating apps that post to or read from Threads
  • Implementing authentication - Setting up OAuth flows for Threads API access
  • Working with media uploads - Uploading images, videos, or carousel posts to Threads
  • Managing user content - Publishing, retrieving, or managing Threads posts
  • Fetching analytics - Retrieving insights and metrics for Threads content
  • Handling webhooks - Processing real-time updates from Threads
  • Troubleshooting API errors - Debugging authentication, rate limits, or API responses
  • Reading Threads profiles - Fetching user profile data and posts

Quick Reference

Authentication - Getting an Access Token

// Step 1: Redirect user to authorization endpoint
const authUrl = `https://threads.net/oauth/authorize?client_id=${CLIENT_ID}&redirect_uri=${REDIRECT_URI}&scope=threads_basic,threads_content_publish&response_type=code`;

// Step 2: Exchange authorization code for access token
const response = await fetch('https://graph.threads.net/oauth/access_token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    client_id: CLIENT_ID,
    client_secret: CLIENT_SECRET,
    grant_type: 'authorization_code',
    redirect_uri: REDIRECT_URI,
    code: authorizationCode
  })
});

const { access_token } = await response.json();

Publishing a Text Post

// Create a simple text post
const response = await fetch(`https://graph.threads.net/v1.0/me/threads`, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${accessToken}`
  },
  body: JSON.stringify({
    media_type: 'TEXT',
    text: 'Hello from Threads API! 🎉'
  })
});

const data = await response.json();
console.log('Post ID:', data.id);

Publishing an Image Post

import requests

# Upload and publish an image
url = "https://graph.threads.net/v1.0/me/threads"
headers = {"Authorization": f"Bearer {access_token}"}

data = {
    "media_type": "IMAGE",
    "image_url": "https://example.com/image.jpg",
    "text": "Check out this image! #API"
}

response = requests.post(url, headers=headers, json=data)
post_id = response.json()["id"]
print(f"Posted image with ID: {post_id}")

Publishing a Video Post

// Step 1: Create a video container
const container = await fetch(`https://graph.threads.net/v1.0/me/threads`, {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${accessToken}` },
  body: JSON.stringify({
    media_type: 'VIDEO',
    video_url: 'https://example.com/video.mp4',
    text: 'Check out this video!'
  })
});

const { id: containerId } = await container.json();

// Step 2: Publish the container
await fetch(`https://graph.threads.net/v1.0/me/threads_publish`, {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${accessToken}` },
  body: JSON.stringify({ creation_id: containerId })
});

Fetching User Profile

import requests

# Get authenticated user's profile
url = f"https://graph.threads.net/v1.0/me"
headers = {"Authorization": f"Bearer {access_token}"}
params = {
    "fields": "id,username,name,threads_profile_picture_url,threads_biography"
}

response = requests.get(url, headers=headers, params=params)
profile = response.json()

print(f"Username: {profile['username']}")
print(f"Bio: {profile['threads_biography']}")

Fetching User's Threads

// Get user's recent threads with pagination
const response = await fetch(
  `https://graph.threads.net/v1.0/me/threads?fields=id,text,timestamp,media_url&limit=25`,
  {
    headers: { 'Authorization': `Bearer ${accessToken}` }
  }
);

const { data, paging } = await response.json();
data.forEach(thread => {
  console.log(`${thread.timestamp}: ${thread.text}`);
});

// Use paging.next for next page

Publishing a Carousel Post

import requests

# Create a carousel with multiple images
url = "https://graph.threads.net/v1.0/me/threads"
headers = {"Authorization": f"Bearer {access_token}"}

data = {
    "media_type": "CAROUSEL",
    "children": [
        {"media_type": "IMAGE", "image_url": "https://example.com/img1.jpg"},
        {"media_type": "IMAGE", "image_url": "https://example.com/img2.jpg"},
        {"media_type": "IMAGE", "image_url": "https://example.com/img3.jpg"}
    ],
    "text": "Swipe through these images! 📸"
}

response = requests.post(url, headers=headers, json=data)
carousel_id = response.json()["id"]

Retrieving Insights (Analytics)

// Get insights for a specific thread
const threadId = '123456789';
const response = await fetch(
  `https://graph.threads.net/v1.0/${threadId}/insights?metric=views,likes,replies,reposts`,
  {
    headers: { 'Authorization': `Bearer ${accessToken}` }
  }
);

const { data } = await response.json();
data.forEach(metric => {
  console.log(`${metric.name}: ${metric.values[0].value}`);
});

Error Handling Pattern

import requests

def make_threads_request(url, access_token, method='GET', **kwargs):
    """Robust error handling for Threads API requests"""
    headers = kwargs.pop('headers', {})
    headers['Authorization'] = f"Bearer {access_token}"

    try:
        response = requests.request(method, url, headers=headers, **kwargs)
        response.raise_for_status()
        return response.json()

    except requests.exceptions.HTTPError as e:
        error_data = e.response.json()
        error_code = error_data.get('error', {}).get('code')
        error_msg = error_data.get('error', {}).get('message')

        if error_code == 190:
            raise Exception(f"Invalid access token: {error_msg}")
        elif error_code == 32:
            raise Exception(f"Rate limit exceeded: {error_msg}")
        else:
            raise Exception(f"API Error {error_code}: {error_msg}")

    except requests.exceptions.RequestException as e:
        raise Exception(f"Network error: {str(e)}")

Key Concepts

Access Tokens and Permissions

  • Access Tokens: OAuth 2.0 tokens required for all API requests
  • Scopes: Define what your app can access (e.g., threads_basic, threads_content_publish, threads_manage_insights)
  • Token Expiration: Long-lived tokens (60 days) and refresh tokens for extended access

Media Types

  • TEXT: Simple text posts
  • IMAGE: Single image with optional caption
  • VIDEO: Single video with optional caption
  • CAROUSEL: Multiple images or videos in a swipeable format

Publishing Flow

  1. Container Creation: Create a media container with content
  2. Publishing: Publish the container to make it visible
  3. Two-stage process: Required for videos and carousels to allow processing time

Rate Limits

  • Rate limits vary by endpoint and access level
  • Standard rate limit: 200 calls per hour per user
  • Monitor X-Business-Use-Case-Usage header in responses
  • Implement exponential backoff for rate limit errors

Webhooks

  • Real-time notifications for events like mentions, replies, or new followers
  • Requires HTTPS endpoint for receiving notifications
  • Must validate webhook signatures for security

Reference Files

This skill includes comprehensive documentation in references/:

  • other.md - Complete Threads API documentation including:

- Authentication and authorization flows - API endpoints reference - Request/response formats - Error codes and troubleshooting - Best practices and guidelines

Use the skill's reference files when you need detailed information about specific API endpoints, parameters, or advanced features.

Working with This Skill

For Beginners

Start by understanding the authentication flow - this is the foundation of all Threads API integrations. Focus on:

  1. Setting up your Meta developer account and app
  2. Implementing OAuth 2.0 authorization
  3. Making your first API request to fetch user profile
  4. Publishing a simple text post

For Intermediate Users

Build on the basics by exploring:

  1. Media uploads (images and videos)
  2. Carousel posts for multi-image content
  3. Webhook integration for real-time updates
  4. Error handling and retry logic
  5. Rate limit management

For Advanced Users

Optimize your integration with:

  1. Insights and analytics data
  2. Batch operations for efficiency
  3. Advanced content scheduling
  4. Custom webhook event processing
  5. Multi-account management

Navigation Tips

  • Quick Reference: Use the code examples above for common tasks
  • Reference Files: Dive into references/other.md for complete API documentation
  • Authentication First: Always start with proper authentication setup
  • Test in Sandbox: Use Meta's test users and sandbox environment during development

Common Workflows

Complete Post Publishing Flow

  1. Obtain access token via OAuth flow
  2. Create media container (if using images/videos)
  3. Wait for container processing (for videos)
  4. Publish the container
  5. Retrieve post ID and insights

User Data Retrieval Flow

  1. Authenticate user
  2. Fetch user profile with required fields
  3. Retrieve user's threads with pagination
  4. Process and display content

Webhook Integration Flow

  1. Set up HTTPS endpoint
  2. Register webhook subscription
  3. Validate webhook signatures
  4. Process incoming events
  5. Respond with 200 OK status

Best Practices

  1. Security

- Never expose access tokens in client-side code - Always validate webhook signatures - Use environment variables for sensitive data - Implement token refresh before expiration

  1. Performance

- Cache API responses when appropriate - Use batch requests for multiple operations - Implement pagination for large result sets - Monitor and respect rate limits

  1. User Experience

- Provide clear error messages to users - Show loading states during API calls - Handle network failures gracefully - Request only necessary permissions

  1. Content Publishing

- Validate media URLs before uploading - Check media format requirements - Add appropriate error handling for failed uploads - Consider using alt text for accessibility

Resources

Official Documentation

Developer Tools

  • Meta App Dashboard: Configure your app and manage permissions
  • Graph API Explorer: Test API calls interactively
  • Webhook Testing: Test webhook endpoints before production

Troubleshooting

Common Issues

Authentication Errors (Code 190)

  • Check access token validity
  • Verify token hasn't expired
  • Ensure correct permissions/scopes

Rate Limit Errors (Code 32)

  • Implement exponential backoff
  • Monitor API usage
  • Consider caching responses

Media Upload Failures

  • Verify media URL is publicly accessible
  • Check file format and size requirements
  • Ensure proper media_type parameter

Webhook Not Receiving Events

  • Verify endpoint is HTTPS
  • Check webhook signature validation
  • Ensure endpoint responds with 200 OK quickly

Notes

  • This skill was generated from Meta's official Threads API documentation
  • The Threads API is part of Meta's Graph API family
  • API features and endpoints may be updated by Meta - refer to official docs for latest changes
  • Some features may require additional app review or permissions from Meta

Updating

To refresh this skill with updated documentation:

  1. Visit https://developers.facebook.com/docs/threads for the latest information
  2. Re-run the documentation scraper with updated configuration
  3. The skill will be rebuilt with current API information

平台分布

Claude Code

27.8%
按下载量换算134

Antigravity

22.35%
按下载量换算108

Codex

19.47%
按下载量换算94

OpenCode

14.79%
按下载量换算71

windsurf

8.51%
按下载量换算41

trae

3.28%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills