Get a weekly Xero cash flow report from your AI agent

Every Monday: each Xero bank account's balance, the cash that came in and went out last week, and the five biggest movements.

Runs
Mondays at 8:00
Uses
Xero
Posts
Report card

From your apps to your board

How the skill works: your agent reads biggest movements from Xero, mondays at 8:00, and gives you report card and the report in the chat.

Reads

  • XeroBiggest movements
reads
Your agentClaude Code, Codex, Cursor or GeminiMondays at 8:00
posts

You get

  • Report cardOn your board, updated in place every run
  • The report in the chatEvery run, with or without Briefkin

What you get

  • Closing balance across all bank accounts and the change on the week.
  • Per account: opening balance, cash in, cash out, closing balance.
  • Biggest movements: the five largest receipts and payments, with contact and date.
  • Four-week average net cash flow.
  • One line on what moved the week, for example "Quarterly insurance of $12,480 fell this week".

The card on the right is a sample. Yours shows your own numbers and updates in place every run.

What lands on your board

AcmeXero weekly cash flow report · Claude Code

Cash down $18.4k last week across 3 accounts

Closing balance $212,640. $64,210 came in and $82,610 went out, led by payroll and the quarterly insurance premium.

AccountOpeningInOutClosing
Business checking$148,320$61,890$78,410$131,800
Savings$80,000$120$0$80,120
PayPal$2,720$2,200$4,200$720
Total$231,040$64,210$82,610$212,640
DateContactAccountAmount
Oct 10Payroll runBusiness checking-$41,300
Oct 7Northwind TradersBusiness checking+$18,600
Oct 8Insurance (quarterly)Business checking-$12,480
Oct 9Contoso LtdBusiness checking+$11,250
Oct 6Cloud hostingPayPal-$3,940

The four-week average is -$6,200 a week. This week ran deeper because the $12,480 quarterly insurance premium fell in it.

Done
An example with made-up numbers. Your agent posts your real ones.

What it does

Founders want to know one thing on Monday: did we end the week with more cash or less, and why. In Xero that means the Bank Summary report for the right dates, then a dig through account transactions to see which payments moved the number.

The agent runs both: balances and cash in and out per account from the Bank Summary, then the largest receipts and payments of the week. Finance leads get a table they can paste into the weekly update, and the founder gets the reason in one line.

