diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.json index b86b1bc..989f4de 100644 --- a/.agents/plugins/marketplace.json +++ b/.agents/plugins/marketplace.json @@ -8,7 +8,7 @@ "name": "computer-usage-summary-skill", "source": { "source": "local", - "path": "./plugins/computer-usage-summary-skill" + "path": "." }, "policy": { "installation": "AVAILABLE", diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da5dfa8..79703f6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,6 +23,6 @@ jobs: - name: Install time zone data run: python -m pip install -r requirements.txt - name: Compile script - run: python -m py_compile plugins/computer-usage-summary-skill/skills/computer-usage-summary/scripts/activitywatch_summary.py + run: python -m py_compile skills/computer-usage-summary/scripts/activitywatch_summary.py - name: Run unit tests run: python -m unittest discover -s tests -v diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b9f78cb..39e2be1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ dependency-free at runtime. Before opening a pull request, run: ```bash -python3 -m py_compile plugins/computer-usage-summary-skill/skills/computer-usage-summary/scripts/activitywatch_summary.py +python3 -m py_compile skills/computer-usage-summary/scripts/activitywatch_summary.py python3 -m unittest discover -s tests -v ``` diff --git a/README.md b/README.md index b2deae6..58a9937 100644 --- a/README.md +++ b/README.md @@ -36,15 +36,15 @@ repository never downloads, installs, or starts ActivityWatch automatically. ## Install In Codex Install the repository as a skill-only Codex plugin, or install the -`plugins/computer-usage-summary-skill/skills/computer-usage-summary` directory -directly with Codex's skill installer. +`skills/computer-usage-summary` directory directly with Codex's skill +installer. For a local clone, the skill directory can also be copied into `~/.codex/skills/computer-usage-summary/`. After this repository is published, a GitHub-directory install looks like: ```text -$skill-installer install https://github.com/liuyewang/computer-usage-summary-skill/tree/main/plugins/computer-usage-summary-skill/skills/computer-usage-summary +$skill-installer install https://github.com/liuyewang/computer-usage-summary-skill/tree/main/skills/computer-usage-summary ``` ## Usage @@ -55,28 +55,28 @@ Or run the bundled script directly: ```bash # Default JSON report for an agent or another program -python3 plugins/computer-usage-summary-skill/skills/computer-usage-summary/scripts/activitywatch_summary.py --date today +python3 skills/computer-usage-summary/scripts/activitywatch_summary.py --date today # Paste an application table into Excel, Numbers, or Feishu Sheets -python3 plugins/computer-usage-summary-skill/skills/computer-usage-summary/scripts/activitywatch_summary.py --date today --format tsv --table apps +python3 skills/computer-usage-summary/scripts/activitywatch_summary.py --date today --format tsv --table apps # Review the Monday-Sunday week containing the anchor date -python3 plugins/computer-usage-summary-skill/skills/computer-usage-summary/scripts/activitywatch_summary.py --date 2026-07-26 --period week --format markdown --table trend +python3 skills/computer-usage-summary/scripts/activitywatch_summary.py --date 2026-07-26 --period week --format markdown --table trend # Review the month containing the anchor date -python3 plugins/computer-usage-summary-skill/skills/computer-usage-summary/scripts/activitywatch_summary.py --date 2026-07-26 --period month --format tsv --table categories +python3 skills/computer-usage-summary/scripts/activitywatch_summary.py --date 2026-07-26 --period month --format tsv --table categories # A readable timeline in Markdown -python3 plugins/computer-usage-summary-skill/skills/computer-usage-summary/scripts/activitywatch_summary.py --date today --format markdown --table timeline +python3 skills/computer-usage-summary/scripts/activitywatch_summary.py --date today --format markdown --table timeline # Keep timeline titles out of the output -python3 plugins/computer-usage-summary-skill/skills/computer-usage-summary/scripts/activitywatch_summary.py --date today --format tsv --table timeline --hide-titles +python3 skills/computer-usage-summary/scripts/activitywatch_summary.py --date today --format tsv --table timeline --hide-titles # An Excel-friendly CSV file with a UTF-8 BOM -python3 plugins/computer-usage-summary-skill/skills/computer-usage-summary/scripts/activitywatch_summary.py --start 2026-07-20 --end 2026-07-26 --format csv --table apps --csv-bom --output weekly-apps.csv +python3 skills/computer-usage-summary/scripts/activitywatch_summary.py --start 2026-07-20 --end 2026-07-26 --format csv --table apps --csv-bom --output weekly-apps.csv # Create a client-ready timesheet from local app/title mapping rules -python3 plugins/computer-usage-summary-skill/skills/computer-usage-summary/scripts/activitywatch_summary.py --date today --period week --rules examples/rules.json --format csv --report client-timesheet --csv-bom --output client-timesheet.csv +python3 skills/computer-usage-summary/scripts/activitywatch_summary.py --date today --period week --rules examples/rules.json --format csv --report client-timesheet --csv-bom --output client-timesheet.csv ``` Tables are available as `summary`, `apps`, `projects`, `categories`, `trend`, diff --git a/plugins/computer-usage-summary-skill/.codex-plugin/plugin.json b/plugins/computer-usage-summary-skill/.codex-plugin/plugin.json deleted file mode 100644 index bc5c4c5..0000000 --- a/plugins/computer-usage-summary-skill/.codex-plugin/plugin.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "computer-usage-summary-skill", - "version": "0.2.0", - "description": "Privacy-first, cross-platform local ActivityWatch summaries for Codex.", - "author": { - "name": "liuyewang", - "url": "https://github.com/liuyewang" - }, - "homepage": "https://github.com/liuyewang/computer-usage-summary-skill", - "repository": "https://github.com/liuyewang/computer-usage-summary-skill", - "license": "MIT", - "keywords": ["codex", "activitywatch", "productivity", "privacy", "time-tracking"], - "skills": "./skills/", - "interface": { - "displayName": "Computer Usage Summary", - "shortDescription": "Private local ActivityWatch summaries", - "longDescription": "Summarize local application activity, foreground sessions, AFK time, and sanitized timelines without uploading usage data.", - "developerName": "liuyewang", - "category": "Productivity", - "capabilities": ["Local analysis", "Spreadsheet export"], - "websiteURL": "https://github.com/liuyewang/computer-usage-summary-skill", - "privacyPolicyURL": "https://github.com/liuyewang/computer-usage-summary-skill/blob/main/PRIVACY.md", - "termsOfServiceURL": "https://github.com/liuyewang/computer-usage-summary-skill/blob/main/LICENSE", - "defaultPrompt": [ - "Summarize what I did on my computer today.", - "Create a paste-ready table of my app usage this week.", - "Show a private timeline of my local computer activity." - ], - "brandColor": "#0F766E" - } -} diff --git a/skills b/skills deleted file mode 120000 index 80f369d..0000000 --- a/skills +++ /dev/null @@ -1 +0,0 @@ -plugins/computer-usage-summary-skill/skills \ No newline at end of file diff --git a/plugins/computer-usage-summary-skill/skills/computer-usage-summary/SKILL.md b/skills/computer-usage-summary/SKILL.md similarity index 100% rename from plugins/computer-usage-summary-skill/skills/computer-usage-summary/SKILL.md rename to skills/computer-usage-summary/SKILL.md diff --git a/plugins/computer-usage-summary-skill/skills/computer-usage-summary/agents/openai.yaml b/skills/computer-usage-summary/agents/openai.yaml similarity index 100% rename from plugins/computer-usage-summary-skill/skills/computer-usage-summary/agents/openai.yaml rename to skills/computer-usage-summary/agents/openai.yaml diff --git a/plugins/computer-usage-summary-skill/skills/computer-usage-summary/scripts/activitywatch_summary.py b/skills/computer-usage-summary/scripts/activitywatch_summary.py similarity index 100% rename from plugins/computer-usage-summary-skill/skills/computer-usage-summary/scripts/activitywatch_summary.py rename to skills/computer-usage-summary/scripts/activitywatch_summary.py diff --git a/tests/test_activitywatch_summary.py b/tests/test_activitywatch_summary.py index 9e71925..1d4e29f 100644 --- a/tests/test_activitywatch_summary.py +++ b/tests/test_activitywatch_summary.py @@ -7,7 +7,7 @@ ROOT = Path(__file__).resolve().parents[1] -SKILL_ROOT = ROOT / "plugins" / "computer-usage-summary-skill" / "skills" / "computer-usage-summary" +SKILL_ROOT = ROOT / "skills" / "computer-usage-summary" SCRIPT = SKILL_ROOT / "scripts" / "activitywatch_summary.py" SPEC = importlib.util.spec_from_file_location("activitywatch_summary", SCRIPT) summary_script = importlib.util.module_from_spec(SPEC)