跳到主要内容
知仓学习社ZHICANG

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 su…

联网写文件读环境变量(配置)严重 0 · 高危 1hashgraph-online/awesome-codex-plugins

它会碰到什么

扫了多少3 个文本文件,29 KB
它会碰到什么联网写文件读环境变量(配置)
命中总数5 处
命中统计严重 0 · 高 1 · 中 4 · 低 0

关于「读环境变量(配置)」:这个技能会读 process.env 之类的环境变量,但读到的都是端口、目录、超时这类配置项,没有读取密钥类变量。扫描规则原本把「读环境变量」一律算作「读凭据」,本站按变量名做了细化区分,命中明细仍如实列在下面。

逐条看命中(1 条严重或高危)
  • scripts/activitywatch_summary.py:98cred-envread
    candidates.append(os.environ.get("TZ"))

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

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

  1. Treat the requested dates as local calendar days.
  2. Resolve the Mac system IANA timezone and state it with the UTC offset. Only an explicit --timezone value may override the system timezone.
  3. Convert every displayed timestamp to that timezone. Do not display raw UTC timestamps in a human report.
  4. Merge duplicate and overlapping AFK intervals before calculating time.
  5. 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.
  6. Report untracked time separately. Do not relabel missing coverage as away time.
  7. Treat foreground_sessions as observed foreground intervals, not process launches.
  8. Treat browser rows as observed foreground pages, not a list of every open browser tab.

Workflow

  1. Establish the inclusive local date range and state the timezone.
  2. Run the bundled script:

~~~bash

python3 scripts/activitywatch_summary.py --date today

~~~

The default command returns a complete copyable Markdown report.

For a multi-day report:

~~~bash

python3 scripts/activitywatch_summary.py --start YYYY-MM-DD --end YYYY-MM-DD

~~~

For structured model analysis, request JSON explicitly:

~~~bash

python3 scripts/activitywatch_summary.py --start YYYY-MM-DD --end YYYY-MM-DD --format json

~~~

For copyable or spreadsheet-ready tables:

~~~bash

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

~~~

Use --timezone Area/City only when the user explicitly requests a timezone different from the Mac system timezone.

Use --min-tab-seconds 120 for a compact browser table. The default value is 0, which includes every normalized foreground browser page.

  1. Use JSON data to reconstruct daily activities from application names and sanitized titles.
  2. Mark an activity confirmed when a title directly supports it. Otherwise mark it unknown context.
  3. 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.
  1. If ActivityWatch is unavailable or empty, use the fallback workflow and label unavailable metrics.

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 | Best-supported daily theme |

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.

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

  1. State that historical foreground time, AFK time, and sessions are unavailable.
  2. If useful, report the current frontmost application and currently running user applications as a live snapshot only.
  3. Use Screen Time only when the user shares values visible in its App & Website Activity view. Label them Screen Time reported.
  4. Inspect browser history, terminal history, or recent documents only after explicit permission for that source. Treat timestamps as clues, not durations.
  5. 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.

  1. Inspect /Applications/ActivityWatch.app, running processes, Login Items, and ~/Library/Application Support/activitywatch/.
  2. Do not reinstall or replace a working installation.
  3. Use one installation channel. Prefer Homebrew stable builds when compatible; use official releases otherwise.
  4. Verify with codesign --verify --deep --strict and spctl --assess --type execute before launching an unfamiliar build.
  5. Start only the built-in window and AFK watchers by default.
  6. Do not enable browser extensions, sync, cloud storage, exports, or additional watchers without explicit permission.
  7. Let macOS request Accessibility permission through its normal interface.
  8. 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.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 1,027
本站分层T1
该仓技能数1910
原文件路径plugins/liuyewang/computer-usage-summary-skill/skills/computer-usage-summary/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 1910 个技能