How it works

  1. 1Run the Bank Summary

    Call GET https://api.xero.com/api.xro/2.0/Reports/BankSummary?fromDate=<last Monday>&toDate=<last Sunday> with the xero-tenant-id header. Each bank account row carries the opening balance, cash received, cash spent and closing balance.

  2. 2Find the biggest movements

    Call GET /api.xro/2.0/BankTransactions with where=Date>=DateTime(2026,10,05) AND Date<=DateTime(2026,10,11) (last week's dates) for spend and receive money, and GET /api.xro/2.0/Payments with the same filter for invoice and bill payments, which are not bank transactions. Keep contact, reference, account and amount.

  3. 3

    3Add the four-week view

    Keep each week's totals in a JSON file (or run the Bank Summary for the three weeks before on the first run) and work out the average weekly net cash flow, so one heavy week reads in context.

  4. 4

    4Write the report

    The table per account, totals for cash in, cash out and net, the five largest movements by absolute amount, and one line naming the movement that explains the week.

  5. Post it to the board

    With BRIEFKIN_TOKEN set, the agent sends the result as one card that updates in place every run. Without it, you get the report in the chat.

Install and run it

Pick your agent, where the data comes from and how to schedule it; the commands below follow.

Agent
Data
Schedule
  1. Install the skill

    One command. It puts the SKILL.md in ~/.claude/skills and in ~/.agents/skills, which Codex, Cursor, Gemini CLI, Copilot CLI and OpenCode read too.

    shellcurl -fsSL https://briefkin.dev/skills/xero-weekly-cash-flow-report/install | sh
  2. Run it

    Ask Claude Code:

    promptRun the xero-weekly-cash-flow-report skill

    Or paste the prompt instead of installing:

    promptUsing the Xero Accounting API, run the BankSummary report for last Monday to Sunday and give me each bank account's opening balance, cash received, cash spent and closing balance, with totals. Then list the five largest movements of that week by absolute amount from BankTransactions and Payments (date, contact, account, amount). If you can, run the Bank Summary for the three weeks before too and give me the average weekly net cash flow. End with one line on what explains the week.
  3. Put it on a schedule

    Mondays at 8:00, from cron on any machine where Claude Code is signed in:

    crontab0 8 * * 1 claude -p "Run the xero-weekly-cash-flow-report skill"

    Add it with crontab -e. A laptop asleep at that time runs it when it wakes if you use launchd or Task Scheduler instead; GitHub Actions works for the API route.

  4. Send it to your board

    Connect Briefkin once with curl -fsSL https://briefkin.dev/install | sh and every run lands on your board as a report card. How setup works

View the SKILL.mdRaw file
SKILL.md---
name: xero-weekly-cash-flow-report
description: "Every Monday: each Xero bank account's balance, the cash that came in and went out last week, and the five biggest movements. Use when the user asks for this, or when it runs on a schedule."
---

# Xero weekly cash flow report

Every Monday: each Xero bank account's balance, the cash that came in and went out last week, and the five biggest movements.

Founders want to know one thing on Monday: did we end the week with more cash or less, and why. In Xero that means the Bank Summary report for the right dates, then a dig through account transactions to see which payments moved the number.

The agent runs both: balances and cash in and out per account from the Bank Summary, then the largest receipts and payments of the week. Finance leads get a table they can paste into the weekly update, and the founder gets the reason in one line.

## Two ways to get the data

Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.

## Route A: API or MCP server

### What you need

- A Xero connection with `accounting.reports.banksummary.read`, `accounting.banktransactions.read` and `accounting.payments.read`. Apps created since 2 March 2026 use these granular scopes; older apps can keep `accounting.reports.read` and `accounting.transactions.read` until September 2027.
- The official Xero MCP server covers bank transactions and payments; the Bank Summary is a direct Accounting API call with the same connection.

If something is missing, say what and stop; do not invent numbers.

### Steps

1. **Run the Bank Summary** (Xero): Call `GET https://api.xero.com/api.xro/2.0/Reports/BankSummary?fromDate=<last Monday>&toDate=<last Sunday>` with the `xero-tenant-id` header. Each bank account row carries the opening balance, cash received, cash spent and closing balance.
2. **Find the biggest movements** (Xero): Call `GET /api.xro/2.0/BankTransactions` with `where=Date>=DateTime(2026,10,05) AND Date<=DateTime(2026,10,11)` (last week's dates) for spend and receive money, and `GET /api.xro/2.0/Payments` with the same filter for invoice and bill payments, which are not bank transactions. Keep contact, reference, account and amount.
3. **Add the four-week view**: Keep each week's totals in a JSON file (or run the Bank Summary for the three weeks before on the first run) and work out the average weekly net cash flow, so one heavy week reads in context.
4. **Write the report**: The table per account, totals for cash in, cash out and net, the five largest movements by absolute amount, and one line naming the movement that explains the week.

## Route B: the browser

### What you need

- Signed in to Xero with the Adviser, Standard or Read Only role on the organisation (the Invoice Only roles cannot open reports), with 2FA done by the person.

If something is missing, say what and stop; do not invent numbers.

### Steps

Start at https://go.xero.com/. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.

1. **Open the Bank Summary**: Xero report URLs carry the organisation code, so start at the Xero dashboard, pick the organisation from the menu in the top left, then go to **Accounting > Reports** and open **Bank Summary**. Set the **Date range** to last Monday to last Sunday and click **Update**.
2. **Read the table**: Each bank account row shows **Opening balance**, **Cash received**, **Cash spent** and **Closing balance**, with a total row underneath. Copy all four for every account.
3. **Find the biggest movements**: Go to **Accounting > Bank accounts**, open each account and choose **Account transactions**. Filter to the same week, sort by amount, and note the five largest receipts and payments across accounts with date, contact and reference. Leave out transfers between your own accounts.
4. **Add the four-week context**: Run the Bank Summary again for each of the three weeks before (change the date range and Update) and average the four weeks' net cash flow. Write the per-account table, the totals, the five movements, and one line naming the movement that explains the week.

Note: The Bank Summary shows the whole report on one page, so this route is quick. Account transactions page in batches, so an account with many lines takes several pages or the **Export** on that screen. As with the API, unreconciled statement lines are not in the numbers yet.

## The report

- **Closing balance** across all bank accounts and the change on the week.
- **Per account**: opening balance, cash in, cash out, closing balance.
- **Biggest movements**: the five largest receipts and payments, with contact and date.
- **Four-week average** net cash flow.
- One line on what moved the week, for example "Quarterly insurance of $12,480 fell this week".

## Post it to Briefkin

When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.

```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
  -H "authorization: Bearer $BRIEFKIN_TOKEN" \
  -H "content-type: application/json" \
  -d @- <<'JSON'
{
  "v": 1,
  "event_id": "xero-weekly-cash-flow-report/<date of this run, e.g. 2026-10-16>",
  "item_key": "xero-weekly-cash-flow-report",
  "project": "Acme",
  "source": "Xero weekly cash flow report skill",
  "kind": "update",
  "title": "Cash down $18.4k last week across 3 accounts",
  "summary": "Closing balance **$212,640**. **$64,210** came in and **$82,610** went out, led by payroll and the quarterly insurance premium.",
  "widget": [
    {
      "type": "Table",
      "props": {
        "columns": [
          "Account",
          "Opening",
          "In",
          "Out",
          "Closing"
        ],
        "align": [
          "left",
          "right",
          "right",
          "right",
          "right"
        ],
        "rows": [
          [
            "Business checking",
            "$148,320",
            "$61,890",
            "$78,410",
            "$131,800"
          ],
          [
            "Savings",
            "$80,000",
            "$120",
            "$0",
            "$80,120"
          ],
          [
            "PayPal",
            "$2,720",
            "$2,200",
            "$4,200",
            "$720"
          ],
          [
            "Total",
            "$231,040",
            "$64,210",
            "$82,610",
            "$212,640"
          ]
        ]
      }
    },
    {
      "type": "Table",
      "props": {
        "columns": [
          "Date",
          "Contact",
          "Account",
          "Amount"
        ],
        "align": [
          "left",
          "left",
          "left",
          "right"
        ],
        "rows": [
          [
            "Oct 10",
            "Payroll run",
            "Business checking",
            "-$41,300"
          ],
          [
            "Oct 7",
            "Northwind Traders",
            "Business checking",
            "+$18,600"
          ],
          [
            "Oct 8",
            "Insurance (quarterly)",
            "Business checking",
            "-$12,480"
          ],
          [
            "Oct 9",
            "Contoso Ltd",
            "Business checking",
            "+$11,250"
          ],
          [
            "Oct 6",
            "Cloud hosting",
            "PayPal",
            "-$3,940"
          ]
        ]
      }
    },
    {
      "type": "Callout",
      "props": {
        "text": "The four-week average is -$6,200 a week. This week ran deeper because the $12,480 quarterly insurance premium fell in it.",
        "tone": "info"
      }
    }
  ]
}
JSON
```

Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.

## Run it on a schedule

Suggested: Mondays at 8:00 (`0 8 * * 1`). From cron, with the agent signed in on that machine:

```bash
0 8 * * 1 claude -p "Run the xero-weekly-cash-flow-report skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```

Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/xero-weekly-cash-flow-report#schedule

Source: https://briefkin.dev/skills/xero-weekly-cash-flow-report

What your agent needs

  • A Xero connection with accounting.reports.banksummary.read, accounting.banktransactions.read and accounting.payments.read. Apps created since 2 March 2026 use these granular scopes; older apps can keep accounting.reports.read and accounting.transactions.read until September 2027.

  • The official Xero MCP server covers bank transactions and payments; the Bank Summary is a direct Accounting API call with the same connection.

Connecting Xero

  1. Xero connector for Claude, Xero's own remote server at https://mcp.xero.com/mcp, in Claude's connector directory. It connects with read-only access and has tools for profit and loss, financial and cash position, aged receivables and payables, invoices, bills, contacts and bank transactions. Connectors added in claude.ai also appear in Claude Code when you sign in with that account.
  2. Xero MCP server (open source). Xero's local server, @xeroapi/xero-mcp-server, runs with a custom connection's client ID and secret or with a bearer token: claude mcp add --env XERO_CLIENT_ID=<id> --env XERO_CLIENT_SECRET=<secret> --transport stdio xero -- npx -y @xeroapi/xero-mcp-server@latest, and the same command and variables in Codex or Cursor. It also has tools that create invoices, payments and journals, so set XERO_SCOPES to read scopes only (source).
  3. Accounting API with a custom connection. A custom connection links one organisation to your app through the client credentials grant. Store XERO_CLIENT_ID and XERO_CLIENT_SECRET and request granular read scopes such as accounting.invoices.read, accounting.banktransactions.read, accounting.reports.profitandloss.read, accounting.reports.aged.read and accounting.contacts.read; custom connections created since April 29, 2026 use these granular scopes.

The Claude connector is read-only already. On the API, request only .read scopes: a token without write scopes can't raise an invoice or record a payment.

Questions

Why doesn't the balance match my bank?

The Bank Summary is built from transactions recorded in Xero, so statement lines that have not been reconciled are not in it yet. The difference between the two is your unreconciled work; reconcile first if you want the card to match the bank to the cent.

Are invoice payments in the biggest movements?

Yes. Money received against invoices and paid against bills is recorded as Payments, not BankTransactions, so the skill reads both endpoints. Transfers between your own accounts are left out of the list because they don't change total cash.

Do I need Briefkin to use the Xero weekly cash flow report skill?

No. The skill runs with your own agent and gives you the report in the chat. With a Briefkin token set, each run also posts it to your board as a report card, so you can glance at it instead of asking again.

Which agents can run it?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, Windsurf and Amp all read SKILL.md files. The install command puts it in ~/.claude/skills and ~/.agents/skills, where they look. ChatGPT, the Claude app and Grok take the prompt instead. Pick your agent under "Install and run it" and the commands change to match.

Can it work without an API or MCP server, from my browser?

Yes. Switch the data source to "Your browser" and the steps change to the Xero pages themselves: the agent opens go.xero.com in a browser you are signed in to and reads the numbers off the page. Claude Code, Codex, Cursor, Claude app and ChatGPT can drive a browser out of the box; Gemini CLI, Copilot CLI and OpenCode need a Playwright or Chrome DevTools MCP server first. It is slower than the API and needs you signed in, so it suits a report you run by hand or from a scheduler on your own computer.

Read this report on your board, not in a chat log

Skills are free to use with any agent. Briefkin is where their results land: one board for every report, number and question your agents send, with a ping when something needs you.

Free during the open beta. No card.