360 Secure SkillHub
360 安全技能中心

RescueTime

该 Skill 使用 curl 调用 RescueTime 开放 API,按 rank/interval 视角和 activity/category/productivity 维度获取用户屏幕时间、应用使用与生产力脉冲数据,并支持按日期与小时范围查询,用于输出每日或每周的电脑活动与效率分析报告。需在 TOOLS.md 或调用中提供 API Key。

rusynandriy
rusynandriy
热度 96.17
最近更新 2026-05-11 15:53:42
分类:数据依赖:代码执行 / 第三方 API应用场景:报告撰写 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add rescuetime
Metadata
name
rescuetime
description
Fetch productivity data from RescueTime. Use when the user asks about their screen time, productivity score, app usage, time tracking, how they spent their day/week, or wants reports on their computer activity. Requires API key in TOOLS.md or passed directly.

RescueTime

Fetch productivity analytics from the RescueTime API.

Setup

Store API key in TOOLS.md:

### RescueTime
- API Key: YOUR_KEY_HERE

Get a key at: https://www.rescuetime.com/anapi/manage

API Endpoints

Analytic Data (main endpoint)

curl "https://www.rescuetime.com/anapi/data?key=API_KEY&format=json&perspective=rank&restrict_kind=activity"

Parameters:

  • perspective: rank, interval, member
  • restrict_kind: category, activity, productivity, efficiency, document
  • interval: month, week, day, hour (only for interval perspective)
  • restrict_begin / restrict_end: YYYY-MM-DD
  • restrict_thing: filter to specific app/site/category

Daily Summary Feed

curl "https://www.rescuetime.com/anapi/daily_summary_feed?key=API_KEY"

Returns last 14 days with productivity_pulse (0-100), total_hours, categories.

Productivity Levels

  • 2: Very Productive (coding, writing, Terminal, IDEs)
  • 1: Productive (communication, reference, learning)
  • 0: Neutral (uncategorized)
  • -1: Distracting (news, shopping)
  • -2: Very Distracting (social media, games)

Common Queries

Today's activity by app:

curl "https://www.rescuetime.com/anapi/data?key=API_KEY&format=json&perspective=rank&restrict_kind=activity&restrict_begin=$(date +%Y-%m-%d)&restrict_end=$(date +%Y-%m-%d)"

Productivity breakdown:

curl "https://www.rescuetime.com/anapi/data?key=API_KEY&format=json&perspective=rank&restrict_kind=productivity"

By category:

curl "https://www.rescuetime.com/anapi/data?key=API_KEY&format=json&perspective=rank&restrict_kind=category"

Hourly breakdown today:

curl "https://www.rescuetime.com/anapi/data?key=API_KEY&format=json&perspective=interval&restrict_kind=productivity&interval=hour&restrict_begin=$(date +%Y-%m-%d)&restrict_end=$(date +%Y-%m-%d)"

Response Format

{
  "row_headers": ["Rank", "Time Spent (seconds)", "Number of People", "Activity", "Category", "Productivity"],
  "rows": [[1, 3600, 1, "VS Code", "Editing & IDEs", 2], ...]
}

Convert seconds to hours: seconds / 3600

Tips

  • Productivity pulse 75+ is good, 85+ is excellent
  • Category view helps see broad patterns
  • Use interval perspective with hour for time-of-day analysis
  • Data syncs every 3 min (premium) or 30 min (free)