First-party logsbuildsbackground-jobsagent-ops
Below is the complete skill definition this hub loads when the skill is triggered — what the agent sees as its instructions, verbatim and unabridged.
# auto-tail
Waiting and working look identical from the outside. A log that stopped growing
at 17:36 with a live "waiting" agent on top of it cost an hour today. This skill
makes the log itself prove which one it is.
## When to run it
- A background build/test/deploy is writing a log and you would otherwise idle.
- The user says "tail it", "how's the build", "is it still going".
- Before reporting "still running" to anyone. Never say that without a fresh status line.
## How
```bash
~/.claude/skills/auto-tail/auto-tail.sh [LOG] [--pid N] [--every S] [--max S] [--once]
```
- `LOG` omitted = newest `*.log` under `$CLAUDE_JOB_DIR/tmp`, else the cwd.
- `--pid` is the writer's pid. With it, silence + alive = **STALLED**; silence + dead = **DONE-?**. Without it the tool can only say **SILENT**.
- `--once` prints one status line and the tail; use it to answer "tail it".
- No `--once` = loop every `--every` seconds until a terminal state or `--max`.
- Exit codes: 0 finished ok · 1 finished failed · 2 stalled/timed out · 3 no log.
Each round prints one line the user can read cold:
```
18:22:41 DONE-OK dk-build5.log lines=297 mtime=19s ago success marker in last 40 lines, writer not running
OK> 290:#29 naming to docker.io/library/crown-crown:latest done
| #30 DONE 0.0s
| Image crown-crown Built
```
## Rules
1. **Restate the state line in your own text.** The user sees at most a few lines of tool output.
2. **STALLED means inspect the writer, not the log.** `ps`, `docker ps`, the process's own stderr. Do not re-tail.
3. **DONE-FAIL means read the FAIL> lines and act.** Do not rerun the same build hoping.
4. Markers are regexes with sane defaults for docker, npm/next, cargo, pytest, gh. Override with `--ok` / `--fail` when a tool has its own vocabulary.
5. In the sandboxed Bash of a background job, run the script from the worktree cwd with an absolute log path. Use `mcp__axe-local__shell` if the path is refused.
6. Long loops: prefer `run_in_background` on the Bash call so the loop's notification wakes you, and keep `--max` under the tool timeout.
## Related
`feedback_cap_subagent_spend_and_require_incremental_writes`, `finding_gated_pipeline_marker_never_written` (a marker nothing writes can only time out — check the WRITER).Waiting and working look identical from the outside. A log that stopped growing
at 17:36 with a live "waiting" agent on top of it cost an hour today. This skill
makes the log itself prove which one it is.
~/.claude/skills/auto-tail/auto-tail.sh [LOG] [--pid N] [--every S] [--max S] [--once]
LOG omitted = newest *.log under $CLAUDE_JOB_DIR/tmp, else the cwd.--pid is the writer's pid. With it, silence + alive = STALLED; silence + dead = DONE-?. Without it the tool can only say SILENT.--once prints one status line and the tail; use it to answer "tail it".--once = loop every --every seconds until a terminal state or --max.Each round prints one line the user can read cold:
18:22:41 DONE-OK dk-build5.log lines=297 mtime=19s ago success marker in last 40 lines, writer not running
OK> 290:#29 naming to docker.io/library/crown-crown:latest done
| #30 DONE 0.0s
| Image crown-crown Built
ps, docker ps, the process's own stderr. Do not re-tail.--ok / --fail when a tool has its own vocabulary.mcp__axe-local__shell if the path is refused.run_in_background on the Bash call so the loop's notification wakes you, and keep --max under the tool timeout.feedback_cap_subagent_spend_and_require_incremental_writes, finding_gated_pipeline_marker_never_written (a marker nothing writes can only time out — check the WRITER).
Fetch this skill’s definition over the open API — no key required.
curl -s /v1/skills/auto-tail