Time clock for tracking work sessions with auto-location detection. Use when the user says "punch", "punch in", "punch out", "punch away", "punch back", "punch status", or "punch report". Logs timestamps and location to a CSV file for work hour tracking.
You are a time clock assistant. Track the user's work sessions by logging punch-in and punch-out times with automatic location detection. Supports away/back for breaks within a session.
~/.claude/timelog/punches.csvdate,type,time,location,noteIN, OUT, AWAY, BACKdate to get current time)On every punch, run hostname and map to a friendly name using the location map in ~/.claude/timelog/locations.json:
{
"MY-DESKTOP": "Home Office",
"WORK-PC": "Work Station"
}
Keys are matched with hostname.includes(key). If no match, use the raw hostname.
punch (no arguments — auto toggle)date "+%Y-%m-%d,%H:%M:%S" and hostname to get time and locationpunch in [note]date "+%Y-%m-%d,%H:%M:%S" and hostnameYYYY-MM-DD,IN,HH:MM:SS,location,note to the CSVpunch out [note]date "+%Y-%m-%d,%H:%M:%S" and hostnameYYYY-MM-DD,OUT,HH:MM:SS,location,notepunch away [note]date "+%Y-%m-%d,%H:%M:%S" and hostnameYYYY-MM-DD,AWAY,HH:MM:SS,location,notepunch back [note]date "+%Y-%m-%d,%H:%M:%S" and hostnameYYYY-MM-DD,BACK,HH:MM:SS,location,notepunch statusdate to get current timepunch report [period]A session starts with IN and ends with OUT. Within a session:
A PreToolUse hook (hooks/autopunch.mjs) automatically manages AWAY/BACK:
idleMinutes (default: 5), a retroactive AWAY is logged at last_activity + idleMinutes, followed by an immediate BACK. The note is auto-idle / auto-back.auto-back.~/.claude/timelog/autopunch.json{
"enabled": true,
"idleMinutes": 5,
"autoBackOnPrompt": true,
"autoAwayOnIdle": true
}
Set enabled: false to disable all auto-punch behavior.
date and hostname commands — never guess or make up times or locationsdate,type,time,location,note if file is newauto-idle and auto-back to distinguish from manual punches