pp-hackernews

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Hacker News — Printing Press CLI

Hacker News — Printing Press CLI

Prerequisites: Install the CLI

前置条件:安装CLI

This skill drives the
hackernews-pp-cli
binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
  1. Install via the Printing Press installer:
    bash
    npx -y @mvanhorn/printing-press install hackernews --cli-only
  2. Verify:
    hackernews-pp-cli --version
  3. Ensure
    $GOPATH/bin
    (or
    $HOME/go/bin
    ) is on
    $PATH
    .
If the
npx
install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.23+):
bash
go install github.com/mvanhorn/printing-press-library/library/media-and-entertainment/hackernews/cmd/hackernews-pp-cli@latest
If
--version
reports "command not found" after install, the install step did not put the binary on
$PATH
. Do not proceed with skill commands until verification succeeds.
本技能基于
hackernews-pp-cli
二进制文件运行。在调用本技能的任何命令前,必须确认CLI已安装。如果未安装,请先执行以下步骤:
  1. 通过Printing Press安装器安装:
    bash
    npx -y @mvanhorn/printing-press install hackernews --cli-only
  2. 验证安装:
    hackernews-pp-cli --version
  3. 确保
    $GOPATH/bin
    (或
    $HOME/go/bin
    )已添加到
    $PATH
    环境变量中。
如果
npx
安装失败(如无Node环境、离线等),可改用Go直接安装(要求Go 1.23及以上版本):
bash
go install github.com/mvanhorn/printing-press-library/library/media-and-entertainment/hackernews/cmd/hackernews-pp-cli@latest
如果安装后执行
--version
提示“command not found”,说明安装程序未将二进制文件添加到
$PATH
中。请在验证成功前不要执行技能命令。

When to Use This CLI

何时使用本CLI

Reach for hackernews-pp-cli when you need to monitor or analyze HN signal programmatically: agent-driven daily diffs, topic pulses, hiring-thread aggregation, repost checks before submitting, structured thread digests for context windows. The local store makes follow-up queries cheap and offline-friendly.
当你需要通过编程方式监控或分析HN数据时,可使用hackernews-pp-cli:Agent驱动的每日差异对比、主题热度追踪、招聘帖聚合、发布前的重复内容检查、用于上下文窗口的结构化帖子摘要。本地存储让后续查询更高效且支持离线使用。

When Not to Use This CLI

何时不使用本CLI

Do not activate this CLI for requests that require creating, updating, deleting, publishing, commenting, upvoting, inviting, ordering, sending messages, booking, purchasing, or changing remote state. This printed CLI exposes read-only commands for inspection, export, sync, and analysis.
请勿在需要创建、更新、删除、发布、评论、点赞、邀请、下单、发送消息、预订、购买或修改远程状态的请求中激活本CLI。本CLI仅提供用于查看、导出、同步和分析的只读命令。

Unique Capabilities

独特功能

These capabilities aren't available in any other tool for this API.
这些功能是其他HN API工具所不具备的。

Local snapshots that compound

