pp-marginalrevolution

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- GENERATED FILE — DO NOT EDIT. This file is a verbatim mirror of library/media-and-entertainment/marginalrevolution/SKILL.md, regenerated post-merge by tools/generate-skills/. Hand-edits here are silently overwritten on the next regen. Edit the library/ source instead. See AGENTS.md "Generated artifacts: registry.json, cli-skills/". -->
<!-- 生成文件 — 请勿编辑。 此文件是library/media-and-entertainment/marginalrevolution/SKILL.md的精确镜像, 由tools/generate-skills/在合并后重新生成。此处的手动编辑会在下次重新生成时被静默覆盖。请改为编辑library/源文件。 参见AGENTS.md中的“生成产物:registry.json, cli-skills/”。 -->

Marginal Revolution - Printing Press CLI

Marginal Revolution - Printing Press CLI

Prerequisites: Install the CLI

前提条件:安装CLI

This skill drives the
marginalrevolution-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 marginalrevolution --cli-only
  2. Verify:
    marginalrevolution-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.26.3 or newer):
bash
go install github.com/mvanhorn/printing-press-library/library/media-and-entertainment/marginalrevolution/cmd/marginalrevolution-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.
Use this CLI for recent Marginal Revolution posts in structured form, including author/category filtering, recent-feed search, post text, comment counts, and outbound links. It was regenerated with CLI Printing Press 4.2.1 and keeps the generated v4.2 agent/MCP scaffolding while adding RSS-native helper commands.
此技能驱动
marginalrevolution-pp-cli
二进制文件。在调用此技能的任何命令之前,您必须确认CLI已安装。如果未安装,请先执行以下步骤:
  1. 通过Printing Press安装程序安装:
    bash
    npx -y @mvanhorn/printing-press install marginalrevolution --cli-only
  2. 验证安装:
    marginalrevolution-pp-cli --version
  3. 确保
    $GOPATH/bin
    (或
    $HOME/go/bin
    )已添加到
    $PATH
    环境变量中。
如果
npx
安装失败(无Node环境、离线等),可以回退到直接通过Go安装(要求Go 1.26.3或更高版本):
bash
go install github.com/mvanhorn/printing-press-library/library/media-and-entertainment/marginalrevolution/cmd/marginalrevolution-pp-cli@latest
如果安装后执行
--version
提示“command not found”,说明安装步骤未将二进制文件添加到
$PATH
中。请在验证成功前不要继续使用技能命令。
使用此CLI可以获取结构化的Marginal Revolution最新帖子,包括作者/分类筛选、近期源搜索、帖子文本、评论数和外部链接。它使用CLI Printing Press 4.2.1重新生成,保留了生成的v4.2 agent/MCP框架,同时添加了RSS原生辅助命令。

When to Use This CLI

何时使用此CLI

Use this CLI when you need current Marginal Revolution posts, categories, authors, comment counts, or cited outbound links without browser automation.
当您需要获取Marginal Revolution的当前帖子、分类、作者、评论数或引用的外部链接,且不需要浏览器自动化时,可以使用此CLI。

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仅提供用于查看、导出、同步和分析的只读命令。

Command Reference

命令参考

feed — Manage feed
  • marginalrevolution-pp-cli feed
    — Returns the current public RSS feed. The feed is XML/RSS and does not require authentication.
RSS-native commands
  • marginalrevolution-pp-cli latest --limit 10 --json
    - list recent posts
  • marginalrevolution-pp-cli latest --author Tyler --category Economics
    - filter recent posts
  • marginalrevolution-pp-cli search "ai" --agent
    - search current feed title/body/category text
  • marginalrevolution-pp-cli read <url|guid|title>
    - read a current-feed post
  • marginalrevolution-pp-cli links --limit 5
    - extract outbound links from recent posts
  • marginalrevolution-pp-cli categories
    - show category counts in the current feed
  • marginalrevolution-pp-cli authors
    - show author counts in the current feed
feed — 管理源
  • marginalrevolution-pp-cli feed
    — 返回当前公共RSS源。该源为XML/RSS格式,无需身份验证。
RSS原生命令
  • marginalrevolution-pp-cli latest --limit 10 --json
    - 列出最新帖子
  • marginalrevolution-pp-cli latest --author Tyler --category Economics
    - 筛选最新帖子
  • marginalrevolution-pp-cli search "ai" --agent
    - 搜索当前源的标题/正文/分类文本
  • marginalrevolution-pp-cli read <url|guid|title>
    - 阅读当前源中的帖子
  • marginalrevolution-pp-cli links --limit 5
    - 提取最新帖子中的外部链接
  • marginalrevolution-pp-cli categories
    - 显示当前源中的分类统计
  • marginalrevolution-pp-cli authors
    - 显示当前源中的作者统计

Scope Notes

范围说明

