report-builder

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Report Builder

Report Builder 报表生成器

The owner describes a report once. You build it, run it, and save the definition so it never has to be described again.
Owners are pulling numbers out of three dashboards by hand and trying to find the story themselves. The job is to end that.
负责人只需描述一次报表需求,你就可以构建、运行并保存定义,以后再也不需要重复描述。
负责人通常要手动从三个仪表盘中提取数据,自己试图找出数据背后的结论。本技能的目标就是终结这种情况。

Step 1 — Check for an existing definition

步骤1 — 检查现有定义

Before anything else, read
reference/saved_reports.md
and check whether this report already exists. Also check for a
report-definitions.md
in the working directory — that's where definitions land when the skill folder isn't writable (see Step 7).
If the owner says "same report as last time," "run the weekly one," or names a report you have a definition for, skip straight to Step 4 and run it. Re-interviewing someone about a report they already defined is the fastest way to make this skill feel broken.
If nothing matches, continue.
在开始任何操作前,请先阅读
reference/saved_reports.md
,检查该报表是否已存在。同时检查工作目录中是否有
report-definitions.md
——当技能文件夹不可写时,定义会保存在这里(见步骤7)。
如果负责人说“和上次一样的报表”“运行每周的那份报表”,或者提到了你已有定义的报表名称,请直接跳到步骤4运行。对已经定义过报表的用户反复询问,是让本技能显得不好用的最快原因。
如果没有匹配项,请继续。

Step 2 — Turn the description into a spec

步骤2 — 将描述转化为规格说明

Owners describe reports loosely: "every Monday, sales by location versus last year, AR aging, and labor percent." That sentence contains four separate decisions. Resolve them into a spec using the format in
reference/report_spec.md
:
  • Metrics — each one named, with its formula and source
  • Grouping — by location, product, customer, channel, rep
  • Comparison — versus prior period, versus last year, versus target
  • Period — the window each run covers
  • Cadence — one-off, weekly, monthly, quarterly
Infer what you reasonably can. "Sales by location vs last year" gives you the metric, the grouping, and the comparison — don't ask about those. Ask only about what's genuinely ambiguous, and ask it in one batch rather than one question at a time.
The two questions worth asking almost every time:
  • Which period does each run cover — calendar month, trailing 30 days, month-to-date?
  • Is a number like "labor percent" measured against revenue or against total costs?
Getting these wrong produces a report that looks right and is quietly wrong, which is worse than asking.
负责人对报表的描述通常比较随意:“每周一,按地区划分的销售额与去年对比、AR账龄、人工成本占比”。这句话包含了四个独立的决策项。请使用
reference/report_spec.md
中的格式将其整理为规格说明:
  • 指标 — 每个指标的名称、计算公式和数据来源
  • 分组维度 — 按地区、产品、客户、渠道、销售代表
  • 对比基准 — 与上期对比、与去年对比、与目标对比
  • 统计周期 — 每次运行覆盖的时间窗口
  • 运行频率 — 一次性、每周、每月、每季度
请合理推断你能确定的信息。“按地区划分的销售额与去年对比”已经给出了指标、分组维度和对比基准——不要就这些内容提问。只对真正不明确的内容提问,并且一次性问完,不要逐个提问。
几乎每次都值得问的两个问题:
  • 每次运行覆盖的周期是哪个——自然月、过去30天、当月累计?
  • 像“人工成本占比”这样的指标,是相对于收入还是相对于总成本计算的?
搞错这些会导致报表看起来正确但实际有误,这比提问更糟糕。

Step 3 — Confirm the spec, once

步骤3 — 确认规格说明(仅一次)

Show the resolved spec back in a compact block. Ask for one confirmation, then build. Do not walk the owner through the spec field by field — they described this in one sentence and expect one answer.
If they correct something, apply it and go. Do not re-confirm a second time.
将整理好的规格说明以简洁的形式展示给用户,请求一次确认,然后开始构建。不要带着用户逐个字段核对规格——他们用一句话描述了需求,也期望得到一个答复。
如果他们纠正了某些内容,直接修改后继续,不要再次确认。

Step 4 — Pull the data

步骤4 — 提取数据

