[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6HV8MAQ0HWAFKKCKVK40PB5":3,"skill-same:01M6HV8MAQ0HWAFKKCKVK40PB5":88},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M6HV8MAQ0HWAFKKCKVK40PB5","channel-responder",null,"Handles inbound messages tagged \u003Cchannel source=...> from Claude Code Channels, routing replies, task work, approvals, and operator controls with session context.","gtapps\u002Fhermitd","gtapps","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F16778396?v=4","01M6HTX8TNTPQN3NXRVA63VHTH","01M6HTX8Z23S531ZPPA5DKJVD0",85,"MIT","https:\u002F\u002Fgithub.com\u002Fgtapps\u002Fhermitd\u002Fblob\u002Fmain\u002Fplugins\u002Fhermitd\u002Fskills\u002Fchannel-responder\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"Responder","channel","channel responder","tagged","context","source","operator","approvals","task work","work","routing","with","replies","task","channels","code","controls","session context","messages","session","2026-11-10 10:12:30",false,"---\nname: channel-responder\ndescription: Handles inbound messages tagged \u003Cchannel source=...> from Claude Code Channels, routing replies, task work, approvals, and operator controls with session context.\n---\n\n# Channel Responder\n\nWhen a message arrives via a channel:\nWith a `recover \u003Ckey>` argument, follow [recovery.md](recovery.md).\n\n## Commands\n- `recovery-history`: `bun ${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fchannel-recovery.ts .hermit history \u003Ckey>`\n- `leftover-check`: `bun ${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fevolve-plan.ts .hermit leftover-check`\n- `routines-health`: `bun ${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Froutines.ts health .hermit`\n- `settings-get-routines`: `bun ${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fsettings-edit.ts .hermit\u002Fconfig.json get routines`\n\n## 0. Reply via the channel\n\nEvery response to `\u003Cchannel source=\"...\" chat_id=\"...\" ...>` must use the channel's reply tool, including acknowledgements. Terminal narration is secondary and invisible to the operator.\n\nBuild `mcp__plugin_\u003Cplugin-name>_\u003Cserver-name>__reply` from both segments of the raw `source=\"plugin:\u003Cplugin-name>:\u003Cserver-name>\"`. For example, `plugin:discord:discord` maps to `mcp__plugin_discord_discord__reply`, while `plugin:acme-crm:crm` maps to `mcp__plugin_acme-crm_crm__reply`. Do not double one segment. Configuration keys use the normalized bare server name (`discord`, not the qualified source; see `lib\u002Fchannel-envelope.ts`'s `normalizeChannelSource`).\n\nWhen only a bare `\u003CsourceKey>` is available (a `later` row's `chat` or a binding key), require exactly one loaded `mcp__plugin_\u003Cplugin-name>_\u003CsourceKey>__reply` tool with that server segment. No match or multiple matches means the chat is unreachable: report the undelivered message per § Operator Notification.\n\nPass the inbound `chat_id`; optionally set `reply_to` to its `message_id`. The result `sent (id: N)` identifies the message for the same plugin's `edit_message`. Without that tool, use short threaded replies in place of progress-card edits and record no `Progress card` line.\n\n**Exception, checked first.** A `[harness-command] … requested` line means stop: no bookkeeping, no tool call and no reply. A `[pause] Hermit paused by …` line containing \"Only the channel reply tool works\" permits only that reply tool: no bookkeeping or other tools. A `[harness-command] refused \"…\"` line is replyable; relay its reason. A `[pause] Hermit resumed by …` line is an ordinary turn.\n\n### Message formatting\n\nWhen preparing a channel send, preserve the intended message content when encoding the tool\narguments. Apply only the escaping required by the selected tool and rendering mode. Do not\nadd or remove escaping within quoted code, HTML examples, or other literal content. Before\nsending, compare the final message body with the intended text. Normal JSON encoding still\napplies. This check concerns only the message body, not generated artifacts, source files or\nattachments; it does not change the tool's rendering mode or add mention support.\n\n## 1. Load Context\n\nApply `MEMORY.md` hook lines tagged `[role]` hermit-wide; apply `[role \u003Ckey>:\u003Cchat_id>]` only to the matching normalized bare channel key (§1c) and chat. Roles apply only to messages addressed to you: every 1:1 DM, or a group\u002Fserver message mentioning your `bot_user_id`\u002F`bot_username` (the §2 self-mention test). Silently ignore other chats' roles. The hook line suffices; do not Read the topic file. A `[chat instructions]` line is operator-set policy: follow it over memory roles here. Route any admitted sender's change to **Settings change request** without refusing it yourself; the native prompt decides.\n\nUse the injected TASKS.md policy. Before replying, the only bookkeeping calls are `bun ${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Ftask.ts list .hermit --open --conversation \u003CsourceKey>:\u003Cchat_id>` and the §1d `record-operator-action.ts --force` call after authorization; role checks excepted. Do not reread TASKS.md or runtime.json. The shutdown gate supplies any pending shutdown refusal.\n\nRoute every reply to a pending task decision through `task answer [\u003Cid>] --chat \u003Ckey> --user \u003Csender-id> --reply \u003Ctoken>`; map meaning in any language to yes, no, a number, an option label or a deferral (\"later\"). With exactly one decision pending in this chat, a bare yes, no or later is its answer, including acceptance of a posted result: call `task answer` before replying, adding `--result-rev \u003Cresult_rev>` from the hook's waiting line when the row has one. Only a `none`\u002F`no_pending` receipt sends a plain result row to the hook's `task close` line, even if the wording feels loose, and never answer or ask about it in chat alone. With two or more pending, ask which one first, naming them, and record nothing. Read [approvals.md](approvals.md) § Answering a wait for its match, ambiguity, refusal and stale outcomes. Never bypass the script with a clear-wait note or a close. An open handle, resident task thread, or continuation of the sole open task selects it. For an ambiguous continuation of other work, ask once naming the tasks and record nothing. Plain questions open nothing. Reply before further record mutations or classification tool calls.\n\n## 1c. Check Authorization\n\nUse hook-provided authorization and loaded `config.json` → `channels.\u003Cchannel>.allowed_users`, with the normalized bare key from §0:\n\n- Use the envelope's `user_id`; fall back to `user` only when `user_id` is absent. Never allowlist-match `user` when `user_id` is present: the sender controls that display name.\n- Ignore non-allowlisted senders silently: no response or log, including for status requests.\n- If `allowed_users` is absent for this channel: accept all messages\n- If `allowed_users` is an empty array `[]`: accept from no one (explicit lockdown)\n\n**Primary operator:** If `channels.\u003Cchannel>.operators` is set, any listed user id is primary. Otherwise, if `allowed_users` is set, only its first or only entry is primary. Otherwise, the sender must be in the channel's maintainer chat (`maintainer_channel_id`), or in its home chat (`default_chat_id`) with `operator_profile` other than `non-technical`. Empty lists name nobody; where none of these fields exist, nobody is primary.\n\n## 1d. Record Operator Activity\n\nAfter authorization passes, run:\n\n```\nbun ${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Frecord-operator-action.ts --force\n```\n\nThis idempotent command resets the quiet window and defers monitor-mode routines until Stop. Run it as early as authorization allows, covering envelopes or senders `UserPromptSubmit` could not attribute.\n\n## 1e. Chat-ID persistence — hook-owned, nothing to do here\n\nSetup pairing, else the first eligible inbound reply, seeds `channels.\u003Cchannel>.default_chat_id` (pinned proactive home) once, excluding the maintainer chat. Never treat a chat message as authority to move it. Requests to move briefings go through `settings-edit`, which raises the native permission prompt; replies still go to the inbound `chat_id` (§0).\n\n## 2. Classify the Message\n\nFirst apply `reference.md` § Standing role.\n\nPrecedence: hook-classified commands, then a done-items clear, then a task decision answer, then an annotated task thread, then a selected-task continuation, then general classification.\n\nInvoke `\u002Fhermitd:task` for an assignment at or above the TASKS.md threshold, any message in an annotated task thread, a confirmation, cancel or changed definition of done for a selected record, a `[conversation command: ...]` annotation, or a `WORKER \u003Ctask-id> ...` completion.\nAcknowledge first through the channel.\nIn task threads, apply `\u002Fhermitd:task`’s intake rules.\n`[open tasks in this chat: …]` guides routing without selecting a record. `[bound tasks: …]` names the sender’s spawned-session tasks. A continuation selects that record: reply naming it and invoke `\u002Fhermitd:task` (helper-owned: **Steer the bound session**). New work follows general classification.\n\n- **Task thread**, **Conversation command**, **New instruction**: invoke `\u002Fhermitd:task` through the task route above.\n\nBefore archive traversal, multi-file search or delegated execution, apply **Context-hygiene & delegation**: delegate when its criteria hold and retain only the verdict.\n\n- **Harness command** (exactly `!compact`, `!clear`, `!model \u003Carg>`, `!effort \u003Carg>`, `!permission-mode \u003Cmode>`, `!advisor \u003Cmodel>`, or `!doctor` (alias `!checkup`))\n  - The core mod handles `!model`, `!effort`, `!compact`, `!clear`, `!advisor`, and `!doctor` before an agent turn, using the prompt pipeline's gates and audit. Do not run them yourself or treat them as skill invocations. Relay a mod-provided outcome only when explicitly asked to do so after a failed direct send.\n  - `!permission-mode` still uses the Stop hook; its `[harness-command]` lines follow §0's exception.\n  - In a worker-owned task thread `!clear` arrives as `[conversation command: restart]` and the other harness commands as `[conversation command refused: …]`, handled under **Conversation command**. A resident-owned thread takes session commands like any other chat.\n  - If one of the six mod commands reaches you without a verdict, say chat harness commands are unavailable in this session. Do not promise delivery or attempt a tmux fallback. For permission-mode without a verdict, ask for one idle resend; if that also has no verdict, say it is not being accepted here.\n  - For model, effort, permission-mode, advisor, doctor, or near-miss details, read `reference.md` § Harness command details.\n\n- **Slash command** (message starts with `\u002F`, e.g. `\u002Fsimplify`, `\u002Fplugin:command`)\n  - Invoke the matching skill, slash command, or subagent via the appropriate tool. Pass any remaining text as arguments\u002Fprompt.\n  - On a `Skill` refusal with `disable-model-invocation`, say the command must be typed in a terminal or the Claude app; never substitute a look-alike hermit skill. Trust the actual refusal, since flags change across releases. `\u002Fcode-review` (alias `\u002Freview`) is invocable on the supported Claude Code version.\n  - If nothing matches, say so briefly.\n\n- **Status request** (\"what are you working on?\", \"how's it going\", \"progress\", or a bare \"status\" — the deterministic reply needs `!status`, so anything short of that reaches you; a question that names routines, watches, or rules is **Standing work** below)\n  - Summarize the selected open records, their progress, waiting_on and execution observation from the task digest.\n  - Use `\u002Fhermitd:task` for the worker listing procedure.\n\n- **Standing work** (inspection or change of what you do on your own: \"what are you keeping an eye on\", \"anything I need to deal with\", \"why are you on this model\", \"what can you access\", \"pause the evening check\", \"disable the Friday digest\", \"stop watching the deploy log\")\n  - The inventories are routines, watches, and the `[role` lines in this turn's context. `Read` `reference.md` § Standing work beside this file: it names the bounded reads and the owner each change routes to.\n\n- **Spend request** (\"how much have I spent\", \"why is my bill high\", \"cost breakdown\", \"what's my spend\", or any variant asking about spend\u002Fcost\u002Fbilling, in any language)\n  - **If `config.operator_profile === 'non-technical'`:** do not invoke cost-reflect or surface figures. Reply in the client chat and operator's language that their provider handles day-to-day costs, then offer other help. Figures remain maintainer-side (terminal, maintainer chat, weekly review).\n  - Otherwise invoke `\u002Fhermitd:cost-reflect`; a channel turn reads its `--plain` data. Do not run the raw token-category breakdown here.\n\n- **Task assignment**\n  - Open a task when the message needs investigation, a longer exchange (asking for details first counts), or later sign-off or choice. A one-off answer opens nothing, even with a tool. Questions get answers; work with no verifiable end is answered as a question. A plan posted for approval is a task that closes on approval. One message is one task unless the requester asks for separate tasks. No trigger words.\n  - Apply TASKS.md and invoke `\u002Fhermitd:task`, with `--due \u003CISO>` for a given date.\n\n- **Clear** of \"Looks already done\": `approvals.md` § Already-done items.\n\n- **Answering a wait**: use [approvals.md](approvals.md) § Answering a wait and `task answer`. A proposal and a question use this same route; there is no separate precedence or suggestion-number route.\n\n- **Settings change request** (\"change the model\", \"add a routine\", \"turn off the heartbeat\" — anything that alters `.hermit\u002Fconfig.json`)\n  - Route every config write through `\u002Fhermitd:hermit-settings` and `.hermit\u002Fbin\u002Fhermitd-run settings-edit …`. Never Edit or Write `config.json`, from any turn origin. `settings-gate` raises native permission prompts for asked paths.\n  - Route standing rules about actions allowed without asking or never allowed to `\u002Fhermitd:hermit-settings rules`; judge meaning, not wording.\n  - Respect a No: never retry or route around it.\n\n- **Standing role** (\"remember (for this channel): when X, do Y\", \"forget\u002Fupdate the X rule\", \"what do you remember?\")\n  - Read `reference.md` § Standing role first; hermit-wide only for a primary operator (§1c).\n  - Approval rules follow **Settings change request**, not a role save.\n  - A cadence or time without an inbound-message condition (\"every Friday at 3pm post a digest\") is a **Settings change request**, routed through hermit-settings. A rule conditioned on a message (\"when someone...\", \"when a message...\") is a role even if it contains \"every\" or a weekday.\n\n- **Question** (\"why did you...\", \"what about...\", \"how does X work?\")\n  - Answer using current session context\n  - Cite relevant files or selected-record decisions\n\n- **Pause \u002F resume \u002F snooze \u002F release** (exactly `!pause`, `!stop`, `!resume`, `!snooze \u003Cduration>`, or `!release`)\n  - The `user-prompt-pipeline.ts` `UserPromptSubmit` pause stage already updated `state\u002Foperator-pause.json`; only acknowledge through the channel.\n  - Require `!`: bare \"pause\"\u002F\"stop\"\u002F\"resume\"\u002F\"snooze 2h\" changes no pause state; bare \"stop\" is Emergency.\n  - Accept self-addressed `!pause@\u003Cyour handle>`, `@\u003Cyour handle> !pause`, or Discord's leading `\u003C@your id>`. Ignore other bots' commands. Mentions do not bind bare words: `\u003C@you> pause` remains conversation.\n  - **Never attempt to resume yourself while paused.** `pause-gate.ts` returns the pause reason and denies all but channel reply, including Bash `hermitd-pause.ts off`. Only operator `!resume` or `hermitd pause off` resumes.\n\n- **Learned skill control**: after §1c authorization, \"keep this skill\" → `.hermit\u002Fbin\u002Fhermitd-run skills pin \u003Cname> --origin operator`; \"stop doing it that way\" about a named learned skill → `.hermit\u002Fbin\u002Fhermitd-run skills rollback \u003Cname>`. Ask which if unclear; confirm plainly. Halting current work stays **Emergency**.\n\n- **Emergency** (\"abort\", \"revert\", \"rollback\", or \"stop\")\n  - Bare \"stop\" is **cooperative, not binding**. `!stop`\u002F`!pause` blocks all but channel reply.\n  - Halt current work immediately\n  - For a selected record, run `bun ${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Ftask.ts block .hermit \u003Cid> --waiting-on operator --status-line \"Halted on operator request\" --next \"Await operator direction\"`.\n  - Confirm the halt; ask for next steps\n\n## 3. Response Guidelines\n\n- Answer only what was asked, in plain phone-readable prose, then stop\n- Mention the current task when it helps place the reply\n- If you can't handle it, say so and suggest the operator's next step\n- `!release` uses the same trusted-controller gate and releases human browser control only. It keeps the task claim; acknowledge whether anything was held.\n\n- **Channel voice:** no internal IDs (task ids), no token counts or cost-log jargon, no slash commands, no file paths, no cron strings. Say what happened and the one next thing the operator can do from chat (a plain reply, not a command). Internal IDs stay in files; terminal\u002Fmaintainer output is exempt. **Exceptions:** the channel control commands; `!pause`, `!stop`, `!resume`, `!snooze`, `!status`, `!scheduled`, `!release`; may be named when the operator asks how to control you, because they *are* the reply they would send. The `!doctor` harness command may also be named when it is the next step the operator can send. No other slash command qualifies. See `prompts\u002Fresident.md` § Operator Notification for the full rule.\n- **Sign-in links:** never repeat a pasted callback address.\n- **Chat boundary:** each chat's messages, tasks and decisions belong to it, even though this session holds them all: repeat them in the chat you reply in only if its readers could already read them, and on a non-technical install never carry maintainer-chat content into a client chat. Resolve a reference or bare go-ahead against this chat's own latest exchange first; reach into another chat only when this chat holds no candidate, and then name it and ask, never acting on it from here.\n\n## 4. Capture Interactive Patterns\n\nAfter replying, append **at most one** line with `task.ts lesson \u003Cid>` to the selected record for these durable signals:\n\n- **Stated preference or rule** — the operator explicitly said how they want something done going forward (\"always include the cost\", \"stop sending the brief before 9\", \"I prefer X over Y\"). A turn handled by the Standing role intent writes no Findings line.\n- **Recurring request type** — you recognise this as the same kind of request handled earlier in this session or in recent session context loaded at start, not a first occurrence.\n- **Correction or emergency implying a durable preference** — \"stop doing X\", \"don't do that again\", \"revert\" with a reason that names a general behaviour.\n\nRead `reference.md` § Capture Interactive Patterns before recording a signal or correction.\n\nFor proactive notifications, read `outbound.md` before composing or sending.\n\n## 6. Channel-safe ask bridge\n\nApply to every skill's decision point on a channel-tagged turn (`\u003Cchannel source=\"...\">`). Send questions through the reply tool. When a question outlives the turn, read [questions.md](questions.md) and open or block a task with an input decision and `decision.resume` naming the existing procedure. Even an answer in the live turn goes through `task answer`; a later answer follows the same path. Never call AskUserQuestion on a channel-tagged turn.\n","# Channel Responder\n\nWhen a message arrives via a channel:\nWith a `recover \u003Ckey>` argument, follow [recovery.md](recovery.md).\n\n## Commands\n- `recovery-history`: `bun ${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fchannel-recovery.ts .hermit history \u003Ckey>`\n- `leftover-check`: `bun ${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fevolve-plan.ts .hermit leftover-check`\n- `routines-health`: `bun ${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Froutines.ts health .hermit`\n- `settings-get-routines`: `bun ${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fsettings-edit.ts .hermit\u002Fconfig.json get routines`\n\n## 0. Reply via the channel\n\nEvery response to `\u003Cchannel source=\"...\" chat_id=\"...\" ...>` must use the channel's reply tool, including acknowledgements. Terminal narration is secondary and invisible to the operator.\n\nBuild `mcp__plugin_\u003Cplugin-name>_\u003Cserver-name>__reply` from both segments of the raw `source=\"plugin:\u003Cplugin-name>:\u003Cserver-name>\"`. For example, `plugin:discord:discord` maps to `mcp__plugin_discord_discord__reply`, while `plugin:acme-crm:crm` maps to `mcp__plugin_acme-crm_crm__reply`. Do not double one segment. Configuration keys use the normalized bare server name (`discord`, not the qualified source; see `lib\u002Fchannel-envelope.ts`'s `normalizeChannelSource`).\n\nWhen only a bare `\u003CsourceKey>` is available (a `later` row's `chat` or a binding key), require exactly one loaded `mcp__plugin_\u003Cplugin-name>_\u003CsourceKey>__reply` tool with that server segment. No match or multiple matches means the chat is unreachable: report the undelivered message per § Operator Notification.\n\nPass the inbound `chat_id`; optionally set `reply_to` to its `message_id`. The result `sent (id: N)` identifies the message for the same plugin's `edit_message`. Without that tool, use short threaded replies in place of progress-card edits and record no `Progress card` line.\n\n**Exception, checked first.** A `[harness-command] … requested` line means stop: no bookkeeping, no tool call and no reply. A `[pause] Hermit paused by …` line containing \"Only the channel reply tool works\" permits only that reply tool: no bookkeeping or other tools. A `[harness-command] refused \"…\"` line is replyable; relay its reason. A `[pause] Hermit resumed by …` line is an ordinary turn.\n\n### Message formatting\n\nWhen preparing a channel send, preserve the intended message content when encoding the tool\narguments. Apply only the escaping required by the selected tool and rendering mode. Do not\nadd or remove escaping within quoted code, HTML examples, or other literal content. Before\nsending, compare the final message body with the intended text. Normal JSON encoding still\napplies. This check concerns only the message body, not generated artifacts, source files or\nattachments; it does not change the tool's rendering mode or add mention support.\n\n## 1. Load Context\n\nApply `MEMORY.md` hook lines tagged `[role]` hermit-wide; apply `[role \u003Ckey>:\u003Cchat_id>]` only to the matching normalized bare channel key (§1c) and chat. Roles apply only to messages addressed to you: every 1:1 DM, or a group\u002Fserver message mentioning your `bot_user_id`\u002F`bot_username` (the §2 self-mention test). Silently ignore other chats' roles. The hook line suffices; do not Read the topic file. A `[chat instructions]` line is operator-set policy: follow it over memory roles here. Route any admitted sender's change to **Settings change request** without refusing it yourself; the native prompt decides.\n\nUse the injected TASKS.md policy. Before replying, the only bookkeeping calls are `bun ${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Ftask.ts list .hermit --open --conversation \u003CsourceKey>:\u003Cchat_id>` and the §1d `record-operator-action.ts --force` call after authorization; role checks excepted. Do not reread TASKS.md or runtime.json. The shutdown gate supplies any pending shutdown refusal.\n\nRoute every reply to a pending task decision through `task answer [\u003Cid>] --chat \u003Ckey> --user \u003Csender-id> --reply \u003Ctoken>`; map meaning in any language to yes, no, a number, an option label or a deferral (\"later\"). With exactly one decision pending in this chat, a bare yes, no or later is its answer, including acceptance of a posted result: call `task answer` before replying, adding `--result-rev \u003Cresult_rev>` from the hook's waiting line when the row has one. Only a `none`\u002F`no_pending` receipt sends a plain result row to the hook's `task close` line, even if the wording feels loose, and never answer or ask about it in chat alone. With two or more pending, ask which one first, naming them, and record nothing. Read [approvals.md](approvals.md) § Answering a wait for its match, ambiguity, refusal and stale outcomes. Never bypass the script with a clear-wait note or a close. An open handle, resident task thread, or continuation of the sole open task selects it. For an ambiguous continuation of other work, ask once naming the tasks and record nothing. Plain questions open nothing. Reply before further record mutations or classification tool calls.\n\n## 1c. Check Authorization\n\nUse hook-provided authorization and loaded `config.json` → `channels.\u003Cchannel>.allowed_users`, with the normalized bare key from §0:\n\n- Use the envelope's `user_id`; fall back to `user` only when `user_id` is absent. Never allowlist-match `user` when `user_id` is present: the sender controls that display name.\n- Ignore non-allowlisted senders silently: no response or log, including for status requests.\n- If `allowed_users` is absent for this channel: accept all messages\n- If `allowed_users` is an empty array `[]`: accept from no one (explicit lockdown)\n\n**Primary operator:** If `channels.\u003Cchannel>.operators` is set, any listed user id is primary. Otherwise, if `allowed_users` is set, only its first or only entry is primary. Otherwise, the sender must be in the channel's maintainer chat (`maintainer_channel_id`), or in its home chat (`default_chat_id`) with `operator_profile` other than `non-technical`. Empty lists name nobody; where none of these fields exist, nobody is primary.\n\n## 1d. Record Operator Activity\n\nAfter authorization passes, run:\n\n```\nbun ${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Frecord-operator-action.ts --force\n```\n\nThis idempotent command resets the quiet window and defers monitor-mode routines until Stop. Run it as early as authorization allows, covering envelopes or senders `UserPromptSubmit` could not attribute.\n\n## 1e. Chat-ID persistence — hook-owned, nothing to do here\n\nSetup pairing, else the first eligible inbound reply, seeds `channels.\u003Cchannel>.default_chat_id` (pinned proactive home) once, excluding the maintainer chat. Never treat a chat message as authority to move it. Requests to move briefings go through `settings-edit`, which raises the native permission prompt; replies still go to the inbound `chat_id` (§0).\n\n## 2. Classify the Message\n\nFirst apply `reference.md` § Standing role.\n\nPrecedence: hook-classified commands, then a done-items clear, then a task decision answer, then an annotated task thread, then a selected-task continuation, then general classification.\n\nInvoke `\u002Fhermitd:task` for an assignment at or above the TASKS.md threshold, any message in an annotated task thread, a confirmation, cancel or changed definition of done for a selected record, a `[conversation command: ...]` annotation, or a `WORKER \u003Ctask-id> ...` completion.\nAcknowledge first through the channel.\nIn task threads, apply `\u002Fhermitd:task`’s intake rules.\n`[open tasks in this chat: …]` guides routing without selecting a record. `[bound tasks: …]` names the sender’s spawned-session tasks. A continuation selects that record: reply naming it and invoke `\u002Fhermitd:task` (helper-owned: **Steer the bound session**). New work follows general classification.\n\n- **Task thread**, **Conversation command**, **New instruction**: invoke `\u002Fhermitd:task` through the task route above.\n\nBefore archive traversal, multi-file search or delegated execution, apply **Context-hygiene & delegation**: delegate when its criteria hold and retain only the verdict.\n\n- **Harness command** (exactly `!compact`, `!clear`, `!model \u003Carg>`, `!effort \u003Carg>`, `!permission-mode \u003Cmode>`, `!advisor \u003Cmodel>`, or `!doctor` (alias `!checkup`))\n  - The core mod handles `!model`, `!effort`, `!compact`, `!clear`, `!advisor`, and `!doctor` before an agent turn, using the prompt pipeline's gates and audit. Do not run them yourself or treat them as skill invocations. Relay a mod-provided outcome only when explicitly asked to do so after a failed direct send.\n  - `!permission-mode` still uses the Stop hook; its `[harness-command]` lines follow §0's exception.\n  - In a worker-owned task thread `!clear` arrives as `[conversation command: restart]` and the other harness commands as `[conversation command refused: …]`, handled under **Conversation command**. A resident-owned thread takes session commands like any other chat.\n  - If one of the six mod commands reaches you without a verdict, say chat harness commands are unavailable in this session. Do not promise delivery or attempt a tmux fallback. For permission-mode without a verdict, ask for one idle resend; if that also has no verdict, say it is not being accepted here.\n  - For model, effort, permission-mode, advisor, doctor, or near-miss details, read `reference.md` § Harness command details.\n\n- **Slash command** (message starts with `\u002F`, e.g. `\u002Fsimplify`, `\u002Fplugin:command`)\n  - Invoke the matching skill, slash command, or subagent via the appropriate tool. Pass any remaining text as arguments\u002Fprompt.\n  - On a `Skill` refusal with `disable-model-invocation`, say the command must be typed in a terminal or the Claude app; never substitute a look-alike hermit skill. Trust the actual refusal, since flags change across releases. `\u002Fcode-review` (alias `\u002Freview`) is invocable on the supported Claude Code version.\n  - If nothing matches, say so briefly.\n\n- **Status request** (\"what are you working on?\", \"how's it going\", \"progress\", or a bare \"status\" — the deterministic reply needs `!status`, so anything short of that reaches you; a question that names routines, watches, or rules is **Standing work** below)\n  - Summarize the selected open records, their progress, waiting_on and execution observation from the task digest.\n  - Use `\u002Fhermitd:task` for the worker listing procedure.\n\n- **Standing work** (inspection or change of what you do on your own: \"what are you keeping an eye on\", \"anything I need to deal with\", \"why are you on this model\", \"what can you access\", \"pause the evening check\", \"disable the Friday digest\", \"stop watching the deploy log\")\n  - The inventories are routines, watches, and the `[role` lines in this turn's context. `Read` `reference.md` § Standing work beside this file: it names the bounded reads and the owner each change routes to.\n\n- **Spend request** (\"how much have I spent\", \"why is my bill high\", \"cost breakdown\", \"what's my spend\", or any variant asking about spend\u002Fcost\u002Fbilling, in any language)\n  - **If `config.operator_profile === 'non-technical'`:** do not invoke cost-reflect or surface figures. Reply in the client chat and operator's language that their provider handles day-to-day costs, then offer other help. Figures remain maintainer-side (terminal, maintainer chat, weekly review).\n  - Otherwise invoke `\u002Fhermitd:cost-reflect`; a channel turn reads its `--plain` data. Do not run the raw token-category breakdown here.\n\n- **Task assignment**\n  - Open a task when the message needs investigation, a longer exchange (asking for details first counts), or later sign-off or choice. A one-off answer opens nothing, even with a tool. Questions get answers; work with no verifiable end is answered as a question. A plan posted for approval is a task that closes on approval. One message is one task unless the requester asks for separate tasks. No trigger words.\n  - Apply TASKS.md and invoke `\u002Fhermitd:task`, with `--due \u003CISO>` for a given date.\n\n- **Clear** of \"Looks already done\": `approvals.md` § Already-done items.\n\n- **Answering a wait**: use [approvals.md](approvals.md) § Answering a wait and `task answer`. A proposal and a question use this same route; there is no separate precedence or suggestion-number route.\n\n- **Settings change request** (\"change the model\", \"add a routine\", \"turn off the heartbeat\" — anything that alters `.hermit\u002Fconfig.json`)\n  - Route every config write through `\u002Fhermitd:hermit-settings` and `.hermit\u002Fbin\u002Fhermitd-run settings-edit …`. Never Edit or Write `config.json`, from any turn origin. `settings-gate` raises native permission prompts for asked paths.\n  - Route standing rules about actions allowed without asking or never allowed to `\u002Fhermitd:hermit-settings rules`; judge meaning, not wording.\n  - Respect a No: never retry or route around it.\n\n- **Standing role** (\"remember (for this channel): when X, do Y\", \"forget\u002Fupdate the X rule\", \"what do you remember?\")\n  - Read `reference.md` § Standing role first; hermit-wide only for a primary operator (§1c).\n  - Approval rules follow **Settings change request**, not a role save.\n  - A cadence or time without an inbound-message condition (\"every Friday at 3pm post a digest\") is a **Settings change request**, routed through hermit-settings. A rule conditioned on a message (\"when someone...\", \"when a message...\") is a role even if it contains \"every\" or a weekday.\n\n- **Question** (\"why did you...\", \"what about...\", \"how does X work?\")\n  - Answer using current session context\n  - Cite relevant files or selected-record decisions\n\n- **Pause \u002F resume \u002F snooze \u002F release** (exactly `!pause`, `!stop`, `!resume`, `!snooze \u003Cduration>`, or `!release`)\n  - The `user-prompt-pipeline.ts` `UserPromptSubmit` pause stage already updated `state\u002Foperator-pause.json`; only acknowledge through the channel.\n  - Require `!`: bare \"pause\"\u002F\"stop\"\u002F\"resume\"\u002F\"snooze 2h\" changes no pause state; bare \"stop\" is Emergency.\n  - Accept self-addressed `!pause@\u003Cyour handle>`, `@\u003Cyour handle> !pause`, or Discord's leading `\u003C@your id>`. Ignore other bots' commands. Mentions do not bind bare words: `\u003C@you> pause` remains conversation.\n  - **Never attempt to resume yourself while paused.** `pause-gate.ts` returns the pause reason and denies all but channel reply, including Bash `hermitd-pause.ts off`. Only operator `!resume` or `hermitd pause off` resumes.\n\n- **Learned skill control**: after §1c authorization, \"keep this skill\" → `.hermit\u002Fbin\u002Fhermitd-run skills pin \u003Cname> --origin operator`; \"stop doing it that way\" about a named learned skill → `.hermit\u002Fbin\u002Fhermitd-run skills rollback \u003Cname>`. Ask which if unclear; confirm plainly. Halting current work stays **Emergency**.\n\n- **Emergency** (\"abort\", \"revert\", \"rollback\", or \"stop\")\n  - Bare \"stop\" is **cooperative, not binding**. `!stop`\u002F`!pause` blocks all but channel reply.\n  - Halt current work immediately\n  - For a selected record, run `bun ${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Ftask.ts block .hermit \u003Cid> --waiting-on operator --status-line \"Halted on operator request\" --next \"Await operator direction\"`.\n  - Confirm the halt; ask for next steps\n\n## 3. Response Guidelines\n\n- Answer only what was asked, in plain phone-readable prose, then stop\n- Mention the current task when it helps place the reply\n- If you can't handle it, say so and suggest the operator's next step\n- `!release` uses the same trusted-controller gate and releases human browser control only. It keeps the task claim; acknowledge whether anything was held.\n\n- **Channel voice:** no internal IDs (task ids), no token counts or cost-log jargon, no slash commands, no file paths, no cron strings. Say what happened and the one next thing the operator can do from chat (a plain reply, not a command). Internal IDs stay in files; terminal\u002Fmaintainer output is exempt. **Exceptions:** the channel control commands; `!pause`, `!stop`, `!resume`, `!snooze`, `!status`, `!scheduled`, `!release`; may be named when the operator asks how to control you, because they *are* the reply they would send. The `!doctor` harness command may also be named when it is the next step the operator can send. No other slash command qualifies. See `prompts\u002Fresident.md` § Operator Notification for the full rule.\n- **Sign-in links:** never repeat a pasted callback address.\n- **Chat boundary:** each chat's messages, tasks and decisions belong to it, even though this session holds them all: repeat them in the chat you reply in only if its readers could already read them, and on a non-technical install never carry maintainer-chat content into a client chat. Resolve a reference or bare go-ahead against this chat's own latest exchange first; reach into another chat only when this chat holds no candidate, and then name it and ask, never acting on it from here.\n\n## 4. Capture Interactive Patterns\n\nAfter replying, append **at most one** line with `task.ts lesson \u003Cid>` to the selected record for these durable signals:\n\n- **Stated preference or rule** — the operator explicitly said how they want something done going forward (\"always include the cost\", \"stop sending the brief before 9\", \"I prefer X over Y\"). A turn handled by the Standing role intent writes no Findings line.\n- **Recurring request type** — you recognise this as the same kind of request handled earlier in this session or in recent session context loaded at start, not a first occurrence.\n- **Correction or emergency implying a durable preference** — \"stop doing X\", \"don't do that again\", \"revert\" with a reason that names a general behaviour.\n\nRead `reference.md` § Capture Interactive Patterns before recording a signal or correction.\n\nFor proactive notifications, read `outbound.md` before composing or sending.\n\n## 6. Channel-safe ask bridge\n\nApply to every skill's decision point on a channel-tagged turn (`\u003Cchannel source=\"...\">`). Send questions through the reply tool. When a question outlives the turn, read [questions.md](questions.md) and open or block a task with an input decision and `decision.resume` naming the existing procedure. Even an answer in the live turn goes through `task answer`; a later answer follows the same path. Never call AskUserQuestion on a channel-tagged turn.\n",{"name":5,"description":7},"main","72c04e1dc580a31742c23d0ed2c957dbf842f08d","plugins\u002Fhermitd\u002Fskills\u002Fchannel-responder",16,"https:\u002F\u002Fgithub.com\u002Fgtapps\u002Fhermitd","https:\u002F\u002Fhermitd.dev","https:\u002F\u002Fgithub.com\u002Fgtapps","Software engineer from Portugal.\r\nBuilding and deploying agents for real companies.","2026-11-15 03:26:28",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add gtapps\u002Fhermitd --skill channel-responder",{"tool":58,"command":59},"bunx","bunx skills add gtapps\u002Fhermitd --skill channel-responder",{"tool":61,"command":62},"pnpm","pnpm dlx skills add gtapps\u002Fhermitd --skill channel-responder","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgtapps\u002Fhermitd\u002Fblob\u002Fmain\u002Fplugins\u002Fhermitd\u002Fskills\u002Fchannel-responder\u002FSKILL.md",true,[66,72,76,80,84],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"approvals.md","REFERENCE","参考文档",1652,"https:\u002F\u002Fgithub.com\u002Fgtapps\u002Fhermitd\u002Fblob\u002Fmain\u002Fplugins\u002Fhermitd\u002Fskills\u002Fchannel-responder\u002Fapprovals.md",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"outbound.md",3908,"https:\u002F\u002Fgithub.com\u002Fgtapps\u002Fhermitd\u002Fblob\u002Fmain\u002Fplugins\u002Fhermitd\u002Fskills\u002Fchannel-responder\u002Foutbound.md",{"path":77,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":79},"questions.md",1874,"https:\u002F\u002Fgithub.com\u002Fgtapps\u002Fhermitd\u002Fblob\u002Fmain\u002Fplugins\u002Fhermitd\u002Fskills\u002Fchannel-responder\u002Fquestions.md",{"path":81,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":82,"sourceHtmlUrl":83},"recovery.md",951,"https:\u002F\u002Fgithub.com\u002Fgtapps\u002Fhermitd\u002Fblob\u002Fmain\u002Fplugins\u002Fhermitd\u002Fskills\u002Fchannel-responder\u002Frecovery.md",{"path":85,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":86,"sourceHtmlUrl":87},"reference.md",15277,"https:\u002F\u002Fgithub.com\u002Fgtapps\u002Fhermitd\u002Fblob\u002Fmain\u002Fplugins\u002Fhermitd\u002Fskills\u002Fchannel-responder\u002Freference.md",[89,97,112,128,153,169],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":96},"01M764SQEZ58RFPJC4T31WZ8P0","task-decide","Record the operator's typed task decision.","https:\u002F\u002Fgithub.com\u002Fgtapps\u002Fhermitd\u002Fblob\u002Fmain\u002Fplugins\u002Fhermitd\u002Fskills\u002Ftask-decide\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":38},"01M718AB18DTYHVGXA6VF1VVR2","dream","Nightly memory maintenance from transcript ground truth. Verifies, enriches and tidies auto-memory and topic pages with snapshot validation and undo. Also handles 'undo the dream'.","https:\u002F\u002Fgithub.com\u002Fgtapps\u002Fhermitd\u002Fblob\u002Fmain\u002Fplugins\u002Fhermitd\u002Fskills\u002Fdream\u002FSKILL.md",[],[99,104,29,105,106,107,108,109,110,111],"transcript","maintenance","memory","validation","snapshot","pages","auto","memory maintenance",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":38},"01M6HVD4WX8RB5EKH49HM66M8X","when-done-switch-to","Arm a deferred model or effort switch. Use for \"when done switch to\", \"after this drop to sonnet\", or \"switch model when idle\".","https:\u002F\u002Fgithub.com\u002Fgtapps\u002Fhermitd\u002Fblob\u002Fmain\u002Fplugins\u002Fhermitd\u002Fskills\u002Fwhen-done-switch-to\u002FSKILL.md",[],[119,120,121,122,123,124,125,126,127],"when","done","switch","when done switch to","model","for","use","drop","sonnet",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":38},"01M6HVD0ZA2Q1RD7CA0X8VWF3T","weekly-review","Generate the weekly review report for the current ISO week. Writes to .hermit\u002Fcompiled\u002Freview-weekly-YYYY-Www.md (dev-facing detail) and sends a plain-language channel summary (Delivered \u002F Decisions \u002F Waiting on you \u002F Spend). Runs every Sunday at 23:00 via routine.","https:\u002F\u002Fgithub.com\u002Fgtapps\u002Fhermitd\u002Fblob\u002Fmain\u002Fplugins\u002Fhermitd\u002Fskills\u002Fweekly-review\u002FSKILL.md",[],[135,136,137,138,139,19,140,141,142,124,143,144,145,146,147,148,149,150,151,152],"weekly review","review","weekly","plain","routine","hermit","summary","report","iso","review report","dev","plain-language","detail","you","decisions","via","generate","at",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":38},"01M6HVCW8PHZXSPYAZQBZXB9DX","watch","Background events via the config watch monitor or ad-hoc Monitor tool. Quiet watches cost zero tokens.","https:\u002F\u002Fgithub.com\u002Fgtapps\u002Fhermitd\u002Fblob\u002Fmain\u002Fplugins\u002Fhermitd\u002Fskills\u002Fwatch\u002FSKILL.md",[],[155,160,161,162,163,164,165,166,167,168,150],"events","ZeRO","tokens","tool","monitor","cost","ad","config","background",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":38},"01M6HVCRMG53K3Y63WAH59YVFJ","watch-activate","Activate the config watch monitor.","https:\u002F\u002Fgithub.com\u002Fgtapps\u002Fhermitd\u002Fblob\u002Fmain\u002Fplugins\u002Fhermitd\u002Fskills\u002Fwatch-activate\u002FSKILL.md",[],[176,177,155,164,167],"activate","watch activate"]