一键导入
mercury-shared
Shared rules for Mercury CLI skills: token-efficient format, pagination, date anchoring, and the debit-sign convention.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Shared rules for Mercury CLI skills: token-efficient format, pagination, date anchoring, and the debit-sign convention.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Find Mercury transactions missing receipts, search macOS Photos and Gmail for matching receipt images and emails, then upload them via the mercury CLI.
Complete a Mercury onboarding application: generate a blank YAML template from the CLI, fill it with the applicant's details, confirm, and submit by piping into the mercury CLI.
Produce the Mercury side of a cash General Ledger reconciliation for a given account and period, formatted to drop into a Mercury Reconciliation Workbook.
Produce the Source Data + Calculation + Journal Entry block for an Accounts Payable accrual or cash-reclassification entry sourced from Mercury transactions, ready to paste into a NetSuite Journal Entry import template.
Analyze spending patterns across Mercury accounts using the mercury CLI, with categorized breakdowns and month-over-month comparisons.
Suggest expense categories for uncategorized Mercury transactions based on counterparty, description, and Mercury merchant type, then apply via the mercury CLI.
| name | mercury-shared |
| description | Shared rules for Mercury CLI skills: token-efficient format, pagination, date anchoring, and the debit-sign convention. |
| metadata | {"version":"1.0.0","category":"shared","scopes":[],"requires":[]} |
The mercury CLI handles authentication on its own. If MERCURY_API_KEY is set in the environment, the CLI uses it as a bearer token; otherwise it falls back to the OAuth token saved by mercury login. Either way, skills never construct auth headers or pass --api-key themselves — just invoke mercury <command> and the CLI picks the right credential. To check current auth state, run mercury status. If a call fails with 401/403, tell the user to either export MERCURY_API_KEY or run mercury login; do not retry.
These rules cover the few things that aren't obvious from mercury --help.
--format jsonl for readsjsonl collapses the response onto a single line with no indentation whitespace — the cheapest format to load into context. Use it for every read this skill performs:
mercury accounts list --max-items -1 --format jsonl
mercury transactions list --start 2026-04-01 --end 2026-04-29 --status sent --max-items -1 --format jsonl
Pair it with --transform (GJSON syntax — see https://github.com/tidwall/gjson/blob/master/SYNTAX.md) when you only need a few fields:
# Just the fields needed for spend analysis
mercury transactions list --start 2026-04-01 --end 2026-04-29 --status sent \
--max-items -1 --format jsonl \
--transform 'transactions.#.{id,amount,counterpartyName,category,mercuryCategory,postedAt,createdAt}'
--format json is the colorized, pretty-printed version for humans — don't use it from a skill.
--max-items -1 for list commandsWithout it, the CLI returns the first page only. --max-items -1 paginates through every page in a single call. Never answer questions that need full data ("total spend", "all transactions", "most/least") from a partial result.
If a single call would still pull an unmanageable number of rows, narrow --start/--end or filter further (--account-id, --category-id, --status, --search) instead of accepting truncation.
LLMs hallucinate dates. Before computing any window, run:
date +%Y-%m-%d
…and derive --start/--end relative to that. Never hardcode today.
abs(amount) when comparing against receipt totals or summing spend.10.00 = $10.00. Preserve full precision; only round when displaying.$ and two decimals (e.g. $1,234.56).The CLI may return full account/card numbers in responses. When showing data back to the user, mask everything except the last 4 (****4821).