SKILL.md
只读
名称
producthunt
描述
搜索并检索 Product Hunt 的内容。通过 GraphQL API 获取帖子、话题、用户和合集。当用户提及 Product Hunt、PH 或产品发布时使用。
ProductHunt 技能
通过官方 GraphQL API 从 Product Hunt 获取帖子、话题、用户和合集。
前提条件
在 ~/.zshrc 中设置访问令牌:
export PRODUCTHUNT_ACCESS_TOKEN="你的开发者令牌"
从以下地址获取你的令牌:https://www.producthunt.com/v2/oauth/applications
快速检查:
cd <技能目录>
python3 scripts/get_posts.py --limit 3
命令
所有命令在技能目录下运行。
帖子
python3 scripts/get_post.py chatgpt # 通过 slug 获取帖子
python3 scripts/get_post.py 12345 # 通过 ID 获取帖子
python3 scripts/get_posts.py --limit 20 # 今日精选帖子
python3 scripts/get_posts.py --topic ai --limit 10 # 话题下的帖子
python3 scripts/get_posts.py --after 2026-01-01 # 指定日期后的帖子
python3 scripts/get_post_comments.py POST_ID --limit 20
话题
python3 scripts/get_topic.py artificial-intelligence # 通过 slug 获取话题
python3 scripts/get_topics.py --query "AI" --limit 20 # 搜索话题
python3 scripts/get_topics.py --limit 50 # 热门话题
用户
python3 scripts/get_user.py rrhoover # 通过用户名获取用户
python3 scripts/get_user_posts.py rrhoover --limit 20 # 用户的帖子
合集
python3 scripts/get_collection.py SLUG_OR_ID # 获取合集
python3 scripts/get_collections.py --featured --limit 20
API 信息
- 端点:https://api.producthunt.com/v2/api/graphql
- 类型:GraphQL
- 速率限制:6250 复杂度点 / 15 分钟
- 文档:https://api.producthunt.com/v2/docs






