Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/marcelrgberger/pages-cli/pagesgit clone --depth 1 https://github.com/marcelrgberger/pages-cliWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00038 | $0.00703 |
| Opus 5 | $0.00019 | $0.00351 |
| Sonnet 5 | $0.00008 | $0.00141 |
| Haiku 4.5 | $0.00004 | $0.00070 |
Grade A, and why
pages scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pages CLI — Quick Access
You have access to the Apple Pages CLI (pages-cli).
Step 0: Ensure CLI is available
Check if pages-cli is installed. If not, install it automatically:
which pages-cli || (cd ${CLAUDE_PLUGIN_ROOT}/agent-harness && python3 -m venv .venv && source .venv/bin/activate && pip install -e . && echo "pages-cli installed")
If a venv already exists, activate it:
test -f ${CLAUDE_PLUGIN_ROOT}/agent-harness/.venv/bin/activate && source ${CLAUDE_PLUGIN_ROOT}/agent-harness/.venv/bin/activate
Your task
Parse the argument $ARGUMENTS and execute the matching action:
If no argument or "new":
- Create a new blank document:
pages-cli --json document new - Inform the user and wait for instructions on what to do with it.
If "new ":
- Create a document from the named template:
pages-cli --json document new --template "<template name>" - Inform the user and wait for instructions.
If "open ":
- Open the document:
pages-cli --json document open "<path>" - Get document info:
pages-cli --json document info - Show the user a summary (name, pages, word count) and wait for instructions.
If "info":
pages-cli --json document info
pages-cli --json text word-count
Display the information in a clear format.
If "close":
pages-cli document close
If "export pdf " or "export word " etc.:
pages-cli export <format> "<path>"
Confirm the export with file size.
If "templates":
pages-cli --json template list
Display the templates grouped by category (Reports, Letters, CVs, etc.).
If "status":
pages-cli --json session status
After opening/creating
Once a document is open, translate the user's natural language into CLI commands:
- Write text →
pages-cli text add "..." - Format text →
pages-cli text set-font --name "..." --size N - Add table →
pages-cli table add --rows N --cols N - Add image →
pages-cli media add-image "path" - Export →
pages-cli export pdf/word/epub "path" - Review →
pages-cli --json text get→ Analyze the text and suggest improvements - Check formatting →
pages-cli --json document info→ Check consistency
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 99 lines · 38 tokens per session scan A a728c9eab81b
pages is a command published in the GitHub repository marcelrgberger/pages-cli (14 stars, last pushed 5mo ago), licensed MIT. It adds 38 tokens to every session and 703 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
merge-and-status
Merge the current PR, pull main, surface any open contributor PRs and untriaged contributor issues, and show open milestone issues.
archive-mail
歸檔指定聯絡人的 Apple Mail 郵件到 Markdown 檔案.
review
Stratified code review routed by risk tier (RFC 0013/0014) — not a flat scan.
archive-mail-migrate
一次性把所有舊 archive 的 indices + config 搬到 .claude/.mail/ namespace.
archive-mail-rebuild-threads
從 per-email md 的 frontmatter 重建 .threads.json.
archive-mail-view
從 .threads.json 生成指定 thread 的聚合視圖.