registry-cleanup

Remove obsolete container image tags from DigitalOcean registries by retention policy.

1|1|Updated Jun 28, 2025
One-click install
npx skills add https://github.com/DarkMonkDev/WitchCityRope --skill registry-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: registry-cleanup
Source: https://github.com/DarkMonkDev/WitchCityRope/tree/main/.claude/skills/registry-cleanup
Command: npx skills add https://github.com/DarkMonkDev/WitchCityRope --skill registry-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires curl, jq, dotnet.

What problem does it solve?

Automates cleanup of old container images from DigitalOcean registries based on retention policies, keeping storage costs low and registries tidy.

Core Features & Use Cases

  • Deterministic cleanup: Applies per-repository retention rules to remove old tags while preserving the :latest tag.
  • Dry-run safety: By default, previews deletions without making changes.
  • Audit & reporting: Provides a summary of what would be deleted and potential storage savings.

Quick Start

Run a dry-run from the project root to preview deletions: bash .claude/skills/registry-cleanup/execute.sh

Frequently Asked Questions about registry-cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically remove old container images from DigitalOcean registries?

Container image cleanup removes obsolete tags from DigitalOcean registries based on retention policies, keeping storage costs low. This Skill applies per-repository rules—preserving :latest while retaining 10 tags for staging and 30 for production—and reports estimated storage savings.

Can I preview what will be deleted before running registry cleanup?

Yes, the Skill runs in dry-run mode by default, showing which tags would be deleted and their storage impact without making changes. Add --confirm to execute actual deletions after reviewing the preview.

What are the prerequisites for cleaning up DigitalOcean container registries?

You need curl and jq installed, a DigitalOcean API token stored in user secrets, and access to your container registries. The Skill validates these dependencies before listing and removing tags.

Does registry cleanup work with both staging and production environments?

Yes, the Skill applies different retention policies per environment: staging keeps 10 tags while production keeps 30, ensuring safer rollback capacity in production while aggressively cleaning staging images.

How often should I run container image cleanup to manage registry storage?

The Skill supports weekly dry-run scheduling by default. Run manually with --confirm when ready to delete, or automate weekly executions to maintain consistent storage savings across your DigitalOcean repositories.