break-time
Skill0 starsChanged 18 days agoMITView on GitHub
Track wall-clock time across a Claude Code session and nudge the user to take a break at configurable intervals (default 45/90/120 minutes). Uses a UserPromptSubmit hook to inject break reminders into the next response. Includes commands to snooze and reset the timer. Use when the user asks to set up break reminders, work-rest cycles, time-aware nudges, says "snooze break-time", "when's my next break", "I'm taking a break now", or invokes /break-time.
In this repository8 other files it gives its agents.
- llms.txtllms.txt
- bpmnemonicSkill
- llms-txtSkill
- memoriaSkill
- poet-commitSkill
- repo-badgesSkill
- seo-geo-auditSkill
- vibeasfuncSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
If you've never written a hook, read HOOKS-101.md first.
- Distinctive: line 17
When you cross a configurable threshold (default 45, 90, 120 minutes), injects a one-shot nudge into Claude's context.
- Very specific: line 31
Run the scripts as bash "${CLAUDE_SKILL_DIR}/scripts/<name>.sh".
- Very specific: line 44
Remove the hook block from ~/.claude/settings.json.
- Very specific: line 60
If a threshold fires, the hook prints the nudge to stdout as plain text.
- Very specific: line 70
If break-time.conf is missing, defaults are used:
- Distinctive: line 85
Snooze respected always: If the user has snoozed, the hook still tracks time but emits nothing.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
break-time
An ambient skill that nudges you to take a break when you've been heads-down too long. Claude itself can't track wall-clock time across responses — it only sees the conversation. Hooks run outside Claude in the harness and can inject context Claude wouldn't otherwise have. That's how this works.
If you've never written a hook, read HOOKS-101.md first. It's a standalone tutorial — copy-paste-friendly, ~15 minutes to read, and it's the foundation for any ambient skill you might want to build later.
What it does
- Tracks the start of the current "active session" (resets after 10 minutes of idle).
- On every prompt you submit, computes how long you've been actively working.
- When you cross a configurable threshold (default 45, 90, 120 minutes), injects a one-shot nudge into Claude's context. Claude will mention it briefly in its next response, in its own voice, before answering your question.
- You can snooze it (
/break-time snooze 60) or reset it (/break-time reset). - Each threshold fires only once per active session — no spam.
Current state
The output of this command, run when the skill loads (or, where Claude Code hands it over instead, run it first). /break-time with no argument needs nothing else:
!bash "${CLAUDE_SKILL_DIR}/scripts/state.sh" || true
Invocation
The skill is two things: a passive hook (runs automatically once installed) and a few active commands for managing it. The only slash command is /break-time; Claude Code derives it from the directory name. Everything else is an argument to it, or plain language.
Run the scripts as bash "${CLAUDE_SKILL_DIR}/scripts/<name>.sh". The working directory is the user's project, not this skill.
| Trigger | Behavior |
| (automatic) | The hook fires on every prompt. No invocation needed once installed. |
/break-time | Show current state (above): how long the active session has been running, when the next threshold fires, snooze status. |
/break-time next | Show only the next scheduled nudge (scripts/next.sh: when it fires, ETA, whether snooze will mute it). |
/break-time snooze [N] | Snooze nudges for N minutes, default 60 (scripts/snooze.sh N). |
/break-time reset | Reset the active session timer, treating now as session start (scripts/reset.sh). |
/break-time configure | Walk the user through editing thresholds in ~/.claude/break-time.conf. |
| Natural language: "snooze break-time", "show next break-time", "when's my next break?", "I'm taking a break now", "stop the timer" | Same |
Disable
Remove the hook block from ~/.claude/settings.json. The skill files can stay; without the hook wired up, they're inert.
Installation
- Copy
break-time/to~/.claude/skills/break-time/. - Add the hook block from
example-settings.jsonto your~/.claude/settings.json(the file already exists; merge, don't overwrite). The hook stays in settings rather than in this skill's frontmatter on purpose: frontmatter hooks register only once the skill is invoked, and a break reminder has to run in sessions where nobody invoked anything. - Restart Claude Code so the harness picks up the new hook.
- That's it. The hook runs on every prompt from now on.
Full beginner walkthrough is in HOOKS-101.md.
How the hook works (mechanically)
- You submit a prompt.
- The harness calls
bash ~/.claude/skills/break-time/scripts/check_break.shbefore Claude sees the prompt. - The hook reads
~/.claude/break-time.state(a flat key-value file), computes elapsed time, and decides if any threshold has been crossed. - If a threshold fires, the hook prints the nudge to stdout as plain text. For
UserPromptSubmit, the harness adds plain stdout to Claude's context and labels it as hook output itself, so the script does not wrap it in tags. - Claude sees the reminder and weaves it into its response: "By the way, you've been heads-down for 90 minutes — stand up and walk for five before we keep going. Now, about your question..."
- Each fired threshold is recorded in the state file so it doesn't fire again until the active session resets.
Configuration
State and config live in ~/.claude/:
break-time.state— runtime state (session_start, fired thresholds, snooze)break-time.conf— optional user config (thresholds, idle gap, message style)
If break-time.conf is missing, defaults are used:
THRESHOLDS="45 90 120" # minutes — when to nudge
IDLE_GAP=10 # minutes of idle = new session
STYLE=friendly # friendly | aggressive | poeticSTYLE=poetic makes the nudge a haiku (cross-skill love letter to poet-commit).
Safety guardrails
- Never blocks a prompt. The hook always exits 0 — if it fails, the user's work is unaffected.
- Always logs to a file (
~/.claude/break-time.log) so debugging is possible without surfacing errors in-band. - Capped output. The nudge is one short paragraph. Never floods the context window.
- Snooze respected always. If the user has snoozed, the hook still tracks time but emits nothing.
- No network calls. Pure local file I/O. Never delays the prompt.
Files in this skill
SKILL.md— this fileHOOKS-101.md— standalone tutorial on writing hooks (publishable)example-settings.json— copy-paste hook config for~/.claude/settings.jsonscripts/check_break.sh— the hook itselfscripts/snooze.sh— snooze nudges for N minutesscripts/reset.sh— reset the active session timerscripts/state.sh— print current state (the command under Current state above)scripts/next.sh— print just the next scheduled nudge (used by/break-time next)README.md— short install instructions
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

