Claude Session Ping — Productivity skill for Claude Code
macOS launchd agent that keeps Claude Code's 5-hour session window open on a fixed daily schedule — reads the real window from /usage, detects when a ping was absorbed, self-schedules a backup ping to.
How to install Claude Session Ping
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open mattsebastianh/claude-session-ping and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Session Ping does
macOS launchd agent that keeps Claude Code's 5-hour session window open on a fixed daily schedule — reads the real window from /usage, detects when a ping was absorbed, self-schedules a backup ping to close the gap, and optionally reports to Telegram with a schedule Q&A bot
Alternatives in Productivity
- Ccseva — A beautiful macOS menu bar app for tracking your Claude Code usage in real-time 787 ★
- Browser Harness JS — Self-healing browser harness that enables LLMs to complete any task 480 ★
- Lasso Claude-hooks — Prompt injection defense hooks: scans files, web fetches, and command output in real-time 160 ★
README
claude-session-ping
[](LICENSE) [](https://www.apple.com/macos/) [](scripts/claude_session_ping.sh)
A macOS `launchd` agent that pings Claude Code on a fixed daily schedule to activate/keep alive the 5-hour session usage window — no LLM required to decide *when* to fire, only plain system scheduling and shell code.
How it works
**`launchd/com.claude-session-ping.plist`** — a launch agent template. macOS's own scheduler (`StartCalendarInterval`) fires it daily at:
- 07:02
- 12:02
- 17:02
- 22:02
launchd runs jobs with a minimal environment (bare `PATH`, no `USER`/ `LOGNAME`), which isn't enough to find the `claude` CLI or for it to look up your login/auth. The template sets `PATH` (including `~/.local/bin`, where `claude` is commonly installed) and `USER`/ `LOGNAME` explicitly via `EnvironmentVariables`, templated with `{{HOME_DIR}}`/`{{USER}}` placeholders that `install.sh` fills in.
**`scripts/claude_session_ping.sh`** — the script launchd runs. It:
- Checks the current time is at one of the four targets above, or up to
65 minutes after one (
CLAUDE_SESSION_PING_GRACE_MINUTES) — see Sleep below. - Sends a keepalive ping (defaults to
claude -p "..."). - If it detects a usage-limit/blocked response, retries up to 4 times, waiting 5 minutes between attempts (5 attempts total per window).
- Logs everything to
logs/claude-session-ping.login the project directory (override withCLAUDE_SESSION_PING_LOG). - Asks Claude for the real usage window via
claude -p "/usage"and reports the true start/end in notifications. That question fires the moment the ping returns, so it can arrive before the just-opened window has registered; if the answer is "no session",
- Checks the current time is at one of the four targets above, or up to
65 minutes after one (
Related Skills
Daily Rollup
Use when summarizing or recapping recent vault activity — a daily, weekly, or periodic review of what changed,
Freshquota
Optimize Claude Code 5-hour rolling window quota timing — auto-triggers at the best time, even while your Mac
Claude Code macOS Scheduler
Native macOS app to schedule and automate Claude Code CLI tasks using launchd. Swift + SwiftUI, MVVM architect
Claude Session Limit Breaker
Runs claude -p on a fixed daily schedule.
Daily Update
Daily - Daily update - reads the owner's timezone from CLAUDE.md; morning prep before 17:00 local time (or if
Morning Coffee
Daily focus picker. Reads your workboard, pulls today's calendar and recent emails, helps you pick 2-3 things
Related Agents
Schedules
Configure manual or cron-based Agent runs and inspect each Schedule trigger through SandBase Sessions.
Design Workbench
macOS Workbench Designer on the Atlas bench. Owns installed-app proof, the 14-inch first viewport, wide-screen
Example: Incremental Data Pipeline Pattern
from datetime import datetime, timedelta @dag(schedule="@daily", catchup=False) def incremental_sales_pipeline