nightly-session-watch

nightly-session-watch is a skill for Claude Code, Codex from dimetron/pi-go. It costs 78 tokens per session (1,503 once invoked), scanned A, original, MIT.

A nightly health check for the previous 24 hours of pi-go agent sessions. It reads local session event logs and looks for aborted runs, tool errors, wasted tokens, slow work, and missing monitoring records.

In plain words
What is it for?
Use it for unattended daily checks, reviewing recent agent costs and failures, spotting loop aborts or tool-error patterns, and deciding which follow-up investigation to run.
Why use it?
It provides one ranked overview of recent session problems and points each finding to a more specialized diagnostic check.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for unattended daily checks, reviewing recent agent costs and failures, spotting loop aborts or tool-error patterns, and deciding which follow-up investigation to run.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dimetron/pi-go/nightly-session-watch
Install

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.

Any agent
npx skills add dimetron/pi-go --skill nightly-session-watch
Clone the repo
git clone --depth 1 https://github.com/dimetron/pi-go

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for nightly-session-watch

README.md
[![agentmods](https://agentmods.dev/badge/skills/dimetron/pi-go/nightly-session-watch/github.svg)](https://agentmods.dev/skills/dimetron/pi-go/nightly-session-watch)
Your own site
<a href="https://agentmods.dev/skills/dimetron/pi-go/nightly-session-watch"><img src="https://agentmods.dev/badge/skills/dimetron/pi-go/nightly-session-watch/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.

agentmods 80×15 button for nightly-session-watch

Your own site · 80×15
<a href="https://agentmods.dev/skills/dimetron/pi-go/nightly-session-watch"><img src="https://agentmods.dev/badge/skills/dimetron/pi-go/nightly-session-watch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,503 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.01503
Opus 5 $0.00039 $0.00751
Sonnet 5 $0.00016 $0.00301
Haiku 4.5 $0.00008 $0.00150

Measured 9d ago against content hash f28de4440998, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

nightly-session-watch 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 9d 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.

.pi-go/skills/nightly-session-watch/SKILL.md · 128 lines

How it starts

The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Nightly Session Watch

One sweep over everything that happened in the last 24 hours, in priority order: what broke, what it cost, and what to do about it.

Everything runs through pi session-stats — the same Go code path the session-stats agent tool uses, so there is no second implementation to drift. No LLM call, no network, reads only ~/.pi-go/sessions/*/events.jsonl.

This is the umbrella check. It is deliberately shallow — it finds and ranks, it does not diagnose. Every finding names the skill that goes deeper:

Finding Goes deeper with
agent loop aborted: ... pi-loop-forensics
Tool call errors pi-check-session-logs
Which tools dominate tools-stats
Slow turns / throughput token-perf

Do not re-implement those here. If the sweep surfaces three aborted runs, the answer is "run loop-forensics on these three", not a second loop analysis.

Run it

pi session-stats                 # last 24h
pi session-stats --hours 72      # wider window
pi session-stats --all           # include sessions with no anomalies
pi session-stats --json          # counters only, for a cron wrapper

Other flags: --high-tool-calls and --high-turns move the anomaly thresholds, --session-dir points at a different session root.

Steps

  1. Run pi session-stats. Present its markdown as-is — it is already ordered by severity.

  2. Read the numbers before interpreting them. Three traps:

    • Tool error rate matters more than error count. read failing 5 times in 253 calls is noise; a tool failing 8 of 8 is broken or misconfigured.
    • A heavy session is not automatically a bad session. High tool calls on a long task is work, not waste. Waste is the Token waste section.
    • Prompt tokens dwarf everything else. They are re-sent on every request, so the figure is dominated by the fixed block — system prompt plus tool declarations — not by the task. A large number there is not evidence of a bad night; a large number per session on short sessions is.

Read the full file on GitHub · 128 lines

Changes

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.

  1. 9d ago First seen · 128 lines · 78 tokens per session scan A f28de4440998

Subscribe to this mod's changes

nightly-session-watch is a skill published in the GitHub repository dimetron/pi-go (155 stars, last pushed today), licensed MIT. It adds 78 tokens to every session and 1,503 once invoked, about $0.0004 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-30.

Related

Other skills, from other repositories

golang-lint

Linting best practices and golangci-lint configuration for Golang projects — running linters, configuring .golangci.yml, suppressing warnings with nolint directives, interpreting lint output, and selecting linters. Use when configuring golangci-lint, asking about lint warnings or nolint suppressions, setting up code…

alexastrum/skl · 100 tokens

golang-troubleshooting

Troubleshoot Golang programs systematically - find and fix the root cause. Use when encountering bugs, crashes, deadlocks, or unexpected behavior in Go code. Covers debugging methodology, common Go pitfalls, test-driven debugging, pprof setup and capture, Delve debugger, race detection, GODEBUG tracing, and production…

alexastrum/skl · 130 tokens

golang-samber-oops

Structured error handling in Golang with samber/oops — error builders, stack traces, error codes, error context, error wrapping, error attributes, user-facing vs developer messages, panic recovery, and logger integration. Apply when using or adopting samber/oops, or when the codebase already imports…

alexastrum/skl · 74 tokens

golang-safety

Defensive Golang coding to prevent panics, silent data corruption, and subtle runtime bugs. Use when encountering nil panics, append aliasing, map concurrent access, float comparison pitfalls, or zero-value design questions. Also use when reviewing code for nil-safety, numeric conversion overflow, resource lifecycle…

alexastrum/skl · 80 tokens

golang-error-handling

Idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber/oops for production errors. Built to make logs usable at scale with log…

alexastrum/skl · 144 tokens

rust-check

Run cargo check on the current Rust project to find compile errors.

Hmbown/CodeWhale · 15 tokens