Skip to main content
skill CX Codex

time-of-day — Claude Code skill: find your productive hours

Sorts sessions and events into hour-of-day and day-of-week bins, then marks peak and low-output windows. Useful when you plan a work schedule.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill time-of-day -a claude-code
Open on GitHub

What time-of-day does

The skill pulls the session list, per-session events and daily analytics trends, then drops everything into 24 hourly and 7 weekday buckets. Output is Markdown: text bars such as 09:00 ████████ 24, plus tables with completion rate, average cost and the model that dominates each day.

Busy hours and productive hours are counted separately. A slot can be packed with sessions and still show short fragmented turns, and the report keeps those apart. Low-output windows are backed by error and compaction timing taken from the event stream.

Arguments can be left empty, set to a window like “last 30 days”, or pointed at a project path to scope the run to one cwd. Sessions missing started_at or the focus metadata are skipped, and their count is reported. Costs come out in USD with 4 decimals; durations are converted from ms to minutes.

What it helps with

  • see which hours finish sessions instead of abandoning them
  • tell heavy hours apart from genuinely productive ones
  • line up API errors and compactions with the time of day
  • pick a block for deep work and one for shallow tasks
  • compare weekdays by cost and dominant model

Example prompts for the agent

  • Show my activity by hour for the last 30 days
  • Break down the weekday pattern for ~/work/api
  • Which windows are low-output because of errors and compactions?

How to install time-of-day

1Skills CLI (Vercel)

npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill time-of-day -a claude-code

2Manually: put the files in place

~/.claude/skills/time-of-day/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/time-of-day/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about time-of-day

How do I install time-of-day in Claude Code?

Run npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill time-of-day -a claude-code. The skill file lands at ~/.claude/skills/time-of-day/SKILL.md.

What does time-of-day do?

It buckets sessions and events by hour and weekday, flags the windows with high completion and long turns against the fragmented ones, and suggests which blocks suit deep work.

What data does the skill need?

The session list, events for a given session, and daily analytics trends. Sessions without started_at or turn metadata are left out of the buckets.

Source text

SKILL.md · MIT
---
name: time-of-day
description: >
  Discover when you are most active and most productive with Claude Code by
  bucketing sessions and events into hour-of-day and day-of-week bins from their
  timestamps, then flagging peak versus low-output windows. Uses the session
  list, per-session events, and analytics daily trends. Use when planning a
  schedule or deciding when to do deep work versus lighter tasks.
---

# Time of Day

Profile activity and productivity across the hours of the day and days of the week.

## Input

The user provides: **$ARGUMENTS**

This may be:
- empty or "all" (default: all available sessions)
- a window like "last 30 days" or "last 90 days" to limit the analysis
- a project path to scope the analysis to one `cwd`

## Data Sources

| Endpoint | Returns |
|----------|---------|
| `GET /api/sessions?limit=500` | Sessions with `started_at`, `ended_at`, `status`, `cwd`, `cost`, and `metadata` (turn_count, total_turn_duration_ms) — primary source for hour/weekday bucketing |
| `GET /api/events?session_id=X` | Events with `timestamp` and `event_type` (PreToolUse, PostToolUse, Stop, Compaction, APIError, etc.) — finer-grained activity within sessions and error timing |
| `GET /api/analytics` | `daily_sessions` / `daily_events` (365d) and `sessions_by_status` for trend context and completion baselines |

## Report Sections

### 1. Activity by Hour of Day
Bucket sessions (by `started_at`) and events (by `timestamp`) into 24 hourly bins.
Show a text bar chart of session and event counts per hour. Identify the busiest
hours by raw volume.

### 2. Productivity by Hour of Day
For each hour bin, compute completion rate (`completed / total` sessions started in
that hour) and average sustained turn time
(`total_turn_duration_ms / turn_count`, ms → minutes). Distinguish "active" hours
(high volume) from "productive" hours (high completion + sustained turns).

### 3. Day-of-Week Pattern
Bucket the same metrics into 7 weekday bins. Table: weekday, sessions, completion
rate, avg cost, dominant model.

### 4. Peak vs. Low-Output Windows
- **Peak windows:** hours/days with high completion rate and long sustained turns.
- **Low-output windows:** hours/days with high abandonment/error/Compaction rates
  or fragmented short turns. Pull error timing from `/api/events` event types
  (APIError, Compaction) to corroborate.

### 5. Schedule Recommendation
Suggest which hour/weekday blocks to reserve for deep work and which to use for
lighter or shallower tasks, grounded in the buckets above.

## Output

- Markdown with text-based bar charts (e.g., `09:00 ████████ 24`) for the hourly
  and weekday distributions.
- Tables for the hour and weekday metrics; ▲ / ▼ for above/below the overall mean.
- Currency in USD to 4 decimals; durations in minutes (convert from ms).
- Cite only numbers from the API. State how many sessions/events were bucketed and
  exclude sessions missing `started_at` or the focus metadata, noting the count.

© hoangsonww · MIT · hoangsonww/Claude-Code-Agent-Monitor

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set20

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor