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

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 commands/iliaal/whetstone/prune-sync-log
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.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.svg" alt="Measured on agentmods" 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. 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.00017 $0.01200
Opus 5 $0.00009 $0.00600
Sonnet 5 $0.00003 $0.00240
Haiku 4.5 $0.00002 $0.00120

Measured 5d ago against content hash 276715a7d532, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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. 5d 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 (32 stars, last pushed 6d ago), licensed MIT. It adds 17 tokens to every session and 1,200 once invoked, about $0.0001 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 commands, from other repositories

composite-actions

Generate, review, secure, and test composite GitHub Actions following best practices — full repo scaffold, interview-driven generation, PR creation on existing repos, SHA pinning, secrets-as-inputs, job summaries, and actionlint validation.

nitinjain999/platform-skills · 51 tokens

github-actions

Design, review, secure, and debug GitHub Actions workflows — reusable workflows, OIDC federation, SHA pinning, token scoping, promotion orchestration, and CI failure diagnosis.

nitinjain999/platform-skills · 40 tokens

datadog

Set up and troubleshoot Datadog — Agent deployment on Kubernetes, APM instrumentation, Log Management, Monitors, Dashboards, SLOs, Synthetic tests, and live incident investigation using the Datadog MCP server. Covers Terraform-managed Datadog resources.

nitinjain999/platform-skills · 57 tokens

fluxcd

FluxCD entry point — routes to the right workflow based on what you need. Live cluster issue → structured 5-workflow debug trace. Repo health check → 6-phase audit (discovery, validation, API compliance, best practices, security). Helm chart review → helmchart. Starts by asking one question to confirm the right mode.

nitinjain999/platform-skills · 71 tokens

linkerd

Linkerd-specific diagnostics — mTLS verification, proxy injection issues, authorization policy debugging, traffic management, and multi-cluster connectivity problems.

nitinjain999/platform-skills · 30 tokens

terraform

Runs through the full Terraform validation pipeline — fmt, validate, tflint, security scan — and reviews a module or plan for blast radius, IAM risk, and state impact.

nitinjain999/platform-skills · 38 tokens