zlog

zlog is a skill for Claude Code, Codex from sebin-gg/zlog. It costs 150 tokens per session (1,790 once invoked), scanned B, original, MIT.

A cleanup tool for compressing large text-based logs created by coding agents and removing empty log files. Logs are records of what an agent or program did.

In plain words
What is it for?
Use it to scan supported agent log folders, preview cleanup, compress old logs, remove zero-byte logs, or search for additional agent log locations.
Why use it?
It reduces disk usage while protecting active files, recent files, transcripts, and important documentation.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/sebin-gg/zlog/zlog
Any agent
npx skills add sebin-gg/zlog --skill zlog
Clone the repo
git clone --depth 1 https://github.com/sebin-gg/zlog

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 zlog

README.md
[![agentmods](https://agentmods.dev/badge/skills/sebin-gg/zlog/zlog.svg)](https://agentmods.dev/skills/sebin-gg/zlog/zlog)
Your own site
<a href="https://agentmods.dev/skills/sebin-gg/zlog/zlog"><img src="https://agentmods.dev/badge/skills/sebin-gg/zlog/zlog.svg" alt="Measured on agentmods" height="20"></a>
Per session 150 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,790 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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 $0.00150 $0.01790
Opus 5 $0.00075 $0.00895
Sonnet 5 $0.00030 $0.00358
Haiku 4.5 $0.00015 $0.00179

Measured 4d ago against content hash 6b41c317efd4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

zlog scanned grade B with 1 finding 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 4d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

find -L ~ -maxdepth 4 \( -path "*/.gemini/*" -o -path "*/.cursor/*" -o -path "*/.claude/*" -o -path "*/.ollama/*" -o -path "*/.windsurf/*" -o -path "*/.codex/*" -o -path "*/.lm-studio/*" \) \( -name "*.log" -o -name "*.o
SKILL.md · 67 lines

How it starts

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

Zlog Multi-Instance Storage Optimizer

Compress background tool logs across AI agents (~77%-99.9% space saved / fast zstd -15 fallback). Purge 0-byte empty logs. Keep transcript.jsonl intact. Safe for concurrent running agents. Skip tiny logs (<10KB) and text docs. Handle symlinks cleanly. Outputs single-line total summary.

Execution Intents

  • Standard Cleanup: Triggered on "zlog", "compress logs", "clean up chat logs", "pack logs", or session wrap-up.
  • Dry-Run Preview: Triggered on "preview zlog", "dry run", "test log cleanup".
  • Deep Scan: Triggered on "find new AI agents", "scan disk for hidden AI logs".

Safety & Invariant Protection

  • Process Locks: Query fuser -s "$f" (Linux/WSL), lsof "$f" (macOS), or [System.IO.File]::Open(..., 'None') (Windows 11 PowerShell). Skip file if active process lock exists.
  • In-Flight Window: Skip files modified <60 seconds ago (-mmin +1).
  • Protected Files: Exclude *.jsonl, SKILL.md, README*, LICENSE*, and files <= 10KB.

Commands

Standard Compression & Empty Log Purge (Linux, macOS, WSL, Git Bash)

for d in ~/.gemini ~/.config/Cursor ~/.cursor ~/.ollama ~/.claude ~/.config/claude-code ~/.windsurf ~/.codex ~/.cache/lm-studio; do
  if [ -d "$d" ]; then
    find -L "$d" \( -name "*.log" -o -name "*.out" -o -name "*.trace" -o -name "*.txt" \) -empty -type f -delete 2>/dev/null || true
    find -L "$d" \( -name "*.log" -o -name "*.out" -o -name "*.trace" -o -name "*.txt" \) -not -name "*.gz" -not -name "*.zst" -not -name "*.xz" -not -name "*.jsonl" -not -name "SKILL.md" -not -iname "README*" -not -iname "LICENSE*" -size +10k -mmin +1 -exec sh -c 'for f; do (command -v fuser >/dev/null 2>&1 && fuser -s "$f" 2>/dev/null) || (command -v lsof >/dev/null 2>&1 && lsof "$f" >/dev/null 2>&1) || (command -v zstd >/dev/null 2>&1 && zstd -15 -q --rm "$f") || (command -v xz >/dev/null 2>&1 && xz -9 "$f") || gzip -f "$f"; done' sh {} + 2>/dev/null || true
  fi
done
dirs=(); for d in ~/.gemini ~/.config/Cursor ~/.cursor ~/.ollama ~/.claude ~/.config/claude-code ~/.windsurf ~/.codex ~/.cache/lm-studio; do [ -d "$d" ] && [ ! -L "$d" ] && dirs+=("$d"); done; [ ${#dirs[@]} -gt 0 ] && du -ch "${dirs[@]}" 2>/dev/null | tail -n 1 || true

Read the full file on GitHub · 67 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. 4d ago First seen · 67 lines · 150 tokens per session scan B 6b41c317efd4

Subscribe to this mod's changes

zlog is a skill published in the GitHub repository sebin-gg/zlog (1 stars, last pushed 9d ago), licensed MIT. It adds 150 tokens to every session and 1,790 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

component-family-consistency

Buttons, inputs, pills, badges, calendars, and other interactive components form a visual family — they share the same border-radius, colour logic, shadow scale, border style, and spacing rhythm. Inconsistency between them breaks the sense of a coherent product. Use when building or reviewing a component library…

dembrandt/dembrandt-skills · 76 tokens

extract-design

Extract a complete design system — colors, typography, spacing, components, shadows, and W3C design tokens — from any live website using Dembrandt. Runs a headless browser against the URL and returns real computed values from the DOM. Use when you need a site's actual design tokens, want to reverse-engineer a visual…

dembrandt/dembrandt-skills · 82 tokens

information-architecture

In large applications, information architecture determines whether users can find, understand, and act on data. Naming matters. The UI should mirror the data model and signal how data can be transformed. Dangerous or irreversible changes always require a confirm dialog. Use when designing navigation, naming entities…

dembrandt/dembrandt-skills · 71 tokens

algorithmic-color-palette

Derive a full UI colour palette algorithmically from one or two brand colours. Darker and lighter variants for interactive states, desaturated greys from the brand hue for borders and backgrounds, and semantic colours that feel coherent with the brand rather than generic. Use when building a colour system from scratch…

dembrandt/dembrandt-skills · 75 tokens

brand-visual-language

A brand's visual tone — playful or serious, rounded or angular — should be consistent across all UI elements. Shape language in typography, border-radius, and iconography communicates personality before a single word is read. Use when establishing a design system, choosing icon libraries, setting border-radius tokens…

dembrandt/dembrandt-skills · 68 tokens

data-display-and-selection

Complex data deserves multiple view modes — grid, list, table — chosen by the user based on their task. Row and item selection should use large hit areas (the whole row or card, not just a checkbox). Selected state is communicated through a subtle background colour shift. Mass actions appear when items are selected.…

dembrandt/dembrandt-skills · 85 tokens