agentleFS
nitaybznitaybz/ginnie-agents/.claude/skills/manage-work-hours/SKILL.md

manage-work-hours

Skill18 starsChanged 3 months agoMITView on GitHub

Record an agent's intended availability window in config.json for documentation purposes, and steer users toward the real control (each routine's cron in schedules.json) for actually limiting when an agent speaks. Use when the user says "set work hours", "make agent only respond during business hours", "configure availability", "off hours", or asks how to limit when an agent runs.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 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.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If named, use it. Otherwise list agents/*/ and ask.

    line 33
  2. Distinctive:

    If null/missing, treat as unset.

    line 41
  3. Very specific:

    Before writing anything, tell the user plainly: this only records intended hours for reference.

    line 45
  4. Distinctive:

    If they still want to set/update the record, ask, with current values as defaults:

    line 47
  5. Very specific:

    If you want to check what time the listener thinks it is (e.g.

    line 77

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Manage Work Hours

work_hours does not gate inbound messages. Anyone can @mention, DM, or reply to an agent at any hour, on any day, and it will answer. This was a deliberate framework decision, not a bug: work hours only ever existed to stop an agent from proactively starting a conversation outside its expected hours, and that is already handled by each routine's own cron schedule in agents/<n>/schedules.json — not by this config block.

In practice, work_hours and off_hours_behavior are informational only. Nothing in the listener reads them to decide whether to respond. Set them if you want a documented record of the agent's intended hours, but do not expect them to change runtime behavior.

If what the user actually wants is "stop this agent from doing anything outside business hours," the real lever is the manage-routines skill: constrain or disable the routine's cron expression so it only fires in the desired window. Inbound @mentions/DMs will still be answered 24/7 regardless — there is currently no way to suppress those.

Schema

{
  "work_hours": {
    "enabled": true,
    "start": "09:00",
    "end": "18:00",
    "days": ["mon", "tue", "wed", "thu", "fri"],
    "off_hours_behavior": "deferred_response"
  }
}
  • enabled, start, end, days — record the agent's intended availability window. HH:MM 24h, in the listener's TZ. Purely documentation; not enforced.
  • off_hours_behavior — legacy field, kept only so existing agents' config.json keeps loading. Setting it to "ignore", "deferred_response", or "queue" has no effect on inbound message handling.

Step 1 — Pick the agent

If named, use it. Otherwise list agents/*/ and ask.

Step 2 — Show current state

jq .work_hours "agents/<n>/config.json"

If null/missing, treat as unset.

Step 3 — Gather changes

Before writing anything, tell the user plainly: this only records intended hours for reference; it will not stop the agent from responding outside them. If they want actual off-hours silence for a routine, point them at manage-routines instead.

If they still want to set/update the record, ask, with current values as defaults:

  1. Enabled? yes/no
  2. If yes:
    • Start time — HH:MM in the listener's TZ (echo $TZ to remind the user)
    • End time — HH:MM
    • Days — comma-separated abbreviations, or "weekdays" / "all" / "weekends" as shortcuts

Step 4 — Validate

  • Times parse as HH:MM with valid hours/minutes
  • Days are subset of [sun, mon, tue, wed, thu, fri, sat]

Step 5 — Write

jq '.work_hours = {...}' "agents/<n>/config.json" > /tmp/c.json && mv /tmp/c.json "agents/<n>/config.json"

Pretty-print on save (use jq without -c).

Step 6 — Restart

The listener caches config.json per agent at startup. To pick up the change:

pm2 restart ginnie-agents-listener --update-env

There is nothing to functionally verify afterward — the change is a documentation record, not a behavior switch. Don't send a test message expecting off-hours silence; the agent will respond regardless.

If you want to check what time the listener thinks it is (e.g. to sanity-check the TZ used in the record):

TZ=$(grep -E '^TZ=' .env | cut -d= -f2) date '+%a %H:%M'

Common gotchas

  • "I set off_hours_behavior: ignore but the agent still answers at 2am": expected. work_hours and off_hours_behavior are not enforced on inbound messages. There is no config that silences an agent's replies outside certain hours.
  • Wrong TZ: the framework's TZ env (in .env) is the source of truth for the recorded window.
  • Schedules vs. work hours: a routine fires exactly when its own cron in schedules.json says, regardless of work_hours. To limit when a routine runs, edit its cron expression via manage-routines — that is the only real lever for time-based behavior.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.