Dispatch every source call in a single parallel batch. See
reference/data_sources.md
for the metric-to-tool mapping.
Sources, tried simultaneously:
  • The ledger — MYOB, NetSuite, QuickBooks, Xero, or Zoho Books, whichever is connected; peers per
    ../../shared/connector-neutrality.md
    . P&L lines, revenue, expenses, AR aging, AP, class and location splits. MYOB is P&L, AR, and payables only, three financial years back. If two ledgers are connected, ask which is the source of record and take totals from that one
  • HubSpot — deals, stages, owners, close dates, pipeline value
  • PayPal, Square, Stripe — settlements, fees, refunds, transaction detail
  • Shopify — orders, SKU-level revenue, fulfillment status
  • Ramp, Expensify — card spend and expense detail. Both are read sources here; Expensify is read-only search
If a source errors or returns nothing, record it and move on. Never block the whole report on one bad connector.
No connectors at all is a supported path, not a failure. Ask for a CSV or XLSX export, read it, and build the identical report from the file. Say so plainly: "I don't see a connected data source. Export the sales report from your system and drop it here — I'll build the same report from that." Owners with tool sprawl live in this mode, and the report is just as good.
一次性并行调用所有数据源。指标与工具的对应关系请参见
reference/data_sources.md
。
同时尝试以下数据源:
  • 财务账簿 — MYOB、NetSuite、QuickBooks、Xero 或 Zoho Books,以已连接的为准;对等规则请参见
    ../../shared/connector-neutrality.md
    。包括损益表项目、收入、支出、AR账龄、应付账款、分类和地区拆分。MYOB仅支持损益表、应收账款和应付账款,最多回溯三个财年。如果连接了两个账簿,询问哪个是权威数据源,并从该数据源取总数
  • HubSpot — 交易、阶段、负责人、成交日期、销售管道价值
  • PayPal、Square、Stripe — 结算、手续费、退款、交易明细
  • Shopify — 订单、SKU级收入、履约状态
  • Ramp、Expensify — 卡消费和费用明细。两者都是只读数据源;Expensify仅支持只读搜索
如果某个数据源出错或返回空数据,记录下来并继续。绝不要因为一个连接器故障而阻塞整个报表。
完全没有连接器是受支持的使用场景,不是故障。 请用户提供CSV或XLSX导出文件,读取文件后构建完全相同的报表。直白地说明:“我没有找到已连接的数据源。请从你的系统中导出销售报表并上传到这里——我会基于该文件构建同样的报表。” 工具分散的用户经常使用这种模式,生成的报表质量完全一样。

Step 5 — Compute and sanity-check

步骤5 — 计算与合理性校验

Compute every metric named in the spec. Then check the results before showing them. Read
reference/gotchas.md
for the failure modes that actually happen.
The checks that catch real errors:
  • Period boundaries. A partial current month compared against a full prior month always looks like a collapse. Either compare like-for-like or label the partial period explicitly.
  • Double-counting. A Shopify order and its Stripe settlement are one sale. If both sources are connected, pick one as the revenue source and note which.
  • Empty groups. A location with no sales this period should appear with a zero, not vanish. A disappearing row reads as a data problem.
  • Totals that don't tie. If the grouped rows don't sum to the total, say so rather than publishing a number you can't defend.
计算规格说明中列出的所有指标。然后在展示结果前进行检查。实际可能出现的故障模式请参见
reference/gotchas.md
。
能有效发现错误的检查项:
  • 周期边界。将不完整的当月与完整的上月对比,总会看起来像业绩暴跌。要么进行同口径对比,要么明确标注是不完整周期。
  • 重复计算。一笔Shopify订单及其对应的Stripe结算是同一笔销售。如果连接了两个数据源,选择一个作为收入来源并注明。
  • 空分组。某个地区本期没有销售额,应该显示为0,而不是直接消失。消失的行会被认为是数据问题。
  • 总计不一致。如果分组行的总和与总计不符,要明确说明,而不是发布一个你无法佐证的数字。

Step 6 — Deliver

步骤6 — 交付

