agentleFS
Edmonds-Commerce-LimitedEdmonds-Commerce-Limited/claude-code-hooks-daemon/.claude/skills/mode/SKILL.md

mode

Skill4 starsChanged 16 days agoMITView on GitHub

Get or set daemon operating mode - switch between default and unattended (blocks Stop events) - and turn this session's focus mode or manual-goals mode on or off

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • VercelSkill

    setup

    Set up Vercel CLI and project configuration. Use when the user says "set up Vercel", "configure Vercel", "link to Vercel", or "vercel init".

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow its output exactly.

    line 18
  2. Distinctive:

    When enabled, a mode interceptor runs before the handler chain on every event:

    line 71
  3. Distinctive:

    SubagentStop events: NOT blocked (subagents should stop normally)

    line 74
  4. Distinctive:

    When switching to unattended mode, you can include a custom message that gets appended to the block reason.

    line 81

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “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

/mode - Daemon Mode Management

Run this first

Claude Code loads this markdown and nothing else — the file below is not run for you, and it holds the procedure to follow (Plan 00324):

bash "${CLAUDE_SKILL_DIR:-.claude/skills/mode}/invoke.sh" <the arguments the user typed>

Follow its output exactly; what is written here is orientation.

Description

View or change the daemon's operating mode. Supports default (normal operation) and unattended (blocks Stop events to keep Claude working autonomously).

Usage

# Show current mode
/mode
/mode get

# Switch to unattended mode (blocks Stop events)
/mode unattended

# Switch to unattended with custom task message
/mode unattended finish the release and run all tests

# Switch back to default mode
/mode default

# Focus THIS session on one task (session mode; see focus_mode_trigger)
/mode focus <task>

# End focus (aliases: done, end, disable)
/mode focus off

# Manual goals for THIS session: no automated goal write or retirement clear (alias: off)
/mode goals manual

# Back to automated goals (alias: on)
/mode goals auto

/mode goals manual|auto runs hooks-daemon goals off|on, the same as typing hooks-daemon goals manual as a whole prompt; see CLAUDE/SessionModes.md (manual-goals).

/mode focus is the same as typing hooks-daemon focus <task> at the start of a prompt: it changes only the current session, not the daemon-wide mode. It runs hooks-daemon session-mode focus <task> / session-mode focus off; /mode get also prints session-mode get. hooks-daemon mode-history lists every session's live modes and the recent mode transitions, each with what triggered it.

Modes

ModeBehaviour
defaultNormal operation - all handlers process events as configured
unattendedBlocks Stop events unconditionally to keep Claude working without interruption

What Unattended Mode Does

When enabled, a mode interceptor runs before the handler chain on every event:

  • Stop events: Blocked with a DENY response instructing Claude to continue working
  • SubagentStop events: NOT blocked (subagents should stop normally)
  • All other events: Pass through to normal handler chain unchanged

The interceptor includes re-entry protection (checks stop_hook_active flag) to prevent infinite loops.

Custom Messages

When switching to unattended mode, you can include a custom message that gets appended to the block reason. This lets you give Claude specific instructions about what to work on:

/mode unattended complete all remaining tasks in the plan

The message appears in the Stop event denial reason, so Claude sees it when it tries to stop.

Python Path Detection

There is no interpreter to detect. The deployed wrapper resolves the fingerprint-keyed venv itself, and lives at the same place relative to the daemon root in both install modes:

# self-install (daemon development)
./bin/hooks-daemon <command>

# normal install
.claude/hooks-daemon/bin/hooks-daemon <command>

IPC Protocol

The skill communicates with the daemon via Unix socket system requests:

Get mode:

{"event": "_system", "hook_input": {"action": "get_mode"}}

Set mode:

{"event": "_system", "hook_input": {"action": "set_mode", "mode": "unattended", "custom_message": "optional"}}

Session modes (one session):

{"event": "_system", "hook_input": {"action": "get_session_modes", "session_id": "<id>"}}
{"event": "_system", "hook_input": {"action": "enter_focus", "session_id": "<id>", "task": "<task>"}}
{"event": "_system", "hook_input": {"action": "exit_focus", "session_id": "<id>"}}

Output

On get mode:

Mode: default

On set unattended:

Mode: unattended (changed)
Message: finish the release

On set default:

Mode: default (changed)

Requirements

  • Daemon must be running
  • Python venv must be available (self-install or normal install)

Version

Introduced in: v2.17.0

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.