setup-wakatime
Skill0 starsChanged 25 days agoMITView on GitHub
Set up WakaTime time-tracking for Claude Code and VS Code.
- Installs packages
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- TserenTserenov/FMT-exocortex-templateedited, first seen Nov 2, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- TserenTserenov/FMT-exocortex-template★ 6435% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository51 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-faultSkill
- apply-capturesSkill
- archgateSkill
- artifactorSkill
- audit-docsSkill
- audit-installationSkill
- author-modeSkill
- bottleneck-pickSkill
- check-secretSkill
- consentSkill
- day-closeSkill
- day-openSkill
- decomposeSkill
- diagnoseSkill
- discovery-sessionSkill
- extendSkill
- fpfSkill
- integration-gateSkill
- iwe-bug-reportSkill
- iwe-platform-redteamSkill
- iwe-restoreSkill
- iwe-rules-reviewSkill
- iwe-updateSkill
- keSkill
- kimi-peer-writerSkill
- local-llmSkill
- month-closeSkill
- org-devSkill
- pack-creatorSkill
- pack-newSkill
- peer-conversationSkill
- personal-guide-renderSkill
- personal-guide-startSkill
- platform-bottleneckSkill
- repo-newSkill
- restore-exocortexSkill
- run-protocolSkill
- skill-creatorSkill
- strategy-sessionSkill
- skill-idSkill
- thinkSkill
- transcribeSkill
- vdvSkill
- verify-hypothesesSkill
- verifySkill
- week-close-pilotSkill
- week-closeSkill
- wp-newSkill
- w-reflectionSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
If not installed — the path depends on the OS:
- Very specific: line 42
Windows (issue #1151): no package manager is available for direct CLI installation.
- Very specific: line 58
If the file does not exist or api_key is missing:
- Distinctive: line 60
Wait for a response.
- Very specific: line 124
Read ~/.claude/settings.json.
- Distinctive: line 144
Ask: "Install WakaTime Desktop App?
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Setup WakaTime Time Tracking
Automated WakaTime setup for tracking working time.
What Gets Installed
- wakatime-cli — CLI for sending heartbeats
- Claude Code Hook — automatic tracking during Claude sessions (category "AI Coding")
- WakaTime Desktop App (optional) — window focus tracking (reading, browser)
Instructions for Claude
Complete each step in order. Before each step, check whether it is already done.
Step 1: wakatime-cli
# Check for presence (wildcard, not exact name — issue #1151: the VS Code
# extension on Windows downloads the binary as wakatime-cli-windows-amd64.exe)
ls ~/.wakatime/wakatime-cli* 2>/dev/null || wakatime-cli --version 2>/dev/nullIf not installed — the path depends on the OS:
macOS:
brew install wakatime-cli
mkdir -p ~/.wakatime
ln -sf $(which wakatime-cli) ~/.wakatime/wakatime-cliWindows (issue #1151): no package manager is available for direct CLI installation.
Install the WakaTime extension for VS Code (Extensions → WakaTime) — it automatically
downloads the binary to ~/.wakatime/wakatime-cli-windows-amd64.exe on first launch.
Steps 2–4 then work as-is: the template scripts search for the file using the
wakatime-cli* wildcard, not an exact name. Alternative without WakaTime:
ActivityWatch via extensions/day-close.before.*.md (see extension README).
Linux: see https://wakatime.com/plugins — use the distribution package or
download the binary manually to ~/.wakatime/wakatime-cli.
Step 2: API Key
cat ~/.wakatime.cfg 2>/dev/nullIf the file does not exist or api_key is missing:
- Tell the user: "A WakaTime API key is required. Get it at https://wakatime.com/settings/api-key (registration required). Paste the key here."
- Wait for a response.
- Write the configuration:
# ~/.wakatime.cfg
[settings]
api_key = <key from user>Step 3: Hook Script
This hook is not included in the template distribution (removed from the platform in v0.34 — user-installed hook only, issue #215): create the file directly with the content below; do not copy it from the repository.
mkdir -p ~/.claude/hooks
cat > ~/.claude/hooks/wakatime-heartbeat.sh << 'EOF'
#!/bin/bash
# Claude Code → WakaTime heartbeat hook
# Sends heartbeats to track AI coding time per project.
# Events: UserPromptSubmit, PostToolUse, Stop
INPUT=$(cat)
CWD=$(echo "$INPUT" | jq -r '.cwd // empty')
EVENT=$(echo "$INPUT" | jq -r '.hook_event_name // empty')
TOOL=$(echo "$INPUT" | jq -r '.tool_name // empty')
# Detect project from git or folder name
if [ -n "$CWD" ] && [ -d "$CWD" ]; then
PROJECT=$(cd "$CWD" && git config --local remote.origin.url 2>/dev/null | sed 's#.*/\([^.]*\)#\1#;s#\.git$##')
PROJECT=${PROJECT:-$(basename "$CWD")}
else
PROJECT="Unknown"
fi
# Category based on event/tool
CATEGORY="ai coding"
if [ "$EVENT" = "PostToolUse" ]; then
case "$TOOL" in
WebSearch|WebFetch) CATEGORY="researching" ;;
Read|Grep|Glob) CATEGORY="code reviewing" ;;
Edit|Write) CATEGORY="coding" ;;
esac
fi
# Resolve the CLI binary by mask, not exact name — issue #1151: the VS Code
# WakaTime extension on Windows downloads it as wakatime-cli-windows-amd64.exe.
WAKATIME_CLI=$(ls -d "$HOME"/.wakatime/wakatime-cli* 2>/dev/null | head -1)
[ -z "$WAKATIME_CLI" ] && exit 0
# Send heartbeat in background (non-blocking, silent)
("$WAKATIME_CLI" \
--entity-type app \
--entity "Claude Code" \
--category "$CATEGORY" \
--project "$PROJECT" \
--plugin "claude-code-wakatime/0.1.0" \
--write \
>/dev/null 2>&1 &)
exit 0
EOF
chmod +x ~/.claude/hooks/wakatime-heartbeat.shStep 4: Hook Configuration in settings.json
Read ~/.claude/settings.json. Add the following entries to the hooks section without removing any existing hooks:
- UserPromptSubmit — add a hook group:
{"hooks": [{"type": "command", "command": "~/.claude/hooks/wakatime-heartbeat.sh"}]} - PostToolUse — add:
{"hooks": [{"type": "command", "command": "~/.claude/hooks/wakatime-heartbeat.sh", "async": true}]} - Stop — add:
{"hooks": [{"type": "command", "command": "~/.claude/hooks/wakatime-heartbeat.sh", "async": true}]}
Step 5: WakaTime Desktop App (macOS only — ask the user)
On Windows/Linux there is no brew equivalent for this step — skip it silently
(ActivityWatch from Step 1 already covers window focus tracking where needed).
Ask: "Install WakaTime Desktop App? It tracks window focus time (when you are reading responses or working in a browser). Requires Accessibility permission on macOS."
If yes:
brew install --cask wakatime
open -a WakaTimeSay: "Grant Accessibility access in System Settings → Privacy & Security → Accessibility."
Step 6: Test
echo '{"cwd": "'$(pwd)'", "hook_event_name": "UserPromptSubmit", "prompt": "test"}' | ~/.claude/hooks/wakatime-heartbeat.sh
sleep 3
WAKA_CLI=$(ls -d ~/.wakatime/wakatime-cli* 2>/dev/null | head -1)
"$WAKA_CLI" --todayShow the result to the user. Say: "Hooks will be picked up on the next Claude Code launch (hooks are loaded at session start)."
Step 7: Summary
Show a table:
| Component | Status |
| wakatime-cli | ✅/❌ |
| API key | ✅/❌ |
| Hook script | ✅/❌ |
| Hooks in settings.json | ✅/❌ |
| Desktop App | ✅/❌/skipped |
| Heartbeat test | ✅/❌ |
Say: "Dashboard: https://wakatime.com/dashboard. Data will appear within 5–15 minutes."
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

