Skip to content
Back to skills

Checkpoint Prune

ASecurity

Preview and remove selected project checkpoint files, with confirmation for batch deletion and a --dry mode.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 22, 2026
ai-agentsgitapi

Works with

  • api

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add PHPCraftdream/cc-arch-hands --skill checkpoint-prune --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Checkpoint Prune?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Checkpoint Prune
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/phpcraftdream-checkpoint-prune/badge)](https://www.skillsdirectory.com/skills/phpcraftdream-checkpoint-prune)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: checkpoint-prune
description: "Preview and remove selected project checkpoint files, with confirmation for batch deletion and a --dry mode."
---
# checkpoint-prune

Arguments: take them from the user's request that triggered this skill.

Resolve the repository's main folder: run git rev-parse --path-format=absolute --show-toplevel --git-dir --git-common-dir from the caller's directory. Refuse outside Git. When line 2 equals line 3 the repository root is line 1; otherwise the caller is in a linked worktree and the root is the parent directory of line 3 (checkpoints are kept in the main folder). Operate only on regular .md files in <root>/docs/checkpoints/ (a checkpoint a confined session left in a linked worktree is not touched), never on redirected directories, symlinks, other projects or subdirectories. Missing directory means nothing to prune.

Parse optional --dry first; it never deletes. Select by these rules: no argument = all checkpoints; digits followed by d or h = mtime older than that age; digits alone = keep the N most recently modified files; otherwise = exact safe filename, with optional .md, never a prefix or path. Reject invalid arguments rather than broadening the selection.

Show selected names, mtime, size and mode. If empty, report nothing to prune. Ask for confirmation before batch deletion, including no argument; only an explicit exact single filename authorizes deletion without a second confirmation. Use file APIs to unlink each selected file after rechecking its location and regular-file identity. Stop on the first error and report removed versus preserved files. Never remove the directory itself or stage/commit changes. Use /checkpoint-resume --list for read-only browsing.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.