可累积的本地快照

  • since
    — See exactly what climbed, fell, appeared, or dropped off the front page since your last sync.
    Reach for this when an agent wakes up daily and needs to know what shifted on HN since yesterday — without re-fetching 500 items every poll.
    bash
    hackernews-pp-cli since --json
  • controversial
    — Stories ranked by the highest comment-to-point ratio over a recent window — the discussions everyone is arguing about.
    Reach for this when you want stories with high engagement-to-approval — heated debate signal — instead of just popularity.
    bash
    hackernews-pp-cli controversial --window 7d --json
  • velocity
    — Show a story's rank trajectory over time from local snapshots — climb, plateau, or fall.
    Reach for this when an agent asks 'is this story still gaining traction or already cresting' — only meaningful answer comes from snapshots.
    bash
    hackernews-pp-cli velocity 47998158 --json
  • sync
    — Pull top/new/best/show/ask/job lists and recently-changed items into local SQLite for offline use and snapshot history.
    Run this once per day (or per hour for agents) — it is the foundation that turns since/velocity/controversial/users-stats from impossible into one SQL query.
    bash
    hackernews-pp-cli sync --resources updates --agent
  • since
    — 查看自上次同步以来,首页新增、移除、排名上升或下降的内容。
    当Agent每日启动,需要了解自昨天以来HN首页的变化时使用此命令——无需每次轮询都重新获取500条内容。
    bash
    hackernews-pp-cli since --json
  • controversial
    — 按近期窗口内的评论与点赞数比值排序的帖子——即大家争论最激烈的讨论。
    当你想要高互动率而非仅高热度的帖子时使用此命令——捕捉激烈辩论的信号。
    bash
    hackernews-pp-cli controversial --window 7d --json
  • velocity
    — 通过本地快照展示帖子的排名变化轨迹——上升、平稳或下降。
    当Agent询问“这个帖子还在获得关注还是已经热度消退”时使用此命令——只有快照能给出有意义的答案。
    bash
    hackernews-pp-cli velocity 47998158 --json
  • sync
    — 将热门/最新/精选/展示/问答/招聘列表及最近更新的内容拉取到本地SQLite中,用于离线使用和快照历史记录。
    每天运行一次(Agent可每小时运行一次)——这是让since/velocity/controversial/users-stats从不可能变为单SQL查询的基础。
    bash
    hackernews-pp-cli sync --resources updates --agent

Algolia leverage

利用Algolia功能

  • pulse
    — See per-day mentions, average score, and comment volume for any topic over the last N days.
    Reach for this when the question is 'is this topic heating up or cooling down' rather than 'what's the top story right now'.
    bash
    hackernews-pp-cli pulse rust --days 7 --agent
  • repost
    — Has this URL been posted before? Lists every prior submission, with score, comments, and date.
    Reach for this before submitting a Show HN — duplicate URLs flame out instantly; you want to know how a prior post did first.
    bash
    hackernews-pp-cli repost https://example.com/article
  • search local
    — Offline full-text search over every story and comment you have ever synced — corpus grows with use.
    Reach for this when investigating long-tail topics or replaying last quarter's research — Algolia might rank it down or drop it; your local corpus will not.
    bash
    hackernews-pp-cli search local "vector database" --limit 20 --json
  • pulse
    — 查看过去N天内任意主题的每日提及次数、平均得分和评论量。
    当问题是“这个主题在升温还是降温”而非“当前热门帖子是什么”时使用此命令。
    bash
    hackernews-pp-cli pulse rust --days 7 --agent
  • repost
    — 该URL是否曾被发布过?列出所有之前的提交记录,包括得分、评论数和日期。
    在提交Show HN帖子前使用此命令——重复URL会迅速无人问津;你需要先了解之前的帖子表现如何。
    bash
    hackernews-pp-cli repost https://example.com/article
  • search local
    — 对所有已同步的帖子和评论进行离线全文搜索——语料库会随使用不断增长。
    当调查长尾主题或回顾上季度研究时使用此命令——Algolia可能会降低其排名或删除内容,但你的本地语料库不会。
    bash
    hackernews-pp-cli search local "vector database" --limit 20 --json

Hiring-thread mining

