hackernews
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHacker News Skill
Hacker News 技能
Overview
概述
Automates Hacker News operations including submitting stories, commenting, voting, and engaging with the tech/startup community through browser automation.
通过浏览器自动化实现Hacker News操作的自动化,包括投稿、评论、投票以及与技术/创业社区互动。
Quick Install
快速安装
bash
curl -sSL https://canifi.com/skills/hackernews/install.sh | bashOr manually:
bash
cp -r skills/hackernews ~/.canifi/skills/bash
curl -sSL https://canifi.com/skills/hackernews/install.sh | bash或者手动安装:
bash
cp -r skills/hackernews ~/.canifi/skills/Setup
配置
Configure via canifi-env:
bash
undefined通过canifi-env进行配置:
bash
undefinedFirst, ensure canifi-env is installed:
首先,确保已安装canifi-env:
curl -sSL https://canifi.com/install.sh | bash
curl -sSL https://canifi.com/install.sh | bash
canifi-env set HACKERNEWS_USERNAME "your-username"
canifi-env set HACKERNEWS_PASSWORD "your-password"
undefinedcanifi-env set HACKERNEWS_USERNAME "your-username"
canifi-env set HACKERNEWS_PASSWORD "your-password"
undefinedPrivacy & Authentication
隐私与认证
Your credentials, your choice. Canifi LifeOS respects your privacy.
你的凭证,由你掌控。Canifi LifeOS 尊重你的隐私。
Option 1: Manual Browser Login (Recommended)
选项1:手动浏览器登录(推荐)
If you prefer not to share credentials with Claude Code:
- Complete the Browser Automation Setup using CDP mode
- Login to the service manually in the Playwright-controlled Chrome window
- Claude will use your authenticated session without ever seeing your password
如果你不想与Claude Code共享凭证:
- 使用CDP模式完成浏览器自动化配置
- 在Playwright控制的Chrome窗口中手动登录该服务
- Claude将使用你的已认证会话,且永远不会看到你的密码
Option 2: Environment Variables
选项2:环境变量
If you're comfortable sharing credentials, you can store them locally:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
如果你愿意共享凭证,可以将其存储在本地:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"注意:存储在canifi-env中的凭证仅能在你的本地机器上访问,绝不会被传输。
Capabilities
功能
- Submit stories and links
- Comment on posts
- Upvote content
- View top, new, and best stories
- Search posts and comments
- Access user profile
- View Ask HN and Show HN
- Track karma and submissions
- 投稿文章和链接
- 对帖子发表评论
- 为内容点赞
- 查看热门、最新和精选故事
- 搜索帖子和评论
- 访问用户个人资料
- 查看Ask HN和Show HN板块
- 追踪声望值(karma)和投稿记录
Usage Examples
使用示例
Example 1: Submit a Story
示例1:投稿故事
User: "Submit this article to Hacker News"
Claude: I'll submit that story.
- Navigate to news.ycombinator.com
- Click submit
- Enter URL and title
- Submit story
- Confirm posted用户:"将这篇文章投稿到Hacker News"
Claude:我会完成这次投稿。
- 导航至news.ycombinator.com
- 点击投稿按钮
- 输入URL和标题
- 提交投稿
- 确认发布成功Example 2: Comment on Post
示例2:评论帖子
User: "Comment on the top story about AI"
Claude: I'll add that comment.
- Navigate to top stories
- Find AI-related story
- Click to view comments
- Write thoughtful comment
- Submit reply用户:"在关于AI的热门帖子下评论"
Claude:我会添加这条评论。
- 导航至热门故事页面
- 找到与AI相关的帖子
- 点击查看评论
- 撰写有见地的评论
- 提交回复Example 3: Browse Show HN
示例3:浏览Show HN板块
User: "Check out recent Show HN posts"
Claude: I'll browse Show HN.
- Navigate to show section
- List recent Show HN submissions
- Present projects and demos
- Note upvote counts用户:"查看最近的Show HN帖子"
Claude:我会浏览Show HN板块。
- 导航至Show HN板块
- 列出最近的Show HN投稿
- 展示项目和演示内容
- 记录点赞数Example 4: Search Content
示例4:搜索内容
User: "Find HN discussions about remote work"
Claude: I'll search for that.
- Navigate to HN search (Algolia)
- Search "remote work"
- Filter by date and relevance
- Present top discussions用户:"查找HN上关于远程工作的讨论"
Claude:我会进行搜索。
- 导航至HN搜索页面(基于Algolia)
- 搜索"remote work"
- 按日期和相关性筛选
- 展示热门讨论Authentication Flow
认证流程
- Navigate to news.ycombinator.com/login via Playwright MCP
- Enter username and password from canifi-env
- Verify login by checking username in header
- Maintain session cookies
- 通过Playwright MCP导航至news.ycombinator.com/login
- 从canifi-env中读取用户名和密码并输入
- 通过检查页面头部的用户名验证登录状态
- 维护会话Cookie
Error Handling
错误处理
- Login Failed: Verify credentials, may need to wait
- Session Expired: Re-authenticate automatically
- Rate Limited: Wait before posting (HN is strict)
- Duplicate Submission: Link to existing post
- Low Karma: Some features restricted
- Dead Post: Flagged or removed content
- Comment Depth: May need to post at different level
- Submission Failed: Check URL format
- 登录失败:验证凭证,可能需要等待
- 会话过期:自动重新认证
- 速率限制:发布前等待(HN限制严格)
- 重复投稿:链接到已存在的帖子
- 声望值不足:部分功能受限
- 帖子失效:已被标记或移除的内容
- 评论层级:可能需要在不同层级发布
- 投稿失败:检查URL格式
Self-Improvement Instructions
自我改进说明
When encountering new HN features:
- Document UI changes (HN rarely changes)
- Note karma thresholds for features
- Log successful submission patterns
- Track community guidelines
遇到HN新功能时:
- 记录UI变化(HN很少更新)
- 记录功能对应的声望值阈值
- 记录成功投稿的模式
- 追踪社区准则
Notes
注意事项
- HN has strict quality standards
- Karma earned through upvotes
- Submissions may be flagged quickly
- Comments can be downvoted with karma
- No edit after brief window
- Rate limits strictly enforced
- Show HN for your own projects
- Ask HN for questions to community
- HN有严格的质量标准
- 声望值通过点赞获得
- 投稿可能会被快速标记
- 评论可能因被踩而损失声望值
- 短时间窗口后无法编辑内容
- 速率限制执行严格
- Show HN用于发布你自己的项目
- Ask HN用于向社区提问