Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add shyuan/skills --skill stern-logsgit clone --depth 1 https://github.com/shyuan/skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/shyuan/skills/stern-logs)<a href="https://agentmods.dev/skills/shyuan/skills/stern-logs"><img src="https://agentmods.dev/badge/skills/shyuan/skills/stern-logs/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/shyuan/skills/stern-logs"><img src="https://agentmods.dev/badge/skills/shyuan/skills/stern-logs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00217 | $0.03675 |
| Opus 5 | $0.00109 | $0.01837 |
| Sonnet 5 | $0.00043 | $0.00735 |
| Haiku 4.5 | $0.00022 | $0.00367 |
Grade A, and why
stern-logs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 214 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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 them nothing. |
| "I'll add a timeout, that bounds it." | timeout exits 124 and can cut a line mid-write, so the harness may surface a failed command instead of your logs. Bound it with stern's own flags; keep timeout only as a belt-and-braces outer limit. |
| "It's idle, it will stop when there's nothing left." | --no-follow is the only thing that makes stern conclude "all logs shown". Idle means it waits, not exits. |
"I'll pipe to head, so it ends." |
It does end, but head keeps the oldest N lines it happened to see first — the opposite of the recent lines you wanted. --tail N selects from the end. |
| "The previous stern call worked without it." | It did not "work" — it hit the timeout, and you saw the partial output that survived. |
"This is a follow-up to a live session, --tail 0 is what they meant." |
--tail 0 means "only lines from now on", which by definition never terminates. It is also rejected together with --no-follow. |
What ships with it
6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 214 lines · 217 tokens per session scan A ce886ba02c9c
stern-logs is a skill published in the GitHub repository shyuan/skills (5 stars, last pushed yesterday), licensed MIT. It adds 217 tokens to every session and 3,675 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
hermes-s6-container-supervision
Modify or debug s6 services in the Hermes Docker image.
oracle
Oracle second-model review: bundle prompts/files, debug, refactor, design.
review-loop
Run the adversarial verification loop — implement, then hand the change to a fresh checker that did not write it, fix what it finds, and re-dispatch until APPROVE. Use before claiming any behavioural change is done, and on requests like "review loop", "adversarial review", "independent review", "get this verified"…
semgrep-rule-creator
Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Use when writing Semgrep rules or building custom static analysis detections.
variant-analysis
Find similar vulnerabilities and bugs across codebases using pattern-based analysis. Use when hunting bug variants, building CodeQL/Semgrep queries, analyzing security vulnerabilities, or performing systematic code audits after finding an initial issue.
code-review-web
Review web application code for bugs, security issues, performance problems, and stack-specific anti-patterns. Use this skill whenever the user wants to review code, debug a production issue, investigate a build failure, audit security, or check a PR before merging. Triggers on code review, review my code, debug…