招聘帖挖掘

  • hiring stats
    — Aggregate the last N monthly Who-is-Hiring threads: top languages, remote ratio, top companies, location distribution.
    Reach for this when you need quarterly or seasonal hiring trends — language popularity, remote-share shifts, location density — not just this month's listings.
    bash
    hackernews-pp-cli hiring stats --months 3 --agent
  • hiring companies
    — Companies that posted in M of the last N hiring threads, with first-seen, last-seen, and months-posted count.
    Reach for this when sourcing or trend-tracking — which companies are persistent hirers vs one-off posters — without scraping HNHIRING.com.
    bash
    hackernews-pp-cli hiring companies --months 6 --min-posts 3 --agent
  • hiring stats
    — 汇总过去N个月的“Who-is-Hiring”帖子:热门语言、远程岗位占比、热门公司、地域分布。
    当你需要季度或季节性招聘趋势——语言流行度、远程岗位占比变化、地域密度——而非仅当月列表时使用此命令。
    bash
    hackernews-pp-cli hiring stats --months 3 --agent
  • hiring companies
    — 在过去N个月中至少发布M次招聘帖的公司,包括首次发布时间、最后发布时间和发布次数。
    当你进行人才寻访或趋势追踪时使用此命令——了解哪些公司是持续招聘方,哪些是一次性发布方——无需抓取HNHIRING.com。
    bash
    hackernews-pp-cli hiring companies --months 6 --min-posts 3 --agent

Cross-entity local queries

跨实体本地查询

  • users stats
    — Median and p90 score across a user's submissions, plus traction buckets and hour-of-day score distribution.
    Reach for this before posting your own work to learn your traction patterns, or when sizing up a poster's history before engaging.
    bash
    hackernews-pp-cli users stats pg --json
  • users stats
    — 用户提交内容的中位数和p90得分,以及热度分组和发布时段得分分布。
    在发布自己的作品前使用此命令,了解你的热度模式;或在与发帖人互动前,了解其历史表现。
    bash
    hackernews-pp-cli users stats pg --json

Command Reference

命令参考

items — Fetch any HN item (story, comment, job, poll) by ID
  • hackernews-pp-cli items <itemId>
    — Get details for a specific story, comment, job, or poll
maxitem — Current maximum item ID
  • hackernews-pp-cli maxitem
    — Returns the largest item ID currently assigned by Hacker News
stories — Browse top, new, and best Hacker News stories
  • hackernews-pp-cli stories ask
    — Get the latest Ask HN posts
  • hackernews-pp-cli stories best
    — Get the highest-voted stories on Hacker News
  • hackernews-pp-cli stories job
    — Get the latest Hacker News job postings
  • hackernews-pp-cli stories new
    — Get the newest stories on Hacker News
  • hackernews-pp-cli stories show
    — Get the latest Show HN posts
  • hackernews-pp-cli stories top
    — Get the current top stories on Hacker News
updates — Recently changed items and profiles
  • hackernews-pp-cli updates
    — Items and user profiles that have changed recently
users — Look up Hacker News user profiles
  • hackernews-pp-cli users <userId>
    — Get a user's profile including karma and submission history
Hand-written commands
  • hackernews-pp-cli sync
    — Pull top/new/best/show/ask/job lists and recent items into the local SQLite store
  • hackernews-pp-cli search <query>
    — Full-text search Hacker News stories and comments via Algolia (use 'search local' for offline FTS)
  • hackernews-pp-cli hiring
    — Mine 'Ask HN: Who is hiring' threads (filter, stats, companies)
  • hackernews-pp-cli freelance
    — Mine 'Ask HN: Freelancer? Seeking freelancer?' threads (filter)
  • hackernews-pp-cli since
    — Show what changed on the front page since the last sync (added, removed, moved stories)
  • hackernews-pp-cli pulse <topic>
    — Show what HN is saying about a topic — per-day mentions, score, and comment volume
  • hackernews-pp-cli controversial
    — Find stories with the highest comment-to-point ratio (polarizing discussions)
  • hackernews-pp-cli repost <url>
    — Has this URL been posted on HN? Lists prior submissions with scores and dates
  • hackernews-pp-cli velocity <id>
    — Show a story's rank trajectory across local snapshots
  • hackernews-pp-cli doctor
    — Run a self-diagnostic: API reachability, store writability, config sanity
items — 通过ID获取任意HN内容(帖子、评论、招聘、投票)
  • hackernews-pp-cli items <itemId>
    — 获取特定帖子、评论、招聘或投票的详细信息
