WakaTime

v0.0.1

Query WakaTime coding statistics including time ranges, projects, languages, categories, editors, and machines. Use when the user asks about WakaTime, coding...

0· 131·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for chensoul/wakatime-skill.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "WakaTime" (chensoul/wakatime-skill) from ClawHub.
Skill page: https://clawhub.ai/chensoul/wakatime-skill
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: WAKATIME_API_KEY
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install wakatime-skill

ClawHub CLI

Package manager switcher

npx clawhub@latest install wakatime-skill
Security Scan
VirusTotalVirusTotal
Pending
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (WakaTime query) match the declared requirement (WAKATIME_API_KEY) and the included Python CLI which calls the WakaTime hosted API. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md commands and examples map directly to the functions implemented in scripts/wakatime_query.py. The instructions only read the WAKATIME_API_KEY env var and call the WakaTime API; they do not instruct the agent to read arbitrary system files or transmit data to other endpoints.
Install Mechanism
No install spec; this is instruction + included stdlib Python script. No external downloads or package installs are performed by the skill, and the code uses only the Python standard library.
Credentials
Only one credential is required (WAKATIME_API_KEY) and it is the primary credential for the stated purpose. No unrelated secrets or multiple credentials are requested.
Persistence & Privilege
always is false, the skill is user-invocable and not force-included. It does not request or modify other skills or system-wide configs.
Assessment
This skill appears coherent and read-only: it only needs your WakaTime API key and calls the official https://wakatime.com API. Before installing, consider: 1) only provide a WAKATIME_API_KEY if you trust the skill — treat API keys like passwords; 2) run the included script locally (python3 scripts/wakatime_query.py health) to verify behavior in your environment; 3) if API calls fail, note the script constructs HTTP Basic auth by base64-encoding the API key (the server commonly expects the API key as the username with an empty password — some servers expect a trailing colon before encoding). 4) Be aware debug mode prints request URLs to stderr (it does not print the Authorization header), but avoid enabling debug in untrusted contexts. If you want higher assurance, review the full script before use; no other secrets or unusual network endpoints are present.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

EnvWAKATIME_API_KEY
Primary envWAKATIME_API_KEY
latestvk978tzkwy2mhq7qecfkxvj5xcn83wkjb
131downloads
0stars
1versions
Updated 4w ago
v0.0.1
MIT-0

Wakatime

Overview

Wakatime 是一个用于追踪编程时间的工具,可以记录你在不同项目、语言、编辑器中的编码时间。这个技能可以查询 WakaTime 的统计数据,包括时间范围、项目、语言、类别、编辑器和机器的明细。

Quick Start

# 健康检查
python3 scripts/wakatime_query.py health

# 查询项目列表
python3 scripts/wakatime_query.py projects

# 查询今日状态
python3 scripts/wakatime_query.py status-bar

# 查询最近 7 天的统计
python3 scripts/wakatime_query.py stats last_7_days

# 查询昨天(Asia/Shanghai)
python3 scripts/wakatime_query.py summaries --range yesterday --timezone Asia/Shanghai

# 查询特定日期范围
python3 scripts/wakatime_query.py summaries --start 2026-03-18 --end 2026-03-18

Config

Required

  • WAKATIME_API_KEYWakaTime API key

Environment Example

export WAKATIME_API_KEY="your-api-key-here"

Commands

health

快速健康检查,验证 API 连接是否正常。

projects

查询项目列表,返回前 20 个项目及其统计数据。

status-bar

查询今日状态条,显示今日编码时间和活动状态。

all-time-since

查询自账号创建以来的全部统计数据。

stats <range>

查询特定时间范围的统计数据,支持以下命名范围:

  • last_7_dayslast_30_dayslast_6_monthslast_yearall_time

summaries [options]

查询指定日期范围的汇总数据,支持以下选项:

时间范围选择

  • --start YYYY-MM-DD:开始日期(包含)
  • --end YYYY-MM-DD:结束日期(包含)
  • --range <preset>:预设范围
    • yesterday:昨天
    • today:今天
    • last_7_days:最近 7 天
    • last_30_days:最近 30 天
    • all_time:全部时间

筛选条件

  • --project <name>:按项目筛选
  • --branches <comma>:按分支筛选(逗号分隔)
  • --timezone <tz>:指定时区(如 Asia/Shanghai
  • --timeout <seconds>:API 查询超时时间

示例

# 查询昨天(Asia/Shanghai)
python3 scripts/wakatime_query.py summaries --range yesterday --timezone Asia/Shanghai

# 查询最近 30 天
python3 scripts/wakatime_query.py stats last_30_days

# 查询特定项目在最近 7 天的数据
python3 scripts/wakatime_query.py summaries --range last_7_days --project myproject

# 查询特定日期
python3 scripts/wakatime_query.py summaries --start 2026-03-01 --end 2026-03-15

Output

所有命令返回 JSON 格式数据,包含:

  • grand_total:总统计(时间、小时、文本)
  • projects:项目列表(按总时间排序)
  • languages:语言列表(按总时间排序)
  • categories:类别列表(Browsing、Coding、Writing Docs 等)
  • editors:编辑器列表(VS Code、IntelliJ IDEA 等)
  • machines:机器列表
  • dependencies:依赖包列表

Notes

  • 所有请求使用 HTTP Basic Auth,Authorization: Basic <base64(api_key)>
  • 只读操作,不会修改任何数据
  • 时区参数影响 --range 预设的日期边界
  • 对于预设范围(如 yesterdaytoday),建议配合 --timezone 使用以确保日期计算正确

Troubleshooting

常见问题

  1. 认证失败:检查 WAKATIME_API_KEY 是否正确
  2. 连接超时:尝试增加 --timeout 参数

调试

在命令中添加 -d--debug 打印 HTTP 请求详情。

Comments

Loading comments...