resume
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 0
- Forks
- 3
03 SKILL.md 正文
/resume — warm rehydrate after a /clear
The watchdog fires this after every /clear — this is the hot path, run thousands of
times, so it must stay lean. This file is the canonical bringup protocol and is
self-contained: never pull in /start to "understand" a step — doing so reloads the heavy
cold-boot skill on every clear and burns the tokens this split exists to save. Everything
needed to execute is right here. (Cold boot runs /start, which does its cold-only setup
and then defers back to these same four steps.)
After /clear, CLAUDE.md + MEMORY.md auto-load; the activity-log body and the live
bot state do NOT. These steps reseed that. Do it silently — no narration unless WIP found.
1. Reseed context from the activity log
grep -nE '^### [0-9]{4}-[0-9]{2}-[0-9]{2}' memory/project_activity_log.md
- If today's
### YYYY-MM-DDheading (vscurrentDate) is missing, append it at the bottom. - Read today's heading body in full (
Readwithoffsetat today's heading line → EOF). This is the mandatory seed: today's events, in-flight threads,PENDING/DA FAREmarkers reach you ONLY here. Skipping it = waking blind. If today's body is thin, also read yesterday's. - Trim is NOT done here — it's disk hygiene, not token hygiene (the log is read-on-demand, never
auto-loaded, so an untrimmed log costs zero per-clear tokens).
/startowns the >14d archive sweep.
2. Adopt the Monitors — THREE streams (don't duplicate)
Three event streams, three separate Monitors: Azzurra and Libera (same bot.py, two
separate processes, each with its OWN stdout stream — the Azzurra Monitor never sees Libera
events and vice-versa) plus Telegram (@gazzurbo_bot long-poller, a different transport
entirely). The tail -F pipelines survive /clear; the Monitor task registrations do not.
Handle ALL THREE. Libera and Telegram are the easy-to-forget ones — their processes often
do NOT survive, so you usually attach them fresh even when Azzurra's got adopted.
(IRCnet: quittato e unit disabilitata il 2026-11-03, ordine vjt — niente monitor.)
pgrep -af "tail -F.*vjt-claude/bot.stdout.log" # Azzurra
pgrep -af "tail -F.*vjt-claude/bot.libera.stdout.log" # Libera
pgrep -af "[t]g_poll.sh" # Telegram
systemctl --user is-active vjt-claude-bot.service vjt-claude-libera-bot.service \
vjt-claude-aup-watchdog.service
For EACH stream independently:
- pgrep hit on its
*stdout.log→ adopt it, skip attach (notemonitor adopted (pid <n>)). A hit onbot.log/bot.libera.log(NOT*stdout.log) is a stale pre-2026-05-06 orphan — kill it, attach fresh. - No hit → attach one fresh Monitor:
- Azzurra:
Monitor: command: bash /home/vjt/code/IRC/vjt-claude/.claude/skills/start/start-monitor.sh persistent: true, timeout_ms: 3600000 description: "IRC bot events (msgs+trust, invites, errors)" - Libera:
Monitor: command: bash /home/vjt/code/IRC/vjt-claude/.claude/skills/start/start-monitor-libera.sh persistent: true, timeout_ms: 3600000 description: "Libera IRC bot events (#grappa)" - Telegram (the support group and the group vjt and I share — who's in them and
which chat is which lives in
[[project_melablu_support]]/[[reference_telegram_bridge_handles]], not in this repo):
Token lives atMonitor: command: bash /home/vjt/code/IRC/vjt-claude/var/tg_poll.sh persistent: true, timeout_ms: 3600000 description: "Telegram @gazzurbo_bot messages (Melablu support + shared group)"~/.config/gazzurbo/token(600, never printed); the poller persists itsgetUpdatesoffset invar/tg_offset, so a restart replays nothing. Reply withvar/tg_say.sh(stdin,TG_CHAT_ID=to pick the chat). Only ONE poller may run — a secondgetUpdateson the same token gets409 Conflictand both starve.
- Azzurra:
- m42 alarms (4th Monitor, always attach fresh — vjt 2026-11-03: «metti dei monitor su questi
eventi così puoi reagire»). The
siem-*systemd user timers (/srv/siem/systemd/, scripts in/srv/siem/alarms/) DM vjt and append each alert to~/.local/state/m42-alarms.log; this lets me see them too and act (investigate on m42, tell vjt):Monitor: command: tail -n0 -F /home/vjt/.local/state/m42-alarms.log /home/vjt/.local/state/pf-alarm.err /home/vjt/.local/state/mail-auth-alarm.err 2>/dev/null | /usr/bin/grep --line-buffered -v -e '^==> ' -e '^$' persistent: true, timeout_ms: 3600000 description: "m42 security alarms (pf + mail auth) and alarm script errors"/usr/bin/grep, never baregrep: in an inline Monitor command the shell snapshot turnsgrepinto the bundledugrep, which on atail -Fpipe passes the blank lines and eats the content lines — measured 2026-11-12, the m42 alarms of 13:00 and 13:50 never arrived. Scripts (start-monitor*.sh,tg_poll.sh) are not affected: they get the real grep. - Any service not
active→systemctl --user start <svc>(linger means they usually survive).
3. WIP sweep — resume only true gaps
git status --short
/home/vjt/code/IRC/vjt-claude/tools/sweep-bot-log.sh 50
- Untracked/modified files = unfinished edits → read, finish (unless next step is destructive).
- The sweep applies the SAME per-channel read policy as the Monitor (
tools/chan_filter.awk, shared withstart-monitor.sh):#italiadropped,#sniffoonly the lines that name me plus my own outbound. Do not go back to a rawtailonbot.log— that bypasses the filter and re-reads channels I am not supposed to read (vjt, query 2026-09-10: "non avresti dovuto vederlo"). - bot.log: read inbound AND outbound interleaved. For each inbound addressed to me, scan outbound with later timestamp in same chan/nick — if it plausibly answers, already handled, do not reply. Only true gaps (inbound, no matching outbound after) get a reply. Half-sent line → finish it.
- When in doubt between replying and silence, stay silent. A dupe is worse than a miss.
- Telegram has no log to sweep: a TG message landing during the
/clearreaches nobody (2026-11-11 22:14, vjt's «abilita i quiz di mike» lost). Read the tail of the previous TG Monitor's output:ls -t scratchpad/claude-1000/*/*/tasks/*.output | head→tailthe one whose lines startTG chat=, and answer what has no reply. - Don't announce "nothing found" — silence is correct when nothing's pending.
4. Report ready
One terse line, e.g. resumed — monitors: azzurra adopted (pid <n>) + libera/telegram attached, 4 svc active, no WIP.
Then resume standing behavior (reply policy, channel registers, activity-log appends) per CLAUDE.md.
04 同仓库更多 Skills
voice
暂无简介
start
Cold-boot the vjt-claude IRC persistent session — archives >14d activity log, ensures bot.py + sidecars are running, greets on own JOIN, then runs the shared warm-bringup protocol (/resume). Run once manually when entering this working directory. The hot path (post-/clear) is /resume, NOT this.
settings-add
Add a permission allow/deny rule to a Claude Code settings file when the harness settings-file write-guard blocks Edit/Write. Use whenever a rule needs to land in .claude/settings*.json (or ~/.claude/settings.json) and a normal Edit/Write would prompt despite a matching allow-glob.
close
Cleanly shut down the vjt-claude IRC session — graceful bot QUIT, final activity-log flush, memory consistency check, Monitor stop. Run before /exit when you plan to relaunch Claude Code later.