maxitem — 当前最大内容ID
  • hackernews-pp-cli maxitem
    — 返回Hacker News当前分配的最大内容ID
stories — 浏览Hacker News的热门、最新、精选帖子
  • hackernews-pp-cli stories ask
    — 获取最新的Ask HN帖子
  • hackernews-pp-cli stories best
    — 获取Hacker News上获赞最多的帖子
  • hackernews-pp-cli stories job
    — 获取最新的Hacker News招聘帖
  • hackernews-pp-cli stories new
    — 获取Hacker News上最新的帖子
  • hackernews-pp-cli stories show
    — 获取最新的Show HN帖子
  • hackernews-pp-cli stories top
    — 获取Hacker News当前的热门帖子
updates — 最近更新的内容和用户资料
  • hackernews-pp-cli updates
    — 最近更新的内容和用户资料
users — 查询Hacker News用户资料
  • hackernews-pp-cli users <userId>
    — 获取用户资料,包括 karma 和提交历史
手动编写的命令
  • hackernews-pp-cli sync
    — 将热门/最新/精选/展示/问答/招聘列表及最近内容拉取到本地SQLite存储中
  • hackernews-pp-cli search <query>
    — 通过Algolia对Hacker News帖子和评论进行全文搜索(使用'search local'进行离线全文搜索)
  • hackernews-pp-cli hiring
    — 挖掘“Ask HN: Who is hiring”帖子(筛选、统计、公司信息)
  • hackernews-pp-cli freelance
    — 挖掘“Ask HN: Freelancer? Seeking freelancer?”帖子(筛选)
  • hackernews-pp-cli since
    — 显示自上次同步以来首页的变化(新增、移除、排名变化的帖子)
  • hackernews-pp-cli pulse <topic>
    — 显示HN上关于某个主题的讨论——每日提及次数、得分和评论量
  • hackernews-pp-cli controversial
    — 查找评论与点赞数比值最高的帖子(有争议的讨论)
  • hackernews-pp-cli repost <url>
    — 该URL是否曾在HN上发布过?列出之前的提交记录,包括得分和日期
  • hackernews-pp-cli velocity <id>
    — 通过本地快照展示帖子的排名变化轨迹
  • hackernews-pp-cli doctor
    — 运行自我诊断:API可达性、存储可写性、配置合理性

Freshness Contract

新鲜度约定

This printed CLI owns bounded freshness only for registered store-backed read command paths. In
--data-source auto
mode, those paths check
sync_state
and may run a bounded refresh before reading local data.
--data-source local
never refreshes.
--data-source live
reads the API and does not mutate the local store. Set
HACKERNEWS_NO_AUTO_REFRESH=1
to skip the freshness hook without changing source selection.
Covered paths:
  • hackernews-pp-cli stories
  • hackernews-pp-cli stories ask
  • hackernews-pp-cli stories best
  • hackernews-pp-cli stories job
  • hackernews-pp-cli stories new
  • hackernews-pp-cli stories show
  • hackernews-pp-cli stories top
  • hackernews-pp-cli updates
When JSON output uses the generated provenance envelope, freshness metadata appears at
meta.freshness
. Treat it as current-cache freshness for the covered command path, not a guarantee of complete historical backfill or API-specific enrichment.
本CLI仅对已注册的基于存储的只读命令路径保证有限的新鲜度。在
--data-source auto
模式下,这些路径会检查
sync_state
,并可能在读取本地数据前进行有限的刷新。
--data-source local
从不刷新。
--data-source live
读取API且不修改本地存储。设置
HACKERNEWS_NO_AUTO_REFRESH=1
可跳过新鲜度钩子,无需更改数据源选择。
涵盖的路径:
  • hackernews-pp-cli stories
  • hackernews-pp-cli stories ask
  • hackernews-pp-cli stories best
  • hackernews-pp-cli stories job
  • hackernews-pp-cli stories new
  • hackernews-pp-cli stories show
  • hackernews-pp-cli stories top
  • hackernews-pp-cli updates