Two artifacts, always, in this order.
The chat summary comes first. Follow
reference/output_template.md
. Lead with what changed and what it means, not with a table dump. The owner asked for a report because they want a decision, not a spreadsheet.
Writing rules, same as every reporting skill in this plugin:
  • Numbers lead, words follow. Not "sales were strong" — "USD 43,200, up 8% versus last year."
  • Every number carries its comparison. A figure with no baseline is a missed insight.
  • Name the outlier. "Portland is down 22%, the only location below last year" beats "results were mixed."
  • Three findings maximum in the summary. The workbook holds everything else.
Then the XLSX. One tab per metric group, a summary tab first, raw pulled data on a final tab so the owner can check your math. Build it with a script rather than by hand.
Then the report page, per the owner's stored output preference — never default to a markdown file. Check the
## Business context
block's
Output preference
(shared style guide rule,
../../shared/artifact-style.md
):
  • Visual artifact (the default): render the report as an HTML page in the house style — each headline metric is a stat tile with its comparison as the context line; the grouped rows (by location, product, rep) are a table with right-aligned tabular-nums; any metric versus target carries a status pill (good on target, warn slipping, critical missed); the three findings open the page in their own panel; "n/a" sources go in one quiet footer line. Additive to the chat summary and the workbook, never a replacement.
  • docx / md / notion / canva preference: deliver the same content in that form — a DOCX or markdown file, a Notion page created via the connector (named destination, never overwriting), or a Canva Doc created via the Canva connector (a new design each run, named with the date; tables become lists); fall back to the visual artifact if Notion or Canva is not connected — and say that is why. The XLSX still ships alongside.
  • Best for skill: use the visual artifact — a report is read on screen and compared week to week.
始终按以下顺序交付两个产物。
首先是聊天摘要。 请遵循
reference/output_template.md
。开头先说变化和背后的含义,而不是直接甩表格。负责人要报表是为了做决策,不是为了要电子表格。
写作规则,与本插件中所有报表类技能一致:
  • 数字先行,文字补充。不要说“销售额表现强劲”——要说“销售额43,200美元,同比去年增长8%”。
  • 每个数字都要有对比基准。没有基线的数字是错失的洞察。
  • 指出异常值。“波特兰地区下降22%,是唯一一个低于去年的地区” 比 “结果喜忧参半” 更好。
  • 摘要最多包含3个发现。其余所有内容都放在工作簿里。
然后是XLSX文件。 每个指标组一个工作表,第一个是摘要工作表,最后一个是原始提取数据,方便负责人核对计算。请用脚本生成,不要手动制作。
然后是报表页面,根据负责人存储的输出偏好决定——永远不要默认使用markdown文件。 请查看
## 业务背景
模块中的
输出偏好
(共享风格指南规则,
../../shared/artifact-style.md
):
  • 可视化产物(默认): 按照内部风格将报表渲染为HTML页面——每个核心指标是一个统计卡片,对比数据作为上下文说明行;分组行(按地区、产品、销售代表)是右对齐的等宽数字表格;任何与目标对比的指标都带有状态标签(达标为良好,下滑为警告,未达标为严重);三个发现放在页面顶部的独立面板中;“不适用”的数据源放在页脚的一行小字里。这是对聊天摘要和工作簿的补充,绝不是替代。
  • docx / md / notion / canva 偏好: 以对应格式交付相同内容——DOCX或markdown文件、通过连接器创建的Notion页面(指定目标位置,绝不覆盖)、或通过Canva连接器创建的Canva文档(每次运行新建一个设计,用日期命名;表格转为列表);如果未连接Notion或Canva,则回退到可视化产物——并说明原因。XLSX文件仍会一同交付。
  • 技能最佳实践: 使用可视化产物——报表是在屏幕上阅读并按周对比的。

Step 7 — Save the definition

步骤7 — 保存定义

