stern-logslisted
Install: claude install-skill shyuan/skills
# stern
`stern` tails logs from **many pods and many containers at once**, selected by a regex or a
Kubernetes resource, with automatic pickup of new pods and colorized per-pod output.
## Iron Law
```
In an agent/non-interactive context, every stern invocation carries --no-follow.
```
Without it stern **streams forever and never exits** — the tool call blocks until the harness
timeout, and the partial output may be discarded. The only exception: the user explicitly asked to
watch a live stream, and it runs as a background command with a stated stop condition.
The second half of the law: **bound the volume**. The defaults are `--since 48h` and `--tail -1`
(*every* line ever retained), multiplied by every matching pod. Always narrow at least one of
`--tail` / `--since` — and **both** once the query spans more than a handful of containers, since
they are what truncates each stream. Narrowing *which* containers are read at all (`-E`,
`--exclude-pod`, `-l`, a tighter query) saves more and costs nothing; line filters save neither.
### Rationalization table
Every one of these will occur to you mid-task. All of them are wrong.
| The thought | Reality |
|---|---|
| "This namespace only has two pods, streaming is fine." | Pod count does not make stern exit. Two pods stream forever just as well as fifty. |
| "The user said 'watch'/'monitor'/'看一下現在的狀況', so they want live output." | They want an *answer*. `--no-follow --since 5m` gives it. Streaming into a blocked tool call gives