-
Notifications
You must be signed in to change notification settings - Fork 233
Update Computer Usage Summary to v0.2.1 root skill layout #329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
liuyewang
wants to merge
6
commits into
hashgraph-online:main
Choose a base branch
from
liuyewang:agent/update-computer-usage-summary-v021-upstream
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d43cd42
Replace stale skill symlink with v0.2.1 files
liuyewang 9e116d3
Mirror v0.2.1 SKILL.md
liuyewang 2a885e5
Mirror v0.2.1 agents/openai.yaml
liuyewang cbde5be
Mirror v0.2.1 scripts/activitywatch_summary.py
liuyewang c28c583
Update mirrored plugin manifest to v0.2.1
liuyewang 2b94130
Fix review issues in computer usage summary mirror
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
93 changes: 93 additions & 0 deletions
93
...s/liuyewang/computer-usage-summary-skill/skills/computer-usage-summary/SKILL.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| --- | ||
| name: computer-usage-summary | ||
| description: Summarize what a user did on macOS, Windows, or Linux using local ActivityWatch records, with privacy-preserving live-state and Screen Time fallbacks when records are unavailable. Use for daily activity summaries, app usage time, foreground sessions, AFK time, timelines, and paste-ready spreadsheet tables. | ||
| --- | ||
|
|
||
| # Computer Usage Summary | ||
|
|
||
| ## Overview | ||
|
|
||
| Use local ActivityWatch data first. This skill supports macOS, Windows, and | ||
| Linux wherever the local ActivityWatch API and Python 3.9+ are available. The | ||
| intended privacy-balanced setup records | ||
| only foreground apps, sanitized window titles, and AFK state. Do not install | ||
| browser extensions, enable `aw-sync`, configure cloud storage, or expose the | ||
| local API. | ||
|
|
||
| Accurate historical app time and AFK time exist only from the time | ||
| ActivityWatch starts recording. Do not infer them from process uptime, macOS | ||
| system logs, browser history, or undocumented databases. | ||
|
|
||
| ## Setup And Verification | ||
|
|
||
| Use this section only when ActivityWatch is missing, stopped, or needs repair. | ||
|
|
||
| 1. Inspect the local ActivityWatch application, its startup setting, local | ||
| processes, and the current user's ActivityWatch data directory. Do not | ||
| replace a working installation. | ||
| 2. Let the user choose an official installation source. Before launching it or | ||
| enabling automatic startup, verify the publisher and operating-system | ||
| security status. On macOS, use `codesign --verify --deep --strict` and | ||
| `spctl --assess --type execute`. Stop if validation fails unless the user | ||
| explicitly decides otherwise. | ||
| 3. Enable only the window and AFK watchers. Let macOS request Accessibility | ||
| permission through its normal interface; never bypass or change privacy | ||
| permissions programmatically. | ||
| 4. On Windows, install the bundled `requirements.txt` once so Python can | ||
| resolve IANA time zones such as `Asia/Singapore` consistently. | ||
| 5. Confirm the local `http://127.0.0.1:5600` server has `currentwindow` and | ||
| `afkstatus` buckets containing events. The default AFK threshold is 180 | ||
| seconds. | ||
|
|
||
| ## No-ActivityWatch Fallback | ||
|
|
||
| When the app, local API, buckets, or requested-range events are unavailable: | ||
|
|
||
| - Mark active time, AFK time, sessions, and launch counts as `unavailable`, | ||
| not zero. | ||
| - A current frontmost-app or running-app snapshot is only evidence of the | ||
| present, not the requested range. | ||
| - Use Screen Time only when the user makes its visible totals available; label | ||
| it `Screen Time reported` and do not read private databases. | ||
| - Inspect browser history only for an explicit website-level request. Inspect | ||
| recent documents or terminal history only after explicit, source-specific | ||
| permission. Treat all such results as metadata clues, not durations. | ||
|
|
||
| ## Workflow | ||
|
|
||
| 1. Establish the local date range and time zone. | ||
| 2. Run `scripts/activitywatch_summary.py --date today`, use `--period week` or | ||
| `--period month` around an anchor date, or use inclusive `--start YYYY-MM-DD | ||
| --end YYYY-MM-DD` dates. Add `--timezone Area/City` for reproducible local | ||
| timestamps. Keep `--api-url` on the loopback interface. | ||
| 3. Use `active_seconds` and `afk_seconds` only when ActivityWatch confirms | ||
| them. Describe `foreground_sessions` as observed foreground intervals, not | ||
| process launches. | ||
| 4. Use sanitized app names and window titles to reconstruct the timeline. A | ||
| title is `confirmed` only when it directly supports the described activity. | ||
| 5. When the user needs project/client or billable reporting, offer an optional | ||
| local JSON `--rules` file. Match only sanitized titles. Explain that the | ||
| first matching rule wins and never create or upload rules without consent. | ||
| 6. For spreadsheet output, run one table per command: | ||
| - `--format markdown --table apps` for chat. | ||
| - `--format tsv --table apps` to copy directly into spreadsheet software. | ||
| - `--format tsv --table timeline` for chronological rows. | ||
| - `--format csv --table apps --csv-bom --output report.csv` for an | ||
| Excel-friendly file, only when the user asks to save one. | ||
| - `--report client-timesheet` for project/client billable rows. | ||
| - `--report weekly-review` for a compact review table. | ||
| - `--report app-trend` for local daily trend rows. | ||
| 7. When ActivityWatch is unavailable, return its structured reason. Markdown, | ||
| TSV, and CSV outputs provide `status`, `reason`, and `source` columns. | ||
|
|
||
| ## Privacy Rules | ||
|
|
||
| - Treat window titles as sensitive. Remove URLs, truncate long titles, and | ||
| never include complete browser URLs. | ||
| - Keep default sanitized titles for a useful timeline; use `--hide-titles` if | ||
| the user wants a title-free export. | ||
| - Use the smallest useful amount of title context; application and summary | ||
| tables do not need titles. | ||
| - Escape spreadsheet cells that could be interpreted as formulas. | ||
| - Keep reports local to the current conversation. Do not export, upload, or | ||
| share activity data without explicit user approval. | ||
4 changes: 4 additions & 0 deletions
4
...s/liuyewang/computer-usage-summary-skill/skills/computer-usage-summary/agents/openai.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| interface: | ||
| display_name: "Computer Usage Summary" | ||
| short_description: "Private local app, project, and billable reports" | ||
| default_prompt: "Use $computer-usage-summary to create a private weekly local activity review with a paste-ready project and app table." |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.