Agent skill

Nightly Session Watch

by dimetron in dimetron/pi-go

Nightly sweep of the last 24h of pi-go sessions — anomalous runs, loop aborts, tool error rates, token waste, real prompt-token spend, and whether the observation and palace pipelines are still…

MITAuto-check passed

Install Nightly Session Watch

skills CLI
$ npx skills add dimetron/pi-go --skill nightly-session-watch -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dimetron/pi-go nightly-session-watch --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dimetron/pi-go.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.pi-go/skills/nightly-session-watch .claude/skills/nightly-session-watch && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
nightly-session-watch
GitHub stars
208
Token cost
~1.5k tokens
SKILL.md length
782 words
Files
1
Skills in repo
21
Repo updated
First seen
Licence
MIT

At a glance

Nightly sweep of the last 24h of pi-go sessions — anomalous runs, loop aborts, tool error rates, token waste, real prompt-token spend, and whether the observation and palace pipelines are still…

  • Works in 5 steps: Run pi session-stats. Present its… → Read the numbers before interpreting… → Triage each finding to the table above… → …
  • An unattended daily health check
  • SKILL.md covers Run it, Steps, What it checks, and why each one and Scheduling it, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Nightly Session Watch is an agent skill from dimetron/pi-go. Nightly sweep of the last 24h of pi-go sessions — anomalous runs, loop aborts, tool error rates, token waste, real prompt-token spend, and whether the observation and palace pipelines are still recording. Triages each finding to the specialist skill that diagnoses it. Use for an unattended daily health check, or on demand after a bad night.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Go implementation of AI coding agent. The licence is MIT.

When your agent uses it

  • An unattended daily health check
  • On demand after a bad night

Example prompts

  • “/nightly-session-watch”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Run pi session-stats. Present its markdown as-is — it is already
  2. Read the numbers before interpreting them. Three traps
  3. Triage each finding to the table above and name the skill to run next.
  4. Propose fixes, grouped into config, code, and prompt. Patterns worth
  5. Say plainly when nothing is wrong. A quiet night is a valid result and

What it can do on your machine

Read from SKILL.md and the folder at commit c4c83e6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Nightly Session Watch loads about 1.5k tokens when it runs. Until then it costs about 91 tokens; SKILL.md has 782 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~91
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dimetron/pi-go at commit c4c83e6, republished under its MIT licence (© dimetron). 782 words, ~1,533 tokens.