The public RSS feed is available to command-line clients. Marginal Revolution's WordPress JSON API and normal site-search URL returned Cloudflare browser challenges during implementation, so this CLI intentionally keeps search scoped to posts currently present in the feed.
公共RSS源对命令行客户端可用。在实现过程中,Marginal Revolution的WordPress JSON API和常规站点搜索URL会返回Cloudflare浏览器验证挑战,因此此CLI特意将搜索范围限定为当前源中存在的帖子。

Finding the right command

找到合适的命令

When you know what you want to do but not which command does it, ask the CLI directly:
bash
marginalrevolution-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
marginalrevolution-pp-cli which "<用您自己的语言描述功能>"
which
命令会将自然语言功能查询解析为此CLI curated功能索引中最匹配的命令。退出码
0
表示至少有一个匹配项;退出码
2
表示没有确定的匹配项 — 请回退到
--help
或使用更具体的查询。

Auth Setup

身份验证设置

No authentication required.
Run
marginalrevolution-pp-cli doctor
to verify setup.
无需身份验证。
运行
marginalrevolution-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
    marginalrevolution-pp-cli feed --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
  • 可管道化 — 标准输出为JSON,错误输出到标准错误
  • 可筛选
    --select
    保留字段子集。点路径可深入嵌套结构;数组可遍历元素。对于冗长API,这是保持上下文精简的关键:
    bash
    marginalrevolution-pp-cli feed --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
表明数据是实时的还是本地的。只有当标准输出是终端时,才会向标准错误打印人类可读的
N results (live)
摘要 — 管道/agent消费者会在标准输出获取纯JSON。

Agent Feedback

Agent反馈

When you (or the agent) notice something off about this CLI, record it:
marginalrevolution-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
marginalrevolution-pp-cli feedback --stdin < notes.txt
marginalrevolution-pp-cli feedback list --json --limit 10
Entries are stored locally at
~/.marginalrevolution-pp-cli/feedback.jsonl
. They are never POSTed unless
MARGINALREVOLUTION_FEEDBACK_ENDPOINT
is set AND either
--send
is passed or
MARGINALREVOLUTION_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的问题时,请记录反馈:
marginalrevolution-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
marginalrevolution-pp-cli feedback --stdin < notes.txt
marginalrevolution-pp-cli feedback list --json --limit 10
反馈条目存储在本地
~/.marginalrevolution-pp-cli/feedback.jsonl
文件中。除非设置了
MARGINALREVOLUTION_FEEDBACK_ENDPOINT
且传递了
--send
或设置了
MARGINALREVOLUTION_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>
参数。输出会除了(或代替)标准输出外,发送到指定的sink,这样agent无需手动管道即可路由命令结果。支持三种sink:
Sink效果
stdout
默认值;仅写入标准输出
file:<path>
原子性地将输出写入
<path>
(临时文件 + 重命名)
webhook:<url>
将输出正文POST到指定URL(当使用
--compact
时为
application/json
application/x-ndjson
格式)
未知的scheme会被拒绝,并返回结构化错误,列出支持的类型。Webhook失败会返回非零退出码,并在标准错误中记录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.
marginalrevolution-pp-cli profile save briefing --json
marginalrevolution-pp-cli --profile briefing feed
marginalrevolution-pp-cli profile list --json
marginalrevolution-pp-cli profile show briefing
marginalrevolution-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”模式。
marginalrevolution-pp-cli profile save briefing --json
marginalrevolution-pp-cli --profile briefing feed
marginalrevolution-pp-cli profile list --json
marginalrevolution-pp-cli profile show briefing
marginalrevolution-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
    marginalrevolution-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
    → 显示
    marginalrevolution-pp-cli --help
    输出
  2. install
    开头
    → 以
    mcp
    结尾 → MCP安装;否则 → 参见上方的前提条件
  3. 其他任何内容 → 直接使用(以
    --agent
    标志执行CLI命令)

MCP Server Installation

MCP服务器安装

Install the MCP binary from this CLI's published public-library entry or pre-built release, then register it:
bash
claude mcp add marginalrevolution-pp-mcp -- marginalrevolution-pp-mcp
Verify:
claude mcp list
从此CLI已发布的公共库条目或预构建版本安装MCP二进制文件,然后注册:
bash
claude mcp add marginalrevolution-pp-mcp -- marginalrevolution-pp-mcp
验证:
claude mcp list

Direct Use

直接使用

  1. Check if installed:
    which marginalrevolution-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
    marginalrevolution-pp-cli <command> [subcommand] [args] --agent
  4. If ambiguous, drill into subcommand help:
    marginalrevolution-pp-cli <command> --help
    .
  1. 检查是否已安装:
    which marginalrevolution-pp-cli
    如果未找到,提供安装选项(参见顶部的前提条件)。
  2. 将用户查询与上述独特功能和命令参考中的最佳命令匹配。
  3. 使用
    --agent
    标志执行:
    bash
    marginalrevolution-pp-cli <command> [subcommand] [args] --agent
  4. 如果存在歧义,查看子命令帮助:
    marginalrevolution-pp-cli <command> --help
    。",