# Digitalocean Registry Cleanup

> Analyze and clean DigitalOcean Container Registry images. Lists repos with tag counts, deletes old tags (keep last N), finds stale repos, triggers garbage collection. Supports dry-run mode. Use when user says "clean registry", "delete old images", "DO registry", "registry cleanup", "docker images cleanup", "container registry", or "clean up old tags".

- **Type:** Skill
- **Install:** `agentstack add skill-goodsmileduck-claude-registry-digitalocean-registry-cleanup`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Goodsmileduck](https://agentstack.voostack.com/s/goodsmileduck)
- **Installs:** 0
- **Category:** [Cloud & Infrastructure](https://agentstack.voostack.com/c/cloud-infrastructure)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Goodsmileduck](https://github.com/Goodsmileduck)
- **Source:** https://github.com/Goodsmileduck/claude-registry/tree/main/plugins/digitalocean-skills/skills/digitalocean-registry-cleanup

## Install

```sh
agentstack add skill-goodsmileduck-claude-registry-digitalocean-registry-cleanup
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# DigitalOcean Registry Cleanup

Prerequisite: `doctl` CLI must be installed and authenticated (`doctl auth init`).

## Script

Run `scripts/registry_cleanup.py` via Bash tool:

```bash
SCRIPT="/scripts/registry_cleanup.py"

# Analyze: show all repos with tag counts and dates
python3 $SCRIPT analyze

# Clean: delete old tags from a repo, keep newest N
python3 $SCRIPT clean  --keep 5 --dry-run   # preview first
python3 $SCRIPT clean  --keep 5              # execute

# Stale: find repos not updated in N months
python3 $SCRIPT stale --months 6                   # list only
python3 $SCRIPT stale --months 6 --delete          # delete all tags

# GC: trigger garbage collection to reclaim storage
python3 $SCRIPT gc
```

## Workflow

1. Run `analyze` to show registry overview
2. Present the table to the user, ask which repos to clean and how many tags to keep
3. Run `clean  --keep N --dry-run` to preview
4. On user confirmation, run `clean  --keep N` to delete
5. Run `stale` if user wants to find abandoned repos
6. Run `gc` after all deletions to reclaim storage
7. Run `analyze` again to show the result

Always use `--dry-run` first before destructive operations.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Goodsmileduck](https://github.com/Goodsmileduck)
- **Source:** [Goodsmileduck/claude-registry](https://github.com/Goodsmileduck/claude-registry)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-goodsmileduck-claude-registry-digitalocean-registry-cleanup
- Seller: https://agentstack.voostack.com/s/goodsmileduck
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
