prune-sync-log

prune-sync-log is a command for Claude Code from iliaal/whetstone. It costs 17 tokens per session (1,200 once invoked), scanned A, original, MIT.

A command for reviewing and archiving old entries in a sync decision log. The log records decisions about keeping, rejecting, or postponing changes between repositories.

In plain words
What is it for?
Use it to inspect log entries, check whether referenced components and repositories still exist, and move outdated entries to the archive.
Why use it?
It keeps the current log focused on decisions that still affect the project, while preserving older entries in an archive.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; built for gstack.

Good fit Use it to inspect log entries, check whether referenced components and repositories still exist, and move outdated entries to the archive.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/iliaal/whetstone/prune-sync-log
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.

Clone the repo
git clone --depth 1 https://github.com/iliaal/whetstone

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 prune-sync-log

README.md
[![agentmods](https://agentmods.dev/badge/commands/iliaal/whetstone/prune-sync-log/github.svg)](https://agentmods.dev/commands/iliaal/whetstone/prune-sync-log)
Your own site
<a href="https://agentmods.dev/commands/iliaal/whetstone/prune-sync-log"><img src="https://agentmods.dev/badge/commands/iliaal/whetstone/prune-sync-log/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 prune-sync-log

Your own site · 80×15
<a href="https://agentmods.dev/commands/iliaal/whetstone/prune-sync-log"><img src="https://agentmods.dev/badge/commands/iliaal/whetstone/prune-sync-log.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,200 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.00017 $0.01200
Opus 5.5 $0.00007 $0.00480
Sonnet 5.5 $0.00003 $0.00240
Haiku 4.5 $0.00002 $0.00120

Measured 1mo ago against content hash 276715a7d532, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

prune-sync-log 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 1mo 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.

.claude/commands/prune-sync-log.md · 98 lines

How it starts

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

Prune sync log

Archive entries in docs/audit/audit-log.md that are no longer load-bearing, so the pre-flight filter in /sync-from-repos and /audit-plugin stays lean and current.

Configuration

SYNC_LOG=docs/audit/audit-log.md
ARCHIVE=docs/audit/audit-log-archive.md
PLUGIN_DIR=plugins/whetstone
REPOS_DIR=~/ai/repos
TODAY=YYYY-MM-DD  # resolve to actual date at run time

Phase 1: Inventory

Read $SYNC_LOG in full. Parse it into run entries keyed by (date, type, scope). For each entry, extract every bullet under Applied / Rejected / Deferred along with the component it targets.

If the file doesn't exist, report that and stop.

Phase 2: Classify each entry

For every run entry, assign one of four statuses. Classification happens at the entry level (whole run), not per bullet, because entries are the unit of append.

Status Criteria Action
Keep Entry <30 days old AND every referenced component still exists AND reasoning not superseded AND referenced repos still in $REPOS_DIR Leave in place
Prune — age Entry >30 days old and no longer load-bearing for current plugin state Move to archive
Prune — stale-ref One or more bullets reference a component path that no longer exists under $PLUGIN_DIR, OR an external repo no longer in $REPOS_DIR Move to archive (even if <30 days — stale refs confuse the filter)
Prune — superseded Reasoning for a rejection has been promoted to a feedback-memory rule in MEMORY.md, or a later entry applies the same change and overrides the rejection Move to archive

Stale-ref detection: for each bullet, resolve the backtick-quoted component name to a path under $PLUGIN_DIR (skills/agents/commands). Use Glob or Grep to confirm existence. If the entry references an external repo by name (e.g., "Source repo: gstack"), check for $REPOS_DIR/gstack/.

Supersession detection: read ~/.claude/projects/-home-ilia-ai-whetstone/memory/MEMORY.md and scan feedback entries. If a rejection reason in a log bullet matches the rule in a feedback entry (same pattern, same target), mark the bullet as superseded. When more than half of an entry's bullets are superseded, prune the entry.

Read the full file on GitHub · 98 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. 1mo ago First seen · 98 lines · 17 tokens per session scan A 276715a7d532

Subscribe to this mod's changes

prune-sync-log is a command published in the GitHub repository iliaal/whetstone (35 stars, last pushed yesterday), licensed MIT. It adds 17 tokens to every session and 1,200 once invoked, about $0.0001 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-30.