35 lines
1.4 KiB
Markdown
35 lines
1.4 KiB
Markdown
---
|
||
name: am-i-free
|
||
description: Check whether the user has served their 4 hours at the Long Day Factory and can go home. Reads ~/long-day-factory.json, subtracts the lunch break from time in the office, and reports remaining time (or freedom) with a message of comfort. Use when the user asks "am I free", "can I go home", "how long have I been here".
|
||
---
|
||
|
||
# am-i-free
|
||
|
||
Does the math: **time served = (now − startTime) − lunch break**. The user is
|
||
free once time served reaches **4 hours**.
|
||
|
||
## Steps
|
||
|
||
1. Run:
|
||
|
||
```bash
|
||
python3 "$CLAUDE_SKILL_DIR/am_i_free.py"
|
||
```
|
||
|
||
Fallback path: `~/.claude/skills/am-i-free/am_i_free.py`.
|
||
|
||
2. Handle the exit code:
|
||
- **Exit 3** — `startTime` missing. Tell the user to run `long-day-start`.
|
||
- **Exit 2** — `NEEDS_LUNCH_DECISION`. The user probably forgot to log lunch.
|
||
Ask which they want:
|
||
- assume the standard **11:30–12:30** lunch and save it →
|
||
`python3 "$CLAUDE_SKILL_DIR/am_i_free.py" --default-lunch`
|
||
- assume a flat **1h** lunch without saving →
|
||
`python3 "$CLAUDE_SKILL_DIR/am_i_free.py" --flat-hour`
|
||
- **Exit 0** — read the output.
|
||
|
||
3. Deliver the verdict with humor and a genuine message of comfort:
|
||
- **FREE**: congratulate them, tell them the overtime damage, send them home.
|
||
- **NOT FREE**: give the remaining time and the "parole at HH:MM" clock time,
|
||
and offer some dark encouragement to keep them going.
|