zlog

zlog is a skill for Claude Code from sebin-gg/zlog. It costs 96 tokens per session (1,690 once invoked), scanned A, 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 Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code; mentions Codex; built for aider.

Good fit Use it to scan supported agent log folders, preview cleanup, compress old logs, remove zero-byte logs, or search for additional agent log locations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sebin-gg/zlog/zlog
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 sebin-gg/zlog --skill zlog
Clone the repo
git clone --depth 1 https://github.com/sebin-gg/zlog

Made for: Claude Code.

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/github.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/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 zlog

Your own site · 80×15
<a href="https://agentmods.dev/skills/sebin-gg/zlog/zlog"><img src="https://agentmods.dev/badge/skills/sebin-gg/zlog/zlog.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,690 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.00096 $0.01690
Opus 5.5 $0.00038 $0.00676
Sonnet 5.5 $0.00019 $0.00338
Haiku 4.5 $0.00010 $0.00169

Measured 28d ago against content hash b692d23e400f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

zlog 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 28d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/zlog.ps1, scripts/zlog.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.

SKILL.md · 150 lines

How it starts

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

zlog — AI agent log storage optimizer

Purpose

Reclaim disk space from stale AI agent session logs. The skill decides what may be touched; scripts/zlog.sh (POSIX) and scripts/zlog.ps1 (Windows) implement how. Never paste shell from memory — always run the bundled scripts so preview and cleanup share one candidate engine.

Use When

  • "clean up my AI logs", "free disk space from Cursor logs"
  • "compress old Claude/Codex/Gemini logs", "zlog", "pack logs"
  • "preview what zlog would change" (read-only first when ambiguous)
  • "restore my compressed log"
  • "scan for AI logs" / "find new AI agents" (deep modes)
  • Session wrap-up cleanup

Don't Use When

  • "delete my chat history" → refuse (transcripts are Class B protected)
  • "clean node_modules / caches" → refuse unless the user explicitly asks for cache cleanup (out of scope for this skill)
  • "vacuum my Codex database" → refuse automatic handling; SQLite/WAL stores are live databases (report as intentionally untouched)
  • Broad home-directory cleanup without explicit deep-scan intent
  • Any file currently being written (locked or fresh)

Workflow

  1. Determine intent: preview, clean, restore, or scan.
  2. Determine OS/shell: Linux/macOS/WSL/Git Bash → scripts/zlog.sh; Windows PowerShell → scripts/zlog.ps1.
  3. Identify roots from references/agent-paths.md (scripts embed them).
  4. Read-only candidate scan first: run preview (or deep-preview).
  5. Exclude protected data (see Protected Data).
  6. Check age + active writers (scripts enforce 60s default, lock checks).
  7. If intent is ambiguous, show the preview and ask before cleaning.
  8. Run clean (or deep only on explicit deep-scan intent).
  9. Scripts validate each archive before deleting its source.
  10. Report exact measured results (never estimates).

Safety Rules

Full rationale: references/safety.md. Non-negotiable invariants:

  • Never follow symlinks out of a scan root (POSIX -P default).
  • Never touch Class B protected data (transcripts, configs, SQLite/WAL).
  • Never descend into Class C junk locations.
  • Never compress a locked or fresh file; never clean caches unprompted.
  • Never delete a source unless its archive passed integrity test AND is smaller than the source AND the destination was absent AND the source identity is unchanged since it was scanned — POSIX: inode/size/mtime; Windows: length/timestamps/full-content SHA-256 (transactional: temp → test → size check → dest-absent check → source-unchanged check → publish-without-overwrite → delete).
  • Restore never overwrites: unknown formats refused, existing destinations kept, .tar.gz members must exactly match the intended basename (extracted to a temp dir first).
  • Unknown (Class D) files and directories are ignored by default.

Read the full file on GitHub · 150 lines

Files

What ships with it

7 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. 28d ago Changed · +11 lines b692d23e400f
  2. 1mo ago Changed · +6 lines · +7 tokens per session scan B → A 44d3d68b89bd
  3. 1mo ago Changed · +8 lines · -18 tokens per session 3f69bd5bbff3
  4. 1mo ago Changed · +22 lines · -51 tokens per session 8b23257e5346
  5. 1mo ago Changed · +23 lines · +7 tokens per session 6a4ff80ed1fc
  6. 1mo ago Changed · +13 lines · +1 tokens per session 8fe1583ea365
  7. 1mo 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 (2 stars, last pushed 2d ago), licensed MIT. It adds 96 tokens to every session and 1,690 once invoked, about $0.0004 per session on Opus 5.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.

Related

Other skills, from other repositories

dropbox

Dropbox integration via Apideck's File Storage unified API — same methods work across every connector in File Storage, switch by changing serviceId. Use when the user wants to read, write, upload, or search files, folders, and drives in Dropbox. Routes through Apideck with serviceId "dropbox".

apideck-libraries/api-skills · 67 tokens

execution-discipline

A set of rules for carrying out long, multi-tool coding-agent sessions without wasting work or losing track of progress. It covers waiting for background tasks, handling failed checks, assigning subagents, saving results, and closing each work round cleanly.

ooooooooooooooooooop/agent-tools · 199 tokens

unified-taskflow

A task-management workflow for genuinely large, multi-stage jobs that need saved plans, checkpoints, recovery information, and acceptance tracking. A checkpoint is a recorded progress marker used to resume work safely.

ooooooooooooooooooop/agent-tools · 104 tokens

chatgpt-web-bridge

A text bridge between a local coding agent and ChatGPT in a web browser. ChatGPT handles the conversation and planning, while the local side sends messages, receives replies, and can carry out instructions; the web side cannot directly use local files or shell commands.

ooooooooooooooooooop/agent-tools · 144 tokens

keka

Keka HR integration via Apideck's HRIS unified API — same methods work across every connector in HRIS, switch by changing serviceId. Use when the user wants to read or sync employees, departments, payrolls, and time-off records in Keka HR. Routes through Apideck with serviceId "keka".

apideck-libraries/api-skills · 71 tokens

justworks

Justworks integration via Apideck's HRIS unified API — same methods work across every connector in HRIS, switch by changing serviceId. Use when the user wants to read or sync employees, departments, payrolls, and time-off records in Justworks. Routes through Apideck with serviceId "justworks".

apideck-libraries/api-skills · 69 tokens