Install
openclaw skills install whatpulse-ai-agent-skillQuery WhatPulse computer usage statistics using natural language. Keystrokes, mouse activity, application screen time, network bandwidth, website tracking, uptime, and profiles. Reads the local WhatPulse SQLite database in strict read-only mode. Triggers: "whatpulse", "keystrokes", "mouse distance", "app usage", "screen time", "bandwidth", "computer stats", "typing stats"
openclaw skills install whatpulse-ai-agent-skillYou help the user explore their WhatPulse computer usage data: keystrokes, mouse activity, application usage, network bandwidth, uptime, and more. Answer natural language questions by querying the local SQLite database.
The user asked: $ARGUMENTS
sqlite3 -readonly. No exceptions.Query format: ALWAYS use a heredoc to pass SQL to sqlite3. This avoids shell interpretation issues (e.g. ! in != triggers bash history expansion inside double quotes). NEVER pass SQL as a quoted string argument. Always use this exact pattern:
sqlite3 -readonly "<DB_PATH>" -header -column <<'QUERY'
SELECT ... FROM ... WHERE day != '0000-00-00'
QUERY
The <<'QUERY' (with single quotes around the delimiter) ensures the shell does not interpret any characters inside the SQL. This is mandatory. Do not use -e, inline strings, or double-quoted SQL arguments.
Check these locations in order. Use the first one found.
$WHATPULSE_DB environment variable (if set; enables remote/synced access)~/Library/Application Support/WhatPulse/whatpulse.db%LOCALAPPDATA%\WhatPulse\whatpulse.db~/.config/whatpulse/whatpulse.dbwhatpulse.db in the current working directoryRun a quick check at the start:
# macOS/Linux
DB="${WHATPULSE_DB:-}" && [ -z "$DB" ] && for p in "$HOME/Library/Application Support/WhatPulse/whatpulse.db" "$LOCALAPPDATA/WhatPulse/whatpulse.db" "$HOME/.config/whatpulse/whatpulse.db" "./whatpulse.db"; do [ -f "$p" ] && DB="$p" && break; done && echo "DB: $DB"
| Table | Granularity | Key Columns |
|---|---|---|
keypresses | day + hour | count, profile_id |
keypress_frequency | day + hour + key | key (Qt key code), count, profile_id |
keypress_frequency_application | day + hour + key + path | same + path |
keycombo_frequency | day + hour + combo | combo (format: "shift,command,65"), count, profile_id |
keycombo_frequency_application | day + hour + combo + path | same + path |
| Table | Granularity | Key Columns |
|---|---|---|
mouseclicks | day + hour | count, profile_id |
mouseclicks_frequency | day + hour + button | button, count, profile_id |
mouseclicks_frequency_application | day + hour + button + path | same + path |
mousedistance | day + hour | distance_inches, profile_id |
mousescrolls | day + hour + direction | direction (1=up,2=down,3=left,4=right), count, profile_id |
mousepoints | day + hour | x, y, display_id (heatmap coordinates) |
| Table | Key Columns |
|---|---|
applications | path (PK), name, bundle_identifier, app_category, vendor_name, version, server_category, server_tags |
input_per_application | day + hour + path, keys, clicks, distance_inches, scrolls, profile_id |
application_active_hour | day + hour + path, msec_active, profile_id |
application_activeuptime_hour | day + hour + path, msec_active, profile_id |
application_uptime | path, time (total seconds), last_active, last_used, profile_id |
application_bandwidth | day + hour + path, download, upload (bytes), profile_id |
applications_upgrades | path, previous_version, current_version, upgrade_date |
pending_applications_stats | path, keys, clicks, download, upload, uptime, distance_inches, scrolls |
| Table | Key Columns |
|---|---|
network_interface_bandwidth | day + hour + mac_address, download, upload (bytes) |
country_bandwidth | day + hour + country (2-letter code), download, upload, profile_id |
network_protocol_bandwidth | day + hour + protocol + port_number, download, upload, profile_id |
network_interfaces | mac_address, description, wifi (bool), ip_list |
| Table | Key Columns |
|---|---|
uptimes | boot_time, end_time (each boot session) |
uptime_hour | day + hour, msec_active, profile_id |
activeuptime_hour | day + hour, msec_active, profile_id |
profiles | id, name, active (bool), managed |
computer_info | name, value (hardware specs) |
settings | name, value |
unpulsed_stats | name, value (stats not yet synced to server) |
| Table | Key Columns |
|---|---|
website_domains | id, domain, first_seen_at, last_seen_at |
website_time_series | day_utc + hour_utc + domain_id + app_identifier, active_seconds, key_count, click_count, scrolls, mouse_distance_in, profile_id |
| Table | Purpose |
|---|---|
fact | Built-in insight queries from WhatPulse (SQL in data_query column) |
milestones / milestones_log | User-defined milestones |
input_controllers | Connected controllers (gamepads, etc.) |
application_ignore / network_interfaces_ignore / website_domains_ignore | Excluded items |
The key column in frequency tables uses Qt key codes. Common mappings:
Printable ASCII: codes 32 to 126 map directly. 32=Space, 48 to 57=0 to 9, 65 to 90=A to Z, etc.
Special keys:
| Code | Key | Code | Key |
|---|---|---|---|
| 16777216 | Escape | 16777217 | Tab |
| 16777219 | Backspace | 16777220 | Return |
| 16777221 | Enter (numpad) | 16777222 | Insert |
| 16777223 | Delete | 16777232 | Home |
| 16777233 | End | 16777234 | Left Arrow |
| 16777235 | Up Arrow | 16777236 | Right Arrow |
| 16777237 | Down Arrow | 16777238 | Page Up |
| 16777239 | Page Down | 16777248 | Shift |
| 16777249 | Control | 16777250 | Meta/Super |
| 16777251 | Alt/Option | 16777252 | CapsLock |
| 16777264 to 16777275 | F1 to F12 |
Combo format: modifier names joined by commas, then the key code. Example: shift,command,65 = Shift+Cmd+A.
When displaying key frequencies, map codes to readable names. For unmapped codes, show the raw number with a note.
Always JOIN applications to get readable names:
SELECT a.name, SUM(i.keys) as total_keys
FROM input_per_application i
JOIN applications a ON a.path = i.path
GROUP BY i.path ORDER BY total_keys DESC LIMIT 10;
Always JOIN website_domains for domain names:
SELECT d.domain, SUM(w.active_seconds) as seconds
FROM website_time_series w
JOIN website_domains d ON d.id = w.domain_id
GROUP BY w.domain_id ORDER BY seconds DESC LIMIT 10;
Filter out null dates: Many tables may have '0000-00-00' placeholder dates. Always filter with WHERE day != '0000-00-00'.
Profile filtering: If the user asks about a specific work context, filter by profile_id after looking up the profile name in profiles. If they do not specify, aggregate across all profiles but mention the breakdown is available.
Unit conversions to use when presenting results:
Provide a quick daily briefing by running these queries:
fact table queries or generate your own)When relevant to the user's question, mention things like:
:00 suffixFor remote instances (e.g., OpenClaw running on a different machine), the database can be made available by:
sqlite3 original.db ".backup '/path/to/synced/copy.db'" for a safe snapshot.export WHATPULSE_DB="/path/to/synced/whatpulse.db" on the remote machine.# Example: sync every 4 hours on macOS/Linux
0 */4 * * * sqlite3 ~/Library/Application\ Support/WhatPulse/whatpulse.db ".backup '/path/to/synced/whatpulse.db'"
The .backup command creates a consistent snapshot even while WhatPulse is running.