Skill 技能

HackerNews Extract

HackerNews Extract 是一套面向一人公司的通用 playbook,帮助你用更少的人力完成更稳的增长、交付与决策。

更新于 2026年4月1日 One Person Company 编辑团队 Skill 执行系统

中文导读

HackerNews Extract 是一套面向一人公司的通用 playbook,帮助你用更少的人力完成更稳的增长、交付与决策。

说明: 原始步骤、命令与 API 名称保留英文,以避免参数和接口名称失真。

概览

Extract a HackerNews post (article + comments) into single clean Markdown for quick reading or LLM input. see Examples What it does Accepts an HackerNews id or url Download the linked article HTML, cleans and formats it. Fetches the Hacknews post metadata and comments. Outputs a readable combined markdown file with original article, threaded comments, and key metadata. Requirements uv installed and in PATH. Install No install beyond having uv. Dependencies will be installed automatically by uv into to a dedicated venv when run this script. Usage Workflow (Mandatory for Agents) When an agent is asked to extract a HackerNews post: Run the script with an output path: uv run --script ${baseDir}/hn-extract.py <input> -o /tmp/hn-<id>.md. Send ONE combined message: Upload the file and ask the question in the same tool call. Use the message tool (action=send, filePath="/tmp/hn-<id>.md", message="Extraction complete. Do you want me to summarize it?"). Do not output the full text or a summary directly in the chat unless specifically requested. Usage

run as uv script

uv run --script ${baseDir}/hn-extract.py <hn-id|hn-url|path/to/item.json> [-o path/to/output.md]

示例

uv run --script ${baseDir}/hn-extract.py 46861313 -o /tmp/output.md uv run --script ${baseDir}/hn-extract.py "https://news.ycombinator.com/item?id=46861313" Omit -o to print to stdout. Directories for -o are created automatically. Notes Retries are enabled for HTTP fetches. Comments are indented by thread depth. Sites requires authentication or blocks scraping may still fail.

SKILL.md 原文件

内嵌文档查看器 SKILL.md
Markdown 源文件

预览原始 SKILL.md. 下面可以直接查看完整原文。可滚动阅读、检查结构,再下载精确的 SKILL.md 原文件。

# hn-extract

HackerNews Extract
Extract a HackerNews post (article + comments) into single clean Markdown for quick reading or LLM input.
see Examples
What it does
Accepts an HackerNews id or url
Download the linked article HTML, cleans and formats it.
Fetches the Hacknews post metadata and comments.
Outputs a readable combined markdown file with original article, threaded comments, and key metadata.
Requirements
uv installed and in PATH.
Install
No install beyond having uv.
Dependencies will be installed automatically by uv into to a dedicated venv when run this script.
Usage Workflow (Mandatory for Agents)
When an agent is asked to extract a HackerNews post:
Run the script with an output path: uv run --script ${baseDir}/hn-extract.py <input> -o /tmp/hn-<id>.md.
Send ONE combined message: Upload the file and ask the question in the same tool call. Use the message tool (action=send, filePath="/tmp/hn-<id>.md", message="Extraction complete. Do you want me to summarize it?").
Do not output the full text or a summary directly in the chat unless specifically requested.
Usage
# run as uv script
uv run --script ${baseDir}/hn-extract.py <hn-id|hn-url|path/to/item.json> [-o path/to/output.md]
# Examples
uv run --script ${baseDir}/hn-extract.py 46861313 -o /tmp/output.md
uv run --script ${baseDir}/hn-extract.py "https://news.ycombinator.com/item?id=46861313"
Omit -o to print to stdout.
Directories for -o are created automatically.
Notes
Retries are enabled for HTTP fetches.
Comments are indented by thread depth.
Sites requires authentication or blocks scraping may still fail.

评论与讨论

添加评论