plugins/claude-code-dev-hermit/skills/dev-log-watch/SKILL.md
Generate a Monitor entry that tails the project's dev log file for error patterns. Handles date-rotating logs (Winston, Pino, structlog) with a midnight wrapper, and fixed-path logs (Rails log/development.log) with plain tail. Reads dev_log_path_pattern, dev_error_pattern, dev_noise_pattern from config. Run once per project during onboarding.
npx skillsauth add gtapps/claude-code-hermit dev-log-watchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Register a Monitor that surfaces errors from the project's dev log file as conversation notifications. Per-project, not per-task — invoke once during onboarding; the entry persists in config.json monitors[] and auto-registers each session via /claude-code-hermit:watch start.
This skill applies to projects whose dev server logs to a file. For stdout/journald/Docker stacks, use the alternatives documented in docs/DEV-LOG-WATCH.md ## Use instead.
.claude-code-hermit/sessions/ exists..claude-code-hermit/config.json. Cache claude-code-dev-hermit.dev_log_path_pattern, dev_error_pattern, dev_noise_pattern.If dev_log_path_pattern and dev_error_pattern are both unset or empty:
dev_log_path_pattern and dev_error_pattern not configured
if your dev server logs to a file (Winston/Pino daily, Rails log/development.log,
structlog TimedRotatingFileHandler): run /claude-code-dev-hermit:dev-adapt to
detect and persist the patterns.
if it logs to stdout / journald / Docker: this skill does not apply — see
docs/DEV-LOG-WATCH.md `## Use instead` for the right primitive (Monitor on
the start command, journalctl follow, docker logs -f).
FAIL with the message above. Don't blindly say "run /dev-adapt" — for stdout-only stacks, it won't find anything.
If only one of the two is set: WARN that the other should also be set, and exit without registering.
Invoke the helper:
node "${CLAUDE_PLUGIN_ROOT}/scripts/lib/log-watch-builder.js" "$(jq -nc \
--arg path "$dev_log_path_pattern" \
--arg err "$dev_error_pattern" \
--arg noise "${dev_noise_pattern:-}" \
'{logPathPattern:$path, errorPattern:$err, noisePattern: ($noise | select(length > 0))}')"
Helper returns { command, shape } where shape is rotating (date-templated path → midnight while-loop wrapper) or fixed (plain tail -F). The bash one-liner is taken verbatim from docs/DEV-LOG-WATCH.md lines 44–56 and refined for fixed paths; do not re-derive.
Resolve the current log path:
$(date ...) substitutions to compute today's expected path. Use the same fallback the wrapper uses: date -d 'tomorrow 00:00:00' 2>/dev/null (GNU) → falls through to date -v... (BSD). For dev-adapt's purposes, only check whether the resolved string's dirname exists on disk.Run [ -d "$(dirname "$resolved_path")" ]. If absent, WARN — the file may be created later when the dev server first writes:
WARN parent directory <dir> does not exist yet — log file may not appear until the dev server writes
Do not FAIL — proceed to register the monitor; the watch will start tailing once the file appears.
Ask the operator (AskUserQuestion) which scope they want, unless an entry with id: "dev-log-errors" already exists in config.json monitors[] (idempotency — skip the question on re-runs):
{
header: "Persistence",
question: "Register dev-log-errors monitor?",
options: [
{ label: "Persist", description: "Save to config.monitors[] — auto-registers every session" },
{ label: "Ad-hoc", description: "Register for this session only; do not save to config" },
{ label: "Cancel", description: "Skip" }
]
}
Default: Persist for first runs, no question on re-runs (already in config → just call /watch stop dev-log-errors then /watch start to refresh; or do nothing if the command unchanged).
Persist path:
Read .claude-code-hermit/config.json monitors[] array (create if missing).
If an entry with id: "dev-log-errors" exists, replace it; otherwise append:
{
"id": "dev-log-errors",
"description": "errors in dev server log",
"command": "<built command from Gate 1>",
"class": "stream",
"persistent": true,
"enabled": true
}
Write config.json back. The next session-start auto-registers the entry; subsequent sessions need no operator action.
Register immediately for the current session via /claude-code-hermit:watch start dev-log-errors "<command>" so the operator gets feedback now rather than at next session-start. (Per claude-code-hermit:watch SKILL.md, config monitors do not hot-reload during a session — without this step, persisting alone is a silent no-op until session-start.)
Ad-hoc path:
/claude-code-hermit:watch start dev-log-errors "<command>" directly.dev-log-watch
shape: rotating (date-templated)
pattern: logs/app-$(date +%Y-%m-%d).log
errors: "level":"error"|^ERROR
noise: deprecation|0 errors
scope: persisted to config.monitors[]
status: registered (now active for this session)
On Gate 0 FAIL, emit the multi-line message above.
journalctl -f, docker logs -f); do not wedge them through this skill. docs/DEV-LOG-WATCH.md documents the alternatives.scripts/lib/log-watch-builder.js builds the command. Bug fixes (e.g., a new shell escaping issue) go in the helper.data-ai
Initializes or resumes a work session. Loads context from OPERATOR.md and SHELL.md, orients the agent, and establishes what to work on. Use at the beginning of every work session.
tools
Evolves hermit configuration and templates after a plugin update. Detects version gaps, presents new features, walks through new settings. Run after updating the plugin.
testing
Initializes the autonomous agent in the current project. Creates the state directory, templates, OPERATOR.md, and config.json. Appends session discipline to CLAUDE.md. Detects installed hermits. Run once per project, like git init.
tools
Generates Docker scaffolding and walks the operator through the full deployment — token setup, build, start, MCP plugin configuration, workspace trust, and verification. Offers to back up and overwrite existing Docker files. Run after /hatch.