1
---
2
name: reportsmith
3
description: Write work reports (standup, daily, weekly, monthly, changelog, release notes, or a custom kind) for any period and any folder scope, from git, local coding-agent sessions (Claude Code, Codex, opencode), agent memory, PRs, tickets and notes, then optionally publish them through MCP, a webhook or a command. Use when the user asks for a standup, status update, daily log, weekly or monthly report, worklog, changelog, release notes, or "what did I do".
4
---
5
6
# reportsmith
7
8
Report maker. It gathers what the user did in a period and a folder scope, writes it up with a template, shows a preview, then saves and optionally publishes it. It runs only when asked and stores nothing between runs.
9
10
Files in this skill's folder, read when the step needs them:
11
- `sources.md`: how to read each source
12
- `publishing.md` and `destinations/`: how to publish
13
- `templates/`: default report templates
14
- `config.example.yml`: every config key with its default
15
- `scripts/sessions.py`: agent-session reader (Python 3 stdlib)
16
17
## 1. Load config
18
19
Read whichever exist; later ones override earlier ones key by key:
20
21
1. Defaults (`config.example.yml` in this folder)
22
2. `~/.reportsmith/config.yml`
23
3. `.reportsmith.yml` in the current repo root
24
25
No config is fine. Ignore unknown keys, and mention them once. If `version` is higher than the one in `config.example.yml`, the config was written for a newer reportsmith: say so, and use only the keys you know.
26
27
## 2. Work out the request
28
29
From the user's words first, then `reports.<kind>` in config, then these defaults:
30
31
| Field | Default |
32
|---|---|
33
| kind | `standup` |
34
| period | see below |
35
| scope | config `scope`, else the current repo |
36
| audience | `team` (`manager`, `team`, `public`, `self`) |
37
| format | `markdown` (`slack`, `email`, `plain`) |
38
| length | `medium` (`short` ≈ 5 items, `medium` ≈ 15, `long` no cap) |
39
40
Default period per kind: standup = last working day and today · daily = today · weekly = current week · monthly = current month · changelog and release-notes = last tag to HEAD.
41
42
### Period
43
44
Resolve the user's words to an inclusive `from`/`to` date range in `prefs.timezone`. Take today's date and every weekday name from the system, never from memory:
45
46
```sh
47
date +%F # today
48
python3 -c "import datetime as d; print(d.date.fromisoformat('2026-11-18').strftime('%a'))" # weekday of a date
49
```
50
51
| User says | Range |
52
|---|---|
53
| `yesterday`, `today`, `2026-11-03`, `Nov 3`, `last Friday` | that day |
54
| `this week`, `last week`, `week 45`, `week of Nov 3` | that week (`prefs.week_starts`) |
55
| `this month`, `last month`, `October`, `2026-10` | that month |
56
| `Q3`, `last quarter`, `2026` | that quarter or year |
57
| `last 10 days`, `past 2 weeks` | ending today |
58
| `Nov 1 to Nov 15`, `2026-11-01..2026-11-15`, `since Nov 1` | that range (`since` ends today) |
59
60
- For a standup, if "yesterday" was a weekend day with no activity, use the last working day and say so.
61
- A future range, or `from` after `to`: ask.
62
- Put the resolved range and the scope in the report header.
63
64
**Threshold.** A range longer than `limits.max_days` (default 92): say how long it is and ask to confirm or narrow it. More than `limits.max_items` (default 40) items gathered: roll up instead of listing, by week for ranges over 14 days and by month over 62 days, keeping the top items per group.
65
66
### Scope
67
68
Which work counts, decided by folder: "for ~/work", "only ~/work/api", or config:
69
70
```yaml
71
scope:
72
include: [~/work]
73
exclude: [~/work/archive]
74
```
75
76
Only repos and agent sessions under `include`, and not under `exclude`, count. This keeps work, side projects and clients in separate reports.
77
78
## 3. Gather
79
80
Read every available source for the period and scope; `sources.md` says how. Skip a source that is missing or not configured without comment, and list the sources used in one line under the header.
81
82
**Run each shell command as its own call:** one `git`, `python3`, `find` or `gh` command per call, with no `cd`, no `;`, `&&` or pipes chaining several commands, and no `VAR=value` prefix. Use `git -C <repo>` and absolute paths instead of changing directory. Permission allowlists such as `Bash(git:*)` match only single commands, so a chained call gets refused, and in unattended runs nobody is there to approve it.
83
84
| Source | Gives |
85
|---|---|
86
| git | commits in every repo under the scope |
87
| agent sessions | work done with Claude Code, Codex or opencode, including work with no commit |
88
| agent memory | memory MCP such as claude-mem, if connected |
89
| PRs and reviews | via `gh`, if installed and signed in |
90
| tickets | issue-tracker MCP (Jira, Linear, Plane, GitHub Issues), if connected |
91
| notes | `sources.notes` file: the user's own lines for work no tool saw |
92
| conversation | what the user said in this session |
93
94
**Redact before drafting.** Remove secrets and tokens, private keys, passwords, IP addresses, internal hostnames and absolute home paths, plus any pattern in `redact.patterns`. Never put raw transcript text in a report.
95
96
## 4. Draft
97
98
Template lookup, first found wins: `<templates_dir>/<kind>.md` · `~/.reportsmith/templates/<kind>.md` · `templates/<kind>.md` here. A kind with no template: use the `weekly.md` structure and say the user can add one. Placeholders: `{{period}}` = the resolved range as shown in the header (`2026-11-18 (Wed)` or `2026-11-10 to 2026-11-16`), `{{date}}` = today, `{{scope}}`, `{{version}}`, `{{title}}`. Prose instructions and `<!-- comments -->` in a template are for you; don't copy them into the output.
99
100
Rules:
101
102
- **Never invent.** Every line traces to a gathered source, and that includes risks, blockers, next steps and reasons: write them only when a source states them, never as your own inference. Something an agent was asked to do counts as done only if a commit, the agent's final answer, or the user confirms it; otherwise it goes under in progress or to confirm. Unsure: leave it out or ask.
103
- **Outcomes over activity.** "Fixed login timeout for mobile users", not "changed auth.ts".
104
- **One item per piece of work.** A session, its commits, its PR and its ticket are one item. Cite the ticket ID and commit once. Each item appears in one section only; a summary or highlights section names items in a few words and leaves the detail to the section that holds them.
105
- **Work outside tickets** (reviews, audits, DB changes, incidents, support) goes in its own section when the template has one.
106
- **Audience.** `manager`: outcomes, risks, decisions needed; no code or file names. `team`: plus useful technical detail. `public`: user-facing wording, no internal names. `self`: everything.
107
- Drop empty sections. Convert to the requested format last.
108
109
### Writing style
110
111
People read these reports, and wording that sounds machine-written makes them trust the content less. Write the way a busy engineer writes a status update.
112
113
**The user's own style comes first.** If `style.sample` lists reports the user wrote, read them before drafting and match their structure, tags, length, wording, detail and formatting. If `style.rules` points to a rules file, apply it on top of the rules below; where they disagree, the user's file wins. Precedence: never invent > `style.sample` > `style.rules` > the rules below.
114
115
**Voice** (`style.voice`, default `terse`): `terse` = "Fixed double charge on card payments." · `first-person` = "I fixed…" · `team` = "We fixed…". Past tense for done work, present tense for ongoing work.
116
117
**Plain words.** Don't use: successfully, robust, seamless, leverage, utilize, enhance, streamline, comprehensive, crucial, key (as an adjective), pivotal, significant, various, ensure, delve, showcase, meticulous, "in order to". Write "is" or "has", not "serves as", "represents" or "features".
118
119
**No inflation.** Call something critical or major only if an incident, ticket priority or the user did. Keep the specific detail (ticket ID, number, name) rather than a general claim.
120
121
**No templates.** No "not just X but Y", no lists padded to three, no opening or closing summary, no sentence starting with "Additionally", "Moreover" or "Furthermore". End a sentence at the fact, without a trailing ", ensuring…" or ", improving…". No stacked hedges. Use the same term for the same thing throughout.
122
123
**Results, not process.** "Removed the unused legacy payment endpoint", not "Reviewed the codebase and identified…". Leave out how the agent worked.
124
125
**Formatting.** Bold only for item labels at the start of a bullet, if at all. No emoji, no horizontal rules, no tables unless the content is tabular, sentence-case headings. No em dashes: use commas, colons, parentheses or full stops. No `A → B → C` chains in place of a sentence.
126
127
**No assistant residue.** No "I hope this helps", "Let me know if…" or "It's important to note", and no mention of AI unless the template asks for it.
128
129
**Final check.** Reread the draft against the gathered sources. Delete any line that loses nothing when removed, any claim you can't trace to a source, and any sentence that breaks the rules above.
130
131
## 5. Preview
132
133
Show the report and, if it will be published, where to ("Will post to: team-chat (#standup), wiki"). Ask whether to change anything. Apply edits and show it again until the user approves.
134
135
## 6. Save
136
137
Write to `reports.<kind>.output` if set, otherwise `<output.dir>/<kind>-<from>[_<to>].md` (default `~/.reportsmith/out`). Create missing folders, and ask before overwriting. Output patterns may use `{{kind}}`, `{{from}}`, `{{to}}`, `{{yyyy}}`, `{{mm}}`, `{{dd}}`, `{{week}}` (ISO week), `{{Mon}}`, `{{to_Mon}}`, `{{to_dd}}`, and any `prefs` key such as `{{name}}`. Print the path.
138
139
## 7. Publish
140
141
Only if the kind has `reports.<kind>.publish` destinations or the user names one. Follow `publishing.md`. With "dry run", show the exact calls and make none.
142
143
## Unattended runs
144
145
When run non-interactively (cron, CI, a scheduled agent) with `publish.confirm: false`:
146
- skip the preview
147
- never ask; where you would ask, stop and say why
148
- publish, and print one line per destination with its link or error
149
150
If the scope, the range or a required MCP server is missing, exit with a clear message rather than guessing.
151