# CoworkCost — Session Cost Summary skill
A Copilot Cowork skill that reports the **real Copilot credits** consumed by your past Cowork
sessions. It reads the genuine `/cost` value from each session and builds one table —
**Date · Session · /cost · Running total · Deliverables** — so you can track how many credits
you've spent and what each session produced.
Every number is a live `/cost` reading pulled from the Cowork app. **The skill never estimates,
computes, or fabricates a cost.**
---
## ⚠️ 1. Where it runs — the web Cowork app only
This skill **must be run in Cowork on the web**, at:
### 👉 https://copilot.cloud.microsoft/cowork
It works by driving **your signed-in Cowork web app in the browser** to open each session and read
`/cost`. That's why it only works on the web app, where your browser and login live. It **cannot**
read `/cost` from a headless agent or a desktop-only environment with no browser.
---
## ⚠️ 2. How to install — upload the ZIP as-is, do NOT unzip
Install it by attaching the **`session-cost-summary-skill-v4.zip`** file to a Cowork message and asking
Cowork to install it. **Upload the ZIP exactly as downloaded — do not unzip or extract it first.**
1. Download **[`session-cost-summary-skill-v4.zip`](./session-cost-summary-skill-v4.zip)** from this repo.
2. Open a **new Cowork session** at **https://copilot.cloud.microsoft/cowork**.
3. **Attach the ZIP file as-is** (do **not** unzip it) to your message.
4. Say: **"Install this skill."**
5. Wait ~35 seconds for OneDrive to sync — the skill is live in your next session.
> Cowork unpacks the ZIP for you into your personal skills folder
> (`Documents/Cowork/skills/session-cost-summary/`). You never need to extract it yourself.
---
## How to run it
Once installed, trigger it from a Cowork session on the web with any of:
- **"cowork cost report"**
- "total my Cowork credit usage this month"
- "cost per session since <date>"
It asks which period to total (**Month to date · Last 4 weeks · Last 30 days · Last 7 days**, or a
custom `YYYY-MM-DD` date), then opens each session in that window, reads its real `/cost`, and totals
them into a running-total table.
### ⏱️ The first run is slow — later runs are fast
The **first run is slow**: it has to open every session and read `/cost` one at a time, which takes
roughly **~2 minutes per session**. So a month with many sessions can take a while — the skill works
in the background while you do other things.
**Subsequent runs are fast.** Every reading is cached, so re-running only re-reads the sessions that
had new activity since last time; everything unchanged is reused instantly.
## What you get
- A table — **Date · Session · /cost (AiCredits) · Running total · Deliverables** — sorted by date,
where the **Deliverables** column names each session's primary output files, grouped by type
(e.g. `PDF: report.pdf · HTML (2): a.html, b.html`), with screenshots and variants folded into a
short count.
- The **grand total** of credits used to date.
- An honest breakdown: how many were captured, how many predate credit tracking, and how many are
awaiting your input.
- **Export & share** — from any report you can:
- **Export to slides** — generate a polished PowerPoint deck: a KPI cover (total credits, # sessions,
window, biggest session) plus a cost-by-session table with named deliverables that auto-paginates
across slides.
- **Email me this** — receive the report by email, with the slide deck attached if you exported one.
## What's in this repo
| Path | What it is |
| --- | --- |
| [`session-cost-summary-skill-v4.zip`](./session-cost-summary-skill-v4.zip) | **The installable skill — attach this to Cowork as-is.** |
| [`session-cost-summary/`](./session-cost-summary/) | The unpacked skill contents, for browsing/review. |
| `session-cost-summary/SKILL.md` | The skill definition (triggers, workflow, resilience, guardrails). |
| `session-cost-summary/INSTALL.md` | Install notes bundled with the skill. |
| `session-cost-summary/scripts/cost_rollup.py` | The `/cost` ledger + roll-up engine — running total, reuse/re-sweep cache, deliverables folding, and the Markdown/JSON report renderers. |
| `session-cost-summary/scripts/build_cost_deck.js` | The default **"export to slides"** deck generator — builds the standard KPI-cover + cost-by-session PowerPoint from the report JSON. |
| `session-cost-summary/scripts/capture_cost_browser.py` | Optional standalone Playwright sweep for machines with Python + your login. |
## Privacy
Readings are your own. The report shows only session **titles, dates, and cost figures** — never
session contents — and nothing is shared with anyone else.