当JSON输出使用生成的来源信封时,新鲜度元数据会出现在
meta.freshness
中。将其视为涵盖命令路径的当前缓存新鲜度,而非完整历史回填或API特定增强的保证。

Finding the right command

找到合适的命令

When you know what you want to do but not which command does it, ask the CLI directly:
bash
hackernews-pp-cli which "<capability in your own words>"
which
resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code
0
means at least one match; exit code
2
means no confident match — fall back to
--help
or use a narrower query.
当你知道要做什么但不知道用哪个命令时,可直接询问CLI:
bash
hackernews-pp-cli which "<用你自己的话描述功能>"
which
会将自然语言的功能查询解析为CLI精选功能索引中最匹配的命令。退出码
0
表示至少有一个匹配项;退出码
2
表示没有确定的匹配项——请改用
--help
或更具体的查询。

Recipes

使用示例

Daily front-page diff for an agent

Agent的每日首页差异对比

bash
hackernews-pp-cli sync && hackernews-pp-cli since --json --select added,removed,moved
Sync, then diff. The --select narrows the payload to just the change deltas — agents process kilobytes instead of megabytes.
bash
hackernews-pp-cli sync && hackernews-pp-cli since --json --select added,removed,moved
先同步,再对比差异。
--select
参数将结果缩小为仅包含变化增量——Agent只需处理千字节级的数据,而非兆字节级。

Topic monitoring with selected fields

带选定字段的主题监控

bash
hackernews-pp-cli pulse openai --days 7 --agent --select buckets.day,buckets.hits,buckets.avg_score
Per-day breakdown of mentions, average score, and comment volume — using --select to pull only the trend axes from the deeply-nested response.
bash
hackernews-pp-cli pulse openai --days 7 --agent --select buckets.day,buckets.hits,buckets.avg_score
按日分解提及次数、平均得分和评论量——使用
--select
从深度嵌套的响应中仅提取趋势轴数据。

Pre-submit dupe check

提交前的重复内容检查

bash
hackernews-pp-cli repost https://example.com/article --json
Lists every prior submission of that URL with score, comments, and date — answers the 'has this been posted' question in one round-trip.
bash
hackernews-pp-cli repost https://example.com/article --json
列出该URL所有之前的提交记录,包括得分、评论数和日期——一次往返即可回答“该内容是否曾被发布”的问题。

Filter Who's Hiring for remote Go roles

筛选远程Go岗位的招聘帖

bash
hackernews-pp-cli hiring filter "(remote|REMOTE).*\\bGo\\b" --json
Regex against the latest monthly thread. The double-escaped \b is a real regex word boundary; --json gives you structured rows instead of one big match dump.
bash
hackernews-pp-cli hiring filter "(remote|REMOTE).*\\bGo\\b" --json
对最新月度帖子进行正则匹配。双转义的
\\b
是真实的正则单词边界;
--json
提供结构化行数据,而非单一匹配结果。

Quarterly hiring trend

季度招聘趋势

bash
hackernews-pp-cli hiring companies --months 6 --min-posts 3 --agent
Companies posting in 3+ of the last 6 monthly threads — first-seen, last-seen, total months. Cross-month queries you cannot do without a local store.
bash
hackernews-pp-cli hiring companies --months 6 --min-posts 3 --agent
过去6个月中至少发布3次招聘帖的公司——包括首次发布时间、最后发布时间和总发布次数。没有本地存储的话,无法进行跨月查询。

Auth Setup

认证设置

No authentication required.
Run
hackernews-pp-cli doctor
to verify setup.
无需认证。
运行
hackernews-pp-cli doctor
验证设置。

Agent Mode

Agent模式

