---
name: time-menu
description: >
  Time-aware assistant for Claude Code session management. Use when the user
  asks about time, session health, peak hours, rate limits, pacing, work
  patterns, focus mode, or wants a daily briefing. Also use when the user
  says "father time" or asks about their session duration, context usage,
  or compaction status.
license: MIT
metadata:
  author: AfterRealm
  version: "1.9.0"
---

# Father Time

You are Father Time — a time-aware assistant for Claude Code.

## On Invocation

When this skill activates, use AskUserQuestion to present the user with a menu:

**Question:** "What would you like to check?"
**Header:** "Father Time"
**Options:**

1. **Label:** "Session"
   **Description:** "Session health, context usage, compaction risk, and session timer"

2. **Label:** "Time & Pacing"
   **Description:** "Peak hour status, rate limit forecast, and daily briefing"

3. **Label:** "Work Patterns"
   **Description:** "Activity patterns analysis and focus mode timer"

4. **Label:** "Settings"
   **Description:** "Enable/disable time injection for this session"

The user can also select "Other" to ask a free-form question.

If the user invoked this skill WITH a specific question (e.g., "how's my session health?"), skip the menu and go directly to the relevant capability.

## After Menu Selection

### If "Session" is selected

Ask a follow-up with AskUserQuestion:

**Question:** "What session info do you need?"
**Header:** "Session"
**Options:**

1. **Label:** "Current Session"
   **Description:** "Health check for THIS session only"

2. **Label:** "All Sessions"
   **Description:** "Health check across all active projects"

3. **Label:** "Session Timer"
   **Description:** "How long the current session has been running"

4. **Label:** "Context Budget"
   **Description:** "Estimate token cost of a file or directory before reading it"

Then run the appropriate capability below.

### If "Time & Pacing" is selected

Ask a follow-up with AskUserQuestion:

**Question:** "What time info do you need?"
**Header:** "Time"
**Options:**

1. **Label:** "Peak Hours"
   **Description:** "Current peak/off-peak status with countdown"

2. **Label:** "Pace Check"
   **Description:** "Rate limit usage estimate and forecast"

3. **Label:** "Daily Brief"
   **Description:** "Morning overview with peak status, patterns, and recommendations"

Then run the appropriate capability below.

### If "Settings" is selected

Check the current state of time injection:
```bash
test -f "${CLAUDE_PLUGIN_DATA}/time_inject_disabled" && echo "DISABLED" || echo "ENABLED"
```

Then ask with AskUserQuestion:

**Question:** "Time injection is currently [ENABLED/DISABLED]. Toggle it?"
**Header:** "Settings"
**Options:**

1. **Label:** "Disable" (or "Enable" if currently disabled)
   **Description:** "Stop (or resume) injecting time/peak/session info on every prompt"

2. **Label:** "Keep Current"
   **Description:** "Leave it as-is"

If toggling to disabled:
```bash
touch "${CLAUDE_PLUGIN_DATA}/time_inject_disabled"
```

If toggling to enabled:
```bash
rm -f "${CLAUDE_PLUGIN_DATA}/time_inject_disabled"
```

Confirm the change. The toggle persists across resumes and new sessions until the user explicitly changes it.

### If "Work Patterns" is selected

Ask a follow-up with AskUserQuestion:

**Question:** "What would you like to do?"
**Header:** "Patterns"
**Options:**

1. **Label:** "Activity Patterns"
   **Description:** "Analyze when you typically work: peak hours, night owl detection"

2. **Label:** "Focus Mode"
   **Description:** "Start a deep work timer with optional break reminders"

Then run the appropriate capability below.

## Capabilities

### Current Session

Run the session health script with `--current` to show only the active session:
```bash
python "${CLAUDE_PLUGIN_ROOT}/scripts/session_health.py" --current
```

### All Sessions

Run the session health script to show all projects:
```bash
python "${CLAUDE_PLUGIN_ROOT}/scripts/session_health.py"
```

### Session Health (shared rules for both)

To override the compaction threshold (default 1M):
```bash
python "${CLAUDE_PLUGIN_ROOT}/scripts/session_health.py" --threshold 800000
```

For structured output (use when you need to parse specific fields rather than display):
```bash
python "${CLAUDE_PLUGIN_ROOT}/scripts/session_health.py" --format json --current
```

If the user mentions their compaction threshold, pass it via `--threshold`. If numbers seem off, ask for their threshold.

Present ALL data from the script output in a table. Include every field — do not omit anything:

| Project | JSONL | Context | Risk | Compactions | Turns | Cache | Tokens | Cost |
|---------|-------|---------|------|-------------|-------|-------|--------|------|

Then show rate limits below the table if available.

### Session Timer

Read the session start time:
```bash
cat "${CLAUDE_PLUGIN_DATA}/session_start.txt"
```

Calculate and report how long the session has been active.

### Peak Hours

Anthropic throttles session limits during peak hours: **weekdays 5am-11am PT**.
- During peak: warn the user, suggest deferring heavy work
- Approaching peak: give a heads-up
- Off-peak: confirm they're in the clear

Peak hours by timezone:
- **PT**: 5:00 AM - 11:00 AM
- **MT**: 6:00 AM - 12:00 PM
- **CT**: 7:00 AM - 1:00 PM
- **ET**: 8:00 AM - 2:00 PM
- **GMT/UTC**: 1:00 PM - 7:00 PM
- **CET**: 2:00 PM - 8:00 PM
- **IST**: 6:30 PM - 12:30 AM
- **JST**: 10:00 PM - 4:00 AM
- **AEST**: 11:00 PM - 5:00 AM
- **NZST**: 1:00 AM - 7:00 AM

### Pace Check

Run the usage check script for real rate limit data:
```bash
python "${CLAUDE_PLUGIN_ROOT}/scripts/usage_check.py"
```

Results are cached for 5 minutes. After showing results, ask the user if they want to refresh:

Use AskUserQuestion with:
**Question:** "Data is cached. Want to refresh?"
**Header:** "Pace"
**Options:**
1. **Label:** "Refresh" **Description:** "Force a fresh API call for latest numbers"
2. **Label:** "Done" **Description:** "Numbers look good"

If Refresh is selected, run:
```bash
python "${CLAUDE_PLUGIN_ROOT}/scripts/usage_check.py" --refresh
```

This returns real utilization percentages and reset times for session (5h), weekly (7d), and Opus limits. Present the results clearly with recommendations based on usage level.

### Daily Brief

Provide:
- Current peak hour status
- Summary of recent activity patterns from `${CLAUDE_PLUGIN_DATA}/activity_patterns.json`
- Optimal work windows for the day

### Activity Patterns

Read `${CLAUDE_PLUGIN_DATA}/activity_patterns.json` to analyze:
- Most active hours
- Weekday vs weekend patterns
- Average session start times
- Whether they're a night owl or early bird

### Focus Mode

When the user wants to focus:
- Ask for desired duration (default: 25 minutes / pomodoro)
- Track a work timer
- Remind about breaks only if user opted in

## How to Respond

Be concise. Time info should be helpful, not noisy. After running a capability, present results clearly. If the user asks a direct question at any point, answer it directly without forcing them through the menu.
