关于 producthunt
producthunt 技能通过官方 GraphQL API 获取 Product Hunt 的帖子、主题、用户和合集信息,适合查询与浏览平台内容。它提供按主题、日期和用户等条件调用的脚本。
主要功能
- 01按 slug 或 ID 获取帖子
- 02查询精选及主题帖子
- 03搜索和列出主题
- 04获取用户及其帖子
- 05查询合集和精选合集
- 06获取帖子评论
适用场景
- 01浏览当天精选产品
- 02查找某个主题下的产品
- 03查看用户发布记录
- 04检查帖子评论和合集
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ resciencelab/ opc-skills --skill producthunt安装后在 Claude Code 中输入/producthunt确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
.claude-plugin/plugin.jsonscripts/credential.pyget_collection.pyget_collections.pyget_post_comments.pyget_post.pyget_posts.pyget_topic.pyget_topics.pyget_user_posts.pyget_user.pyproducthunt_api.py详细介绍
ProductHunt Skill
通过官方 GraphQL API 获取 Product Hunt 的帖子、主题、用户和合集。
先决条件
在 ~/.zshrc 中设置访问令牌:
export PRODUCTHUNT_ACCESS_TOKEN="your_developer_token"
从此处获取令牌:https://www.producthunt.com/v2/oauth/applications
快速检查:
cd <skill_directory>
python3 scripts/get_posts.py --limit 3
命令
所有命令均在该 Skill 目录中运行。
帖子
python3 scripts/get_post.py chatgpt # Get post by slug
python3 scripts/get_post.py 12345 # Get post by ID
python3 scripts/get_posts.py --limit 20 # Today's featured posts
python3 scripts/get_posts.py --topic ai --limit 10 # Posts in topic
python3 scripts/get_posts.py --after 2026-01-01 # Posts after date
python3 scripts/get_post_comments.py POST_ID --limit 20
主题
python3 scripts/get_topic.py artificial-intelligence # Get topic by slug
python3 scripts/get_topics.py --query "AI" --limit 20 # Search topics
python3 scripts/get_topics.py --limit 50 # Popular topics
用户
python3 scripts/get_user.py rrhoover # Get user by username
python3 scripts/get_user_posts.py rrhoover --limit 20 # User's posts
合集
python3 scripts/get_collection.py SLUG_OR_ID # Get collection
python3 scripts/get_collections.py --featured --limit 20
API 信息
- 端点:https://api.producthunt.com/v2/api/graphql
- 类型:GraphQL
- 速率限制:每 15 分钟 6250 个复杂度点
- 文档:https://api.producthunt.com/v2/docs
评论
支持 Markdown