Append the spec to
reference/saved_reports.md
with the date it was created and the cadence. This is what makes the report recurring instead of one-off.
If that file can't be written — the skill folder is read-only in most installed runtimes — write the definition to
report-definitions.md
in the owner's working directory instead and say where it went. A definition that silently failed to save is the same bug as never saving it.
If the owner asked for a cadence, confirm it in one line: "Saved. I'll run this the first Monday of each month." Scheduling is a property of this skill — no separate command needed.
将规格说明附加到
reference/saved_reports.md
中,注明创建日期和运行频率。这是让报表成为定期报表而非一次性报表的关键。
如果无法写入该文件——在大多数已安装的运行环境中,技能文件夹是只读的——则将定义保存到负责人工作目录下的
report-definitions.md
中,并告知用户保存位置。静默保存失败的定义和根本没保存是一样的bug。
如果负责人要求了运行频率,用一句话确认:“已保存。我会在每个月的第一个周一运行这份报表。” 定时运行是本技能的内置属性——不需要单独的命令。

After the run

运行结束后

One line: the report ran and the definition is saved. Then the single most relevant next step, with at most two others nearby:
  • "The weekly pack, on schedule" runs
    /report-pack
    to wrap this in context on a cadence.
  • "How's the business doing?" runs
    business-pulse
    for the picture around these numbers.
  • "Cash forecast" runs
    cash-flow-snapshot
    when the report raised a cash question.
Max three offers. Never repeat an offer the owner declined this session.
一句话说明:报表已运行,定义已保存。然后给出一个最相关的下一步操作,最多再加两个附近的操作:
  • “每周报表包,按计划运行” 会调用
    /report-pack
    来按频率将此报表打包到上下文中。
  • “业务状况如何?” 会调用
    business-pulse
    来获取这些数字背后的整体情况。
  • “现金预测” 会在报表涉及现金问题时调用
    cash-flow-snapshot
    。
最多提供三个选项。绝不要重复用户本次会话中已经拒绝的选项。

What not to do

禁止事项

  • Do not interview the owner about a report they already defined. Check
    saved_reports.md
    first, every time.
  • Do not ask permission to pull data. The skill was invoked. Run it.
  • Do not invent a number. If a source returned nothing, write "n/a" and name the source. A plausible-looking guess in a report the owner forwards to their bank is a serious failure.
  • Do not lead with the table. The summary is the product; the workbook is the appendix.
  • Do not treat "no connectors" as a blocker. The CSV path is a first-class mode.
  • 不要对已经定义过报表的用户反复询问。 每次都要先检查
    saved_reports.md
    。
  • 不要请求拉取数据的许可。 本技能已经被调用,直接运行。
  • 不要编造数字。 如果某个数据源没有返回数据,写“n/a”并注明数据源。在负责人要转发给银行的报表里出现看似合理的猜测是严重故障。
  • 不要开头就放表格。 摘要是产品,工作簿是附录。
  • 不要把“没有连接器”当成障碍。 CSV路径是一等支持模式。

Reference files

参考文件

  • reference/report_spec.md
    — the spec format, with worked examples
  • reference/data_sources.md
    — metric to connector mapping, with fallbacks
  • reference/output_template.md
    — exact structure for the chat summary and the workbook
  • reference/saved_reports.md
    — stored report definitions, appended to over time
  • reference/gotchas.md
    — the failure modes that produce confidently wrong reports
  • reference/report_spec.md
    — 规格说明格式,含实际示例
  • reference/data_sources.md
    — 指标与连接器的对应关系,含回退方案
  • reference/output_template.md
    — 聊天摘要和工作簿的精确结构
  • reference/saved_reports.md
    — 存储的报表定义,会随时间不断追加
  • reference/gotchas.md
    — 会导致看似正确实则错误的报表的故障模式

Using a tool that isn't listed

使用未列出的工具

The connectors named in this skill are the tested paths, not a wall. If the owner wants this flow to use a tool that isn't connected or listed, offer
build-connector
— it checks the connector directory first and connects through Zapier otherwise, never hand-building against a raw API. Once the connection exists, the tool joins this skill like any other optional connector, under the same approval gates.
本技能中列出的连接器是经过测试的路径,但不是限制。如果负责人希望使用未连接或未列出的工具来完成这个流程,可以提供
build-connector
选项——它会先检查连接器目录,否则通过Zapier连接,绝不要针对原始API手动构建。一旦连接成功,该工具就会像其他可选连接器一样加入本技能,遵循相同的审批规则。