CustomerNewsletter: Skill for Claude Code

.github/skills/session-log-manager/SKILL.md

session-log-manager is a skill for Claude Code, Codex from briancl2/CustomerNewsletter. It costs 94 tokens per session (1,782 once invoked), scanned A, original, MIT.

A set of tools for monitoring and managing AI-agent session logs stored by Copilot CLI and VS Code. It checks storage health, archives logs per repository, compresses older archives, and investigates crashes or stalled sessions.

In plain words
What is it for?
Use it to check log sizes, archive a repository's sessions, rotate old archives, inspect crash causes, or remove embedded image data from archived logs.
Why use it?
It helps control growing session-log storage and preserves records in an organized way. It also gives you a way to examine a particular session when an agent crashes or stops responding.

Skill for Claude CodeCodex

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

This is briancl2/CustomerNewsletter's own configuration. It tells Claude Code and Codex how to work on CustomerNewsletter itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything CustomerNewsletter configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 .agents/skills/session-log-manager/scripts/session-forensics.py <session-id-or-path>.

Reuse

Borrowing it

Nothing to install: this file belongs to briancl2/CustomerNewsletter. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/briancl2/CustomerNewsletter/main/.github/skills/session-log-manager/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/briancl2/CustomerNewsletter

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 session-log-manager

README.md
[![agentmods](https://agentmods.dev/badge/skills/briancl2/customernewsletter/session-log-manager.svg)](https://agentmods.dev/skills/briancl2/customernewsletter/session-log-manager)
Your own site
<a href="https://agentmods.dev/skills/briancl2/customernewsletter/session-log-manager"><img src="https://agentmods.dev/badge/skills/briancl2/customernewsletter/session-log-manager.svg" alt="Measured on agentmods" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,782 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.
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.00094 $0.01782
Opus 5 $0.00047 $0.00891
Sonnet 5 $0.00019 $0.00356
Haiku 4.5 $0.00009 $0.00178

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

Security

Grade A, and why

session-log-manager 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 8d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/session-archive.sh, scripts/session-health-check.sh, scripts/session-rotate.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.github/skills/session-log-manager/SKILL.md · 179 lines

How it starts

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

Session Log Manager

Monitor, archive, rotate, and diagnose AI agent session logs across all stores. Deterministic shell scripts for health/archive/rotate; Python for forensics. Operates on system-wide session stores but archives per-repo.

Quick Start

# Health check — scan all stores, report per-repo sizes, flag hotspots
bash .agents/skills/session-log-manager/scripts/session-health-check.sh

# Archive — copy & compress sessions for this repo
bash .agents/skills/session-log-manager/scripts/session-archive.sh --repo build-meta-analysis

# Rotate — compress sessions older than 7 days in the archive
bash .agents/skills/session-log-manager/scripts/session-rotate.sh

# Forensics — crash/stall RCA from session ID
python3 .agents/skills/session-log-manager/scripts/session-forensics.py <session-id-or-path>

# Image strip — remove embedded image byte-dicts, archive originals
python3 .agents/skills/session-log-manager/scripts/session-image-strip.py --dry-run --all
python3 .agents/skills/session-log-manager/scripts/session-image-strip.py --all

Or use Makefile targets:

make session-health
make session-archive REPO=build-meta-analysis
make session-rotate

What This Skill Manages

System Stores (Source of Truth — never modified)

Store Location (macOS) Format
Copilot CLI ~/.copilot/session-state/<uuid>/events.jsonl JSONL (event stream)
VS Code Insiders ~/Library/Application Support/Code - Insiders/User/workspaceStorage/<hash>/chatSessions/*.jsonl JSONL (chat log)
VS Code Stable ~/Library/Application Support/Code/User/workspaceStorage/<hash>/chatSessions/*.jsonl JSONL (chat log)

Archive (Repo-Local — managed by this skill)

Location Contents
runs/sessions/<repo>/ Compressed .jsonl.gz files, deduplicated by session UUID

Scripts

session-health-check.sh — P0: Monitor

Scans all 3 session stores. Reports per-repo sizes. Flags hotspots.

bash .agents/skills/session-log-manager/scripts/session-health-check.sh

Read the full file on GitHub · 179 lines

Files

What ships with it

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

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. 8d ago First seen · 179 lines · 94 tokens per session scan A 430678cec359

Subscribe to this mod's changes

session-log-manager is a skill published in the GitHub repository briancl2/CustomerNewsletter (11 stars, last pushed 3mo ago), licensed MIT. It adds 94 tokens to every session and 1,782 once invoked, about $0.0005 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

trulens-diagnosis

Diagnose low evaluation scores and generate actionable improvement recommendations.

truera/trulens · 17 tokens

agents-sdk-dotnet-activityhandler-migration

Use when migrating a Microsoft 365 Agents SDK agent that uses ActivityHandler or TeamsActivityHandler to AgentApplication. This is ONLY for DotNet projects that uses Microsoft.Agents. packages. Triggered by Agents SDK bots that subclass ActivityHandler or TeamsActivityHandler that need to be modernized to…

microsoft/Agents · 76 tokens

agents-sdk-dotnet

Use when any code imports Microsoft.Agents.Hosting.AspNetCore, Microsoft.Agents.Builder, or related Agents SDK packages, or when the user is building, configuring, or asking questions about a Microsoft 365 Agents SDK agent in C# / .NET. Trigger on questions about appsettings.json, connection configuration…

microsoft/Agents · 112 tokens

agents-sdk-provision

Use when provisioning Azure resources for a Microsoft Agents SDK application — including creating an Azure Bot Service resource, setting up Entra app registrations, configuring identity credentials (UserManagedIdentity, FederatedCredentials, or ClientSecret), adding a Teams channel, running Bicep deployments for SSO…

microsoft/Agents · 131 tokens

agents-sdk-typescript-otel

Use when adding, configuring, validating, or troubleshooting OpenTelemetry observability for a Microsoft 365 Agents SDK application in JavaScript or TypeScript. Trigger when the user mentions OpenTelemetry, OTel, telemetry, traces, metrics, logs, OTLP, Aspire Dashboard, Application Insights, Azure Monitor, distributed…

microsoft/Agents · 88 tokens

agents-sdk-dotnet-otel

Use when adding, configuring, validating, or troubleshooting OpenTelemetry observability for a Microsoft 365 Agents SDK application in C# / .NET. Trigger when the user mentions OpenTelemetry, OTel, telemetry, traces, metrics, logs, OTLP, Aspire Dashboard, Application Insights, Azure Monitor, distributed tracing…

microsoft/Agents · 86 tokens