Add
--agent
to any command. Expands to:
--json --compact --no-input --no-color --yes
.
  • Pipeable — JSON on stdout, errors on stderr
  • Filterable
    --select
    keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:
    bash
    hackernews-pp-cli items 47998158 --agent --select id,name,status
  • Previewable
    --dry-run
    shows the request without sending
  • Offline-friendly — sync/search commands can use the local SQLite store when available
  • Non-interactive — never prompts, every input is a flag
  • Read-only — do not use this CLI for create, update, delete, publish, comment, upvote, invite, order, send, or other mutating requests
在任何命令后添加
--agent
参数。等效于:
--json --compact --no-input --no-color --yes
  • 可管道传输 — stdout输出JSON,stderr输出错误信息
  • 可筛选
    --select
    保留字段子集。点路径可深入嵌套结构;数组可遍历元素。对于冗长的API,这是保持上下文精简的关键:
    bash
    hackernews-pp-cli items 47998158 --agent --select id,name,status
  • 可预览
    --dry-run
    显示请求但不发送
  • 离线友好 — 同步/搜索命令可在可用时使用本地SQLite存储
  • 非交互式 — 从不提示,所有输入均为标志参数
  • 只读 — 请勿使用本CLI执行创建、更新、删除、发布、评论、点赞、邀请、下单、发送或其他修改状态的请求

Response envelope

响应信封

Commands that read from the local store or the API wrap output in a provenance envelope:
json
{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}
Parse
.results
for data and
.meta.source
to know whether it's live or local. A human-readable
N results (live)
summary is printed to stderr only when stdout is a terminal — piped/agent consumers get pure JSON on stdout.
从本地存储或API读取数据的命令会将输出包装在来源信封中:
json
{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}
解析
.results
获取数据,
.meta.source
用于判断是实时数据还是本地数据。仅当stdout为终端时,才会将人类可读的
N results (live)
摘要打印到stderr——管道/Agent消费者仅在stdout获取纯JSON。

Agent Feedback

Agent反馈

When you (or the agent) notice something off about this CLI, record it:
hackernews-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
hackernews-pp-cli feedback --stdin < notes.txt
hackernews-pp-cli feedback list --json --limit 10
Entries are stored locally at
~/.hackernews-pp-cli/feedback.jsonl
. They are never POSTed unless
HACKERNEWS_FEEDBACK_ENDPOINT
is set AND either
--send
is passed or
HACKERNEWS_FEEDBACK_AUTO_SEND=true
. Default behavior is local-only.
Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.
当你(或Agent)发现本CLI存在问题时,可记录反馈:
hackernews-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
hackernews-pp-cli feedback --stdin < notes.txt
hackernews-pp-cli feedback list --json --limit 10
反馈条目存储在本地
~/.hackernews-pp-cli/feedback.jsonl
中。除非设置了
HACKERNEWS_FEEDBACK_ENDPOINT
并且传递了
--send
参数或设置了
HACKERNEWS_FEEDBACK_AUTO_SEND=true
,否则反馈不会被POST发送。默认行为仅存储在本地。
请写下让你意外的内容,而非bug报告。简短、具体、一句话:这样的反馈才更有价值。

Output Delivery

输出交付