Download SKILL.mdSave it as .claude/skills/nightly-session-watch/SKILL.md (or your agent's skills folder).
name
nightly-session-watch
description
Nightly sweep of the last 24h of pi-go sessions — anomalous runs, loop aborts, tool error rates, token waste, real prompt-token spend, and whether the observation and palace pipelines are still recording. Triages each finding to the specialist skill that diagnoses it. Use for an unattended daily health check, or on demand after a bad night.

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:

FindingGoes deeper with
agent loop aborted: ...pi-loop-forensics
Tool call errorspi-check-session-logs
Which tools dominatetools-stats
Slow turns / throughputtoken-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

bash
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.
  3. Triage each finding to the table above and name the skill to run next. Do not run them automatically — they are slower and interactive.

  4. Propose fixes, grouped into config, code, and prompt. Patterns worth recognising:

    SymptomLikely fix
    One tool at ~100% error rateMissing credential or unavailable MCP server — check config before code
    edit error rate above ~20%Editing without reading first, or on stale content — a prompt/ledger problem
    Oversized results from a tool marked uncappedWire it into compactToolResult in internal/tools/compactor.go
    Oversized results from a tool marked yesThe compactor is not running — check the after-tool callback chain
    Duplicate results inside one sessionDedup is not running, same cause as above
    observations DEGRADED or STALLEDThe recording pipeline is down; see specs/memory-fixes/
    Palace last write many days oldNothing is filing drawers — the bridge is not wired, or the palace is gated off
  5. Say plainly when nothing is wrong. A quiet night is a valid result and belongs in one line, not padded into a report.

Show full SKILL.md (338 more words)Show less

What it checks, and why each one

  • Per-session anomalies — high tool calls, excessive turns, errors, heavy git activity, long idle runs.
  • Loop aborts — the guard ending a run is the most user-visible failure there is. Grouped by reason: "repeated a phrase" and "identical tool call" have different causes and different fixes.
  • Tool error rates — as a rate against call count, so a busy tool with a few failures does not outrank a broken tool nobody uses.
  • Token waste — results over the compactor's 24k MaxChars, plus results re-sent byte-identical inside one session. Each oversized tool is labelled with whether compactToolResult covers it, which separates "a component is broken" from "this tool was never wired up".
  • Token spend — promptTokenCount / candidatesTokenCount straight from the provider's usageMetadata. Measured, not estimated.
  • Pipeline health — the observation and palace stores. Both are best-effort by design: every failure downgrades to a warning nobody reads, so they can be dead for months while looking fine. The check is a ratio, not a presence test — a store holding a handful of rows across thousands of sessions is broken in the way that looks healthiest.

Scheduling it

--json prints a stable object for a cron wrapper:

json
{
  "hours": 24,
  "total_sessions": 175,
  "anomalous_sessions": 25,
  "aborted_runs": 0,
  "reclaimable_tokens": 232957,
  "prompt_tokens": 127052076
}

Alert on aborted_runs > 0, on reclaimable_tokens crossing a threshold you pick, or on prompt_tokens / total_sessions drifting up. Keep the JSON as the trigger and the markdown as what a human reads.

Nightly is the intended cadence: 24h is long enough for a pattern to show and short enough that the offending session is still fresh.

Limits worth stating

  • prompt_tokens and output tokens are provider-reported and exact. reclaimable_tokens is chars / 4 — fine for ranking and trends, not a billing figure.
  • Only tool result volume feeds the waste number. The fixed per-request overhead is visible in the token-spend section instead.
  • The window is selected by events.jsonl mtime, so a session that started before the window but was still running inside it is included whole.
  • Duplicate detection is byte-exact within a single session. A near-duplicate, or the same file read across two sessions, is not counted.

© dimetron, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .pi-go/skills/nightly-session-watch of dimetron/pi-go.

Open the folder on GitHubat commit c4c83e6

Compare with similar skills

Nightly Session Watch next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Nightly Session Watch compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nightly Session Watch this skilldimetron/pi-go208—~1.5kAutomated safety check: PassMIT
Finding Sessions To WatchPostHog/posthog40k—~2.6kAutomated safety check: PassCustom licence
Session Handoffsickn33/agentic-awesome-skills47k—~1.8kAutomated safety check: NotesMIT
Sessionanthropics/claude-for-legal9.6k3 repos~478Automated safety check: PassApache-2.0
Session History Searchslopus/happy24k—~3.1kAutomated safety check: PassMIT
Session Handoffdavila7/claude-code-templates32k2 repos~1.6kAutomated safety check: PassMIT

Similar skills

  • Official

    Guides a user from "I want to watch recordings but don't know which ones" to a short, high-signal list of sessions worth watching.

    40k GitHub stars~2.6k tokensUpdated today
    MobileAuto-check passed
  • Session Handoff

    sickn33/agentic-awesome-skills

    A skill your agent uses when context approaches capacity, before /clear or /compact, when switching tasks, or when ending a coding session: produces a structured handoff artifact for the next session.

    47k GitHub stars~1.8k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Session

    anthropics/claude-for-legal

    Official

    Run a focused N-question study session on a subject — MBE, essay, or flashcards.

    9.6k GitHub starsUsed in 3 repos~478 tokens
    EducationAuto-check passed
  • Searches past Claude Code, Codex and Cursor sessions and summarizes what was worked on, tried or decided, using extraction scripts instead of reading raw logs.

    24k GitHub stars~3.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Session Handoff

    davila7/claude-code-templates

    Creates comprehensive handoff documents for seamless AI agent session transfers.

    32k GitHub starsUsed in 2 repos~1.6k tokens
    Agent WorkflowsAuto-check passed
  • Read Session

    asgeirtj/system_prompts_leaks

    Locate and read Muse Code's OWN session logs — the current session or a prior one.

    69k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed

More from dimetron/pi-go

All 21 skills in this repo
  • Vhs E2E Gif

    dimetron/pi-go

    Record a test run, a TUI session, or any terminal command as a GIF with VHS and attach it to a GitHub PR as a release-hosted asset, never a repo commit.

    208 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Agents Md

    dimetron/pi-go

    Generate AGENTS.md files for Go, Rust, TypeScript, and Java projects.

    208 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Bubbletea Testing

    dimetron/pi-go

    A skill your agent uses whenever writing tests for Bubble Tea (charmbracelet/bubbletea) TUI applications in Go.

    208 GitHub stars~3.6k tokensUpdated today
    Auto-check passed
  • Memory Index

    dimetron/pi-go

    Index a folder's contents into the MemPalace semantic memory for search and retrieval.

    208 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Osx Tuning

    dimetron/pi-go

    Tune macOS resource limits and sysctls for best performance with Go development, Docker/OrbStack, and Linux VMs.

    208 GitHub stars~1.6k tokensUpdated today
    Auto-check: notes
  • Pgo

    dimetron/pi-go

    Profile-guided optimization (PGO) for the pi binary. An agent skill from dimetron/pi-go.

    208 GitHub stars~1.4k tokensUpdated today
    Auto-check passed

Questions about Nightly Session Watch

What does Nightly Session Watch do?

Nightly sweep of the last 24h of pi-go sessions — anomalous runs, loop aborts, tool error rates, token waste, real prompt-token spend, and whether the observation and palace pipelines are still…. Nightly Session Watch is an agent skill from dimetron/pi-go. Nightly sweep of the last 24h of pi-go sessions — anomalous runs, loop aborts, tool error rates, token waste, real prompt-token spend, and whether the observation and palace pipelines are still recording.

When should I use Nightly Session Watch?

Nightly Session Watch fits situations like: an unattended daily health check; on demand after a bad night.

How do I install Nightly Session Watch in Claude Code?

Run `npx skills add dimetron/pi-go --skill nightly-session-watch -a claude-code`. Or copy the skill folder (.pi-go/skills/nightly-session-watch in dimetron/pi-go) into .claude/skills/nightly-session-watch in your project. Claude Code loads it when a task matches its description.

How do I install Nightly Session Watch in Codex?

Run `npx skills add dimetron/pi-go --skill nightly-session-watch -a codex`. Or copy the skill folder (.pi-go/skills/nightly-session-watch in dimetron/pi-go) into .agents/skills/nightly-session-watch in your project. Codex loads it when a task matches its description.

Can I use Nightly Session Watch in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dimetron/pi-go --skill nightly-session-watch -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nightly-session-watch, .gemini/skills/nightly-session-watch, .github/skills/nightly-session-watch and .opencode/skills/nightly-session-watch in your project.

What does Nightly Session Watch need to run?

SKILL.md names no scripts, command-line tools or credentials: Nightly Session Watch is instructions for the agent only.

Does Nightly Session Watch access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Nightly Session Watch safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Nightly Session Watch use?

Nightly Session Watch is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Nightly Session Watch use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Nightly Session Watch?

Skills that share tags, products or a category with Nightly Session Watch: Finding Sessions To Watch (PostHog/posthog, 40k stars), Session Handoff (sickn33/agentic-awesome-skills, 47k stars), Session (anthropics/claude-for-legal, 9.6k stars) and Session History Search (slopus/happy, 24k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nightly Session Watch?

dimetron (a GitHub user) maintains it in dimetron/pi-go, which has 208 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 9, 2026.

Source: dimetron/pi-go on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.