computer-usage-summary
Use when the user asks what they did on a Mac, requests a daily or multi-day ActivityWatch report, needs foreground app time, browser page or tab summaries, local-time activity timelines, or copyable Markdown, TSV, or CSV usage tables.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 1.6k
- Forks
- 491
01 前言 Front Matter
- name
- computer-usage-summary
- description
- Use when the user asks what they did on a Mac, requests a daily or multi-day ActivityWatch report, needs foreground app time, browser page or tab summaries, local-time activity timelines, or copyable Markdown, TSV, or CSV usage tables.
02 资源文件 10
- 参考文档agents/openai.yaml311 B
- 脚本scripts/activitywatch_summary.py534 B
- 脚本scripts/summary_core/__init__.py1.6 KB
- 脚本scripts/summary_core/classify.py2.6 KB
- 脚本scripts/summary_core/cli.py4.9 KB
- 脚本scripts/summary_core/intervals.py3.8 KB
- 脚本scripts/summary_core/models.py1.7 KB
- 脚本scripts/summary_core/render.py8.9 KB
- 脚本scripts/summary_core/reports.py7.8 KB
- 脚本scripts/summary_core/source.py2.3 KB
03 SKILL.md 正文
Computer Usage Summary
Overview
Use local ActivityWatch data to produce an evidence-based, table-first report of what the user did. Report daily focus, specific activities, local time windows, application usage, and observed foreground browser pages.
This installation records foreground applications, window titles, and AFK status. It does not use browser extensions, cloud sync, browser history, or complete browser URLs.
Core Rules
- Treat the requested dates as local calendar days.
- Resolve the Mac system IANA timezone and state it with the UTC offset. Only an explicit --timezone value may override the system timezone.
- Convert every displayed timestamp to that timezone. Do not display raw UTC timestamps in a human report.
- Merge duplicate and overlapping AFK intervals before calculating time.
- Keep each day's active, away, and coverage values at or below 24 hours, or below the shorter local day during a daylight-saving transition.
- Report untracked time separately. Do not relabel missing coverage as away time.
- Treat foreground_sessions as observed foreground intervals, not process launches.
- Treat browser rows as observed foreground pages, not a list of every open browser tab.
Workflow
- Establish the inclusive local date range and state the timezone.
- Run the bundled script:
python3 scripts/activitywatch_summary.py --date today
The default command returns a complete copyable Markdown report.
For a multi-day report:
python3 scripts/activitywatch_summary.py --start YYYY-MM-DD --end YYYY-MM-DD
For structured model analysis, request JSON explicitly:
python3 scripts/activitywatch_summary.py --start YYYY-MM-DD --end YYYY-MM-DD --format json
For copyable or spreadsheet-ready tables:
python3 scripts/activitywatch_summary.py --start YYYY-MM-DD --end YYYY-MM-DD --format markdown --table daily
python3 scripts/activitywatch_summary.py --start YYYY-MM-DD --end YYYY-MM-DD --format tsv --table apps
python3 scripts/activitywatch_summary.py --start YYYY-MM-DD --end YYYY-MM-DD --format tsv --table browser
python3 scripts/activitywatch_summary.py --start YYYY-MM-DD --end YYYY-MM-DD --format tsv --table timeline
python3 scripts/activitywatch_summary.py --start YYYY-MM-DD --end YYYY-MM-DD --format tsv --table categories
Use --timezone Area/City only when the user explicitly requests a timezone different from the Mac system timezone.
The default browser display threshold is 120 accumulated foreground seconds. Use
--min-tab-seconds 0 when the user asks for every grouped foreground page; the
report still records omitted short visits in browser_short_visits.
- Use JSON data to reconstruct daily activities from application names and sanitized titles.
- Mark an activity confirmed when a title directly supports it. Otherwise mark it unknown context.
- Keep exact time ranges and accumulated foreground duration distinct:
- first_seen to last_active is an observation span and may contain gaps.
- active_duration is accumulated confirmed foreground time.
- If ActivityWatch is unavailable or empty, use the fallback workflow and label unavailable metrics.
Activity categories are deterministic and local-only: development,
communication, research, email, creative, system, or other. main_focus is
the category with the greatest accumulated active time; ties use the fixed
category order. Generic browser titles such as a new-tab page remain
other / unknown context.
Required Output Contract
Return a copyable Markdown report in this order.
1. Scope
State:
- Inclusive local dates
- IANA timezone and UTC offset
- Evidence source
- Coverage limitations
2. Daily Overview Table
Include one row per day with:
| Field | Meaning |
|---|---|
| Date | Local calendar date |
| First-last observed activity | Observation span, not continuous work |
| Active time | Merged not-afk time |
| Away time | Covered time not classified as active |
| Untracked time | Time outside ActivityWatch coverage |
| Main focus | Highest-duration deterministic category; do not overstate intent |
Include a total row for multi-day reports.
3. Daily Activity Timeline
Include one copyable table per day with:
| Field | Meaning |
|---|---|
| Start-end | Local time window |
| Main activity | Short category |
| Specific work | Concrete action supported by titles |
| Application or page | Sanitized evidence |
| Confidence | confirmed or unknown context |
| Source | ActivityWatch |
Activities may overlap when the user switched repeatedly between related applications. Do not describe first-to-last spans as continuous focus.
4. Application Table
Include application, foreground sessions, numeric active seconds, HH:MM:SS duration, first seen, last active, and source.
For a multi-day report, show the leading applications per day. Include all applications when the user asks for a full export.
5. Browser Foreground Page Table
Include:
| Field | Meaning |
|---|---|
| Browser | Chrome, Safari, Firefox, Edge, Brave, Arc, or another detected browser |
| Page title | Sanitized and normalized foreground title |
| What it was for | Activity inferred from the title; use unknown context when unsupported |
| First seen | Local timestamp |
| Last active | Local timestamp |
| Foreground sessions | Distinct observed foreground intervals |
| Active seconds | Numeric accumulated time |
| Active duration | HH:MM:SS accumulated time |
| Source | ActivityWatch foreground window title |
Group repeated observations by browser and normalized title. Remove browser-profile suffixes, memory-usage suffixes, invisible formatting characters, and duplicate watcher heartbeats.
For a readable default chat report, list pages with at least two minutes of accumulated foreground time and add a short-visit table containing the omitted page count and total duration. If the user asks for every page or every tab, list all rows with no duration threshold.
Explain that ActivityWatch cannot identify background tabs, tabs never brought to the foreground, or two same-title tabs as separate objects.
6. Caveats
State:
- Foreground sessions are not application launch counts.
- First-to-last spans are not continuous use.
- Tracking covers only periods when ActivityWatch was running.
- Browser data covers foreground titles only and does not come from browser history.
- A report with no required ActivityWatch events is unavailable; do not replace it with invented zero-duration totals.
Table Export
- Markdown is the default human-facing format.
- TSV is the preferred paste-ready format for Excel, Numbers, and Feishu Sheets.
- CSV is available for import workflows.
- Include numeric seconds and HH:MM:SS durations.
- Escape cells beginning with =, +, -, or @.
- Do not save, upload, or share a report unless the user explicitly asks.
Local Data and Recovery
- ActivityWatch stores local data under ~/Library/Application Support/activitywatch/.
- Use only http://127.0.0.1:5600; never expose the service beyond the Mac.
- If the server or required buckets are unavailable, report the condition and offer repair.
- Do not derive historical duration from process uptime, application start time, browser history, terminal history, or unified logs.
No-ActivityWatch Fallback
- State that historical foreground time, AFK time, and sessions are unavailable.
- If useful, report the current frontmost application and currently running user applications as a live snapshot only.
- Use Screen Time only when the user shares values visible in its App & Website Activity view. Label them Screen Time reported.
- Inspect browser history, terminal history, or recent documents only after explicit permission for that source. Treat timestamps as clues, not durations.
- Explain that ActivityWatch cannot reconstruct time before tracking began.
ActivityWatch Setup
Use this section only when ActivityWatch is missing, stopped, or the user asks to install or repair it.
- Inspect /Applications/ActivityWatch.app, running processes, Login Items, and ~/Library/Application Support/activitywatch/.
- Do not reinstall or replace a working installation.
- Use one installation channel. Prefer Homebrew stable builds when compatible; use official releases otherwise.
- Verify with codesign --verify --deep --strict and spctl --assess --type execute before launching an unfamiliar build.
- Start only the built-in window and AFK watchers by default.
- Do not enable browser extensions, sync, cloud storage, exports, or additional watchers without explicit permission.
- Let macOS request Accessibility permission through its normal interface.
- Confirm the local server, currentwindow bucket, afkstatus bucket, and sample events before claiming tracking works.
Privacy Rules
- Include the minimum useful title context.
- Never output browser URLs. Replace URL-like titles with [URL omitted].
- Redact titles that reveal passwords, API keys, payment identifiers, identity documents, banking details, or raw user data.
- Do not inspect browser history, terminal history, recent documents, or undocumented system databases without source-specific permission.
- Keep reports local to the current conversation unless the user explicitly requests an export.
04 同仓库更多 Skills
worktable-review-with-annotations
Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.
worktable-find-and-synthesize-context
Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.
worktable-create-or-update-docs
Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.
worktable-create-or-manage-records
Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.
worktable-create-or-manage-interactive-html
Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.
worktable-collaborate-threads
Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.