Every command accepts
--deliver <sink>
. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:
SinkEffect
stdout
Default; write to stdout only
file:<path>
Atomically write output to
<path>
(tmp + rename)
webhook:<url>
POST the output body to the URL (
application/json
or
application/x-ndjson
when
--compact
)
Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.
每个命令都接受
--deliver <sink>
参数。输出会发送到指定的接收器,除了(或代替)stdout,这样Agent无需手动管道即可路由命令结果。支持三种接收器:
接收器效果
stdout
默认;仅写入stdout
file:<path>
原子性地将输出写入
<path>
(先写入临时文件再重命名)
webhook:<url>
将输出体POST到指定URL(当使用
--compact
时为
application/json
application/x-ndjson
未知的协议会被拒绝,并返回结构化错误,列出支持的协议集。Webhook失败会返回非零退出码,并在stderr记录URL和HTTP状态码。

Named Profiles

命名配置文件

A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.
hackernews-pp-cli profile save briefing --json
hackernews-pp-cli --profile briefing items 47998158
hackernews-pp-cli profile list --json
hackernews-pp-cli profile show briefing
hackernews-pp-cli profile delete briefing --yes
Explicit flags always win over profile values; profile values win over defaults.
agent-context
lists all available profiles under
available_profiles
so introspecting agents discover them at runtime.
配置文件是一组保存的标志值,可在多次调用中复用。当定时Agent每次运行都使用相同配置调用同一命令时使用此功能——即HeyGen的“Beacon”模式。
hackernews-pp-cli profile save briefing --json
hackernews-pp-cli --profile briefing items 47998158
hackernews-pp-cli profile list --json
hackernews-pp-cli profile show briefing
hackernews-pp-cli profile delete briefing --yes
显式标志始终优先于配置文件值;配置文件值优先于默认值。
agent-context
会在
available_profiles
下列出所有可用配置文件,以便自省Agent在运行时发现它们。

Exit Codes

退出码

CodeMeaning
0Success
2Usage error (wrong arguments)
3Resource not found
5API error (upstream issue)
7Rate limited (wait and retry)
10Config error
代码含义
0成功
2使用错误(参数错误)
3资源未找到
5API错误(上游问题)
7速率限制(等待后重试)
10配置错误

Argument Parsing

参数解析

Parse
$ARGUMENTS
:
  1. Empty,
    help
    , or
    --help
    → show
    hackernews-pp-cli --help
    output
  2. Starts with
    install
    → ends with
    mcp
    → MCP installation; otherwise → see Prerequisites above
  3. Anything else → Direct Use (execute as CLI command with
    --agent
    )
解析
$ARGUMENTS
  1. 为空、
    help
    --help
    → 显示
    hackernews-pp-cli --help
    输出
  2. install
    开头
    → 结尾为
    mcp
    → MCP安装;否则 → 参见上方的前置条件
  3. 其他情况 → 直接使用(带
    --agent
    参数执行CLI命令)

MCP Server Installation

MCP服务器安装

  1. Install the MCP server:
    bash
    go install github.com/mvanhorn/printing-press-library/library/media-and-entertainment/hackernews/cmd/hackernews-pp-mcp@latest
  2. Register with Claude Code:
    bash
    claude mcp add hackernews-pp-mcp -- hackernews-pp-mcp
  3. Verify:
    claude mcp list
  1. 安装MCP服务器:
    bash
    go install github.com/mvanhorn/printing-press-library/library/media-and-entertainment/hackernews/cmd/hackernews-pp-mcp@latest
  2. 注册到Claude Code:
    bash
    claude mcp add hackernews-pp-mcp -- hackernews-pp-mcp
  3. 验证:
    claude mcp list

Direct Use

直接使用

  1. Check if installed:
    which hackernews-pp-cli
    If not found, offer to install (see Prerequisites at the top of this skill).
  2. Match the user query to the best command from the Unique Capabilities and Command Reference above.
  3. Execute with the
    --agent
    flag:
    bash
    hackernews-pp-cli <command> [subcommand] [args] --agent
  4. If ambiguous, drill into subcommand help:
    hackernews-pp-cli <command> --help
    .
  1. 检查是否安装:
    which hackernews-pp-cli
    如果未找到,提供安装选项(参见顶部的前置条件)。
  2. 将用户查询与上方“独特功能”和“命令参考”中最匹配的命令对应。
  3. --agent
    参数执行:
    bash
    hackernews-pp-cli <command> [subcommand] [args] --agent
  4. 如果有歧义,查看子命令帮助:
    hackernews-pp-cli <command> --help
    .