← 返回 Skills 市场
marcindudekdev

Apify HN Scraper

作者 Marcin Dudek · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
367
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install apify-hn-scraper
功能描述
Scrape Hacker News stories, comments, and discussions. Use when user asks to search HN, find Hacker News posts, monitor tech discussions, or extract HN data....
使用说明 (SKILL.md)

Hacker News Scraper

Scrape Hacker News using an Apify Actor via the REST API.

Actor ID

0UDODOnpTkxY3Oc90

Prerequisites

  • APIFY_TOKEN environment variable must be set
  • curl and jq must be available

Workflow

Step 1: Confirm parameters with user

Ask what they want to scrape. Supported input fields:

  • searchTerms (array of strings) - keywords to search
  • maxResults (integer) - max stories to return
  • sortBy (string) - "points", "date", or "relevance"
  • includeComments (boolean) - include comment threads

Step 2: Run the Actor

RESULT=$(curl -s -X POST "https://api.apify.com/v2/acts/0UDODOnpTkxY3Oc90/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms": ["TERM"], "maxResults": 30}')
echo "$RESULT" | jq '.'

Step 3: Poll and fetch (if async)

RUN_ID=$(curl -s -X POST "https://api.apify.com/v2/acts/0UDODOnpTkxY3Oc90/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms": ["TERM"], "maxResults": 100}' | jq -r '.data.id')
curl -s "https://api.apify.com/v2/actor-runs/$RUN_ID?token=$APIFY_TOKEN" | jq -r '.data.status'
curl -s "https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items?token=$APIFY_TOKEN" | jq '.'

Step 4: Present results

Summarize: top stories by points, comment counts, domains, trends. Offer JSON/CSV export.

Error Handling

  • If APIFY_TOKEN not set: export APIFY_TOKEN=your_token
  • If run FAILS: check log endpoint
安全使用建议
This skill appears to do what it says: call a specific Apify Actor to scrape Hacker News and return results. Before installing or running it: 1) Verify the actor ID (0UDODOnpTkxY3Oc90) and its publisher on Apify so you trust the code being executed. 2) Treat APIFY_TOKEN as a secret — avoid putting it in commands that include the token in the URL (those can appear in process lists or logs). Instead use an Authorization header (e.g., -H "Authorization: Bearer $APIFY_TOKEN") or other secure call patterns. 3) Run commands only in a trusted environment (not on shared shells) and avoid copying token-bearing commands into shell history; rotate the token if you suspect exposure. 4) Limit the token's permissions if possible and review returned data before sharing. If you want, I can rewrite the SKILL.md curl examples to avoid exposing the token and add safer polling/error-handling snippets.
功能分析
Type: OpenClaw Skill Name: apify-hn-scraper Version: 1.0.0 The skill facilitates Hacker News scraping via the Apify API but contains vulnerabilities in the SKILL.md command templates. Specifically, it passes the sensitive APIFY_TOKEN within the URL query string and lacks input sanitization for the TERM placeholder in curl commands, which could lead to credential exposure in logs or shell injection if user input is not properly escaped by the AI agent. The Actor ID 0UDODOnpTkxY3Oc90 is a legitimate Apify actor, suggesting the flaws are unintentional rather than malicious.
能力评估
Purpose & Capability
Name/description (scraping Hacker News via an Apify Actor) match the required items: APIFY_TOKEN, curl, and jq. Nothing requested appears unrelated to scraping HN through Apify.
Instruction Scope
SKILL.md contains only Apify API calls and result handling, and prompts the user for scraping parameters — scope is appropriate. However, the provided curl examples include the token as a query parameter in the URL (token=$APIFY_TOKEN), which can expose the secret in process listings, logs, or shell history; recommend using an Authorization header (Bearer) or other safer approaches.
Install Mechanism
Instruction-only skill with no install spec and no code files — low risk from installation. It relies on curl/jq being present on PATH, which is reasonable.
Credentials
Only APIFY_TOKEN is required (declared as primaryEnv) which is proportionate to calling Apify. Reminder: APIFY_TOKEN is sensitive — the skill's examples risk exposing it if run as-is.
Persistence & Privilege
always:false and default invocation settings — the skill does not request permanent/system-wide presence or elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install apify-hn-scraper
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /apify-hn-scraper 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release - scrape Hacker News stories and comments
元数据
Slug apify-hn-scraper
版本 1.0.0
许可证
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Apify HN Scraper 是什么?

Scrape Hacker News stories, comments, and discussions. Use when user asks to search HN, find Hacker News posts, monitor tech discussions, or extract HN data.... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 367 次。

如何安装 Apify HN Scraper?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install apify-hn-scraper」即可一键安装,无需额外配置。

Apify HN Scraper 是免费的吗?

是的,Apify HN Scraper 完全免费(开源免费),可自由下载、安装和使用。

Apify HN Scraper 支持哪些平台?

Apify HN Scraper 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Apify HN Scraper?

由 Marcin Dudek(@marcindudekdev)开发并维护,当前版本 v1.0.0。

💬 留言讨论