/cms-cultivator:ddev-docker-cleanupfrom cms-cultivator
Safely reclaims disk space from DDEV and Docker by removing orphaned volumes, build cache, and dangling images while protecting active project databases. Use when low on disk or memory, or Docker/DDEV cleanup is needed.
Ships in cms-cultivator. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Reclaim local disk and memory from DDEV and Docker without deleting anything the user still needs. The scripts do the deterministic work. Your job is to run them in order, present the results, and get explicit confirmation before anything is removed.
A DDEV project's database does not live in the project folder. It lives in a Docker volume, and it is not checked into git. If that volume is deleted, or the Docker provider is factory reset, the database is gone. This is why blunt cleanup commands are dangerous here.
Two rules follow from that, and the scripts enforce them:
ddev list, plus the DDEV global volumes. Everything else is a leftover.docker volume prune, docker system prune --volumes, or docker image prune -a. When projects are stopped their volumes look "unused" and "100% reclaimable," but that is just because nothing is attached. Those commands would wipe stopped-project databases or force a full image re-pull. Do not suggest them even if the user asks, without first explaining what they would destroy.Build cache and dangling images are safe to remove. They are rebuilt or re-pulled on the next ddev start.
Always follow this order. Do not skip the report, and do not run --apply before the user has seen the dry run.
Run the read-only report and show the user the output:
bash "${CLAUDE_PLUGIN_ROOT}/skills/ddev-docker-cleanup/scripts/report.sh"
It prints the protected projects, overall Docker usage (docker system df), the volumes being kept, and the orphaned volumes that are safe to remove.
Explain what they are looking at. Point out that the kept volumes are their live databases plus Redis, Solr, mutagen, and the globals, and that the orphans are leftovers. If any orphan name looks like real client work (for example an old dated release-prep clone), flag it and ask before including it.
Run the dry run and present the list of what would be removed:
bash "${CLAUDE_PLUGIN_ROOT}/skills/ddev-docker-cleanup/scripts/prune.sh"
Nothing is deleted. This shows the orphaned volumes, the build cache, and the dangling images that --apply would clear.
Get explicit confirmation, then apply:
bash "${CLAUDE_PLUGIN_ROOT}/skills/ddev-docker-cleanup/scripts/prune.sh" --apply
Add --poweroff to stop all DDEV projects first, which also frees the RAM they were holding and lets the numbers read honestly:
bash "${CLAUDE_PLUGIN_ROOT}/skills/ddev-docker-cleanup/scripts/prune.sh" --apply --poweroff
Show the before and after. The script prints docker system df after applying. Compare it to the report from step 1 and tell the user roughly how much came back.
To scope a run, name one or more passes: --volumes, --images, --cache. With none named, all three run.
Use this to explain why a volume is kept or removed. For a project named NAME, these are its volumes:
| Volume | Purpose |
|---|---|
NAME-mariadb / NAME-postgres / NAME-mysql | Database. The important one. |
NAME_project_mutagen | Mutagen sync data. Recreated on start. |
ddev-NAME-snapshots | Database snapshots for that project. |
ddev-NAME_redis, ddev-NAME_solr, ddev-NAME_<service> | Add-on service data. |
Global volumes, always kept: ddev-global-cache, ddev-ssh-agent_socket_dir, ddev-ssh-agent_dot_ssh.
The separator after the name matters. NAME-mariadb is matched exactly, and add-ons are matched by the ddev-NAME_ prefix with an underscore. That is why a real project like smalley is protected while an untracked clone like smalley-tw30090415 is treated as an orphan and removed.
Docker is usually not the whole story. Two more places to look:
OrbStack stores its data in a sparse disk image that only uses the space it needs and shrinks automatically as data is deleted. After a large prune the host figure can lag. Quitting and reopening OrbStack, or restarting its engine, nudges it to release the freed blocks. On Docker Desktop the equivalent Docker.raw shrinks inside but not always on the host, so a provider restart may be needed.
Space outside Docker entirely. If the machine is still tight, the weight is often node_modules across projects (du -sh ~/Projects/*/node_modules 2>/dev/null), Composer and npm caches (~/.composer/cache, ~/.npm), and Xcode DerivedData (~/Library/Developer/Xcode/DerivedData) if this is a Mac with Xcode. Offer to help check these, but they are outside this skill's scripts.
These are safe DDEV-native commands worth knowing, for cases the scripts do not cover:
ddev delete images removes DDEV images from before the current release. Non-destructive; DDEV re-pulls what it needs. A more thorough image cleanup than the dangling-only pass, best run with everything powered off.ddev delete --omit-snapshot <project> removes a project you no longer want, including its database volume, with no snapshot taken.ddev snapshot <project> or ddev export-db <project> --file=... back up a database before any risky removal.docker, ddev, and jq must be on PATH. Install jq with brew install jq on macOS. The scripts refuse to prune volumes if ddev list returns no projects, so a broken DDEV cannot trick the allowlist into targeting everything.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
cms-cultivator@claude-toolbox is listed by kanopi/claude-toolbox — review the source before installing
npx claudepluginhub kanopi/claude-toolbox --plugin cms-cultivator30 skills in this plugin
/browser-validatorAutomatically validate implementations in real browsers after code is written or when user says "test this", "test what you built in the browser", "check it in a real browser", or "validate at the breakpoints". Uses Chrome DevTools MCP to test responsive breakpoints (320px, 768px, 1024px), check accessibility compliance (WCAG AA contrast, keyboard navigation, ARIA), validate interactions, and generate detailed technical reports with file paths and specific fixes./code-standards-checkerRun the right linting, formatting, and static-analysis commands after changing code, and check it against PHPCS, ESLint, WordPress Coding Standards, or Drupal Coding Standards. Reads the scripts blocks in composer.json and package.json to find the project's own commands, runs auto-fix before check-only and verifies after, and picks the most specific level (theme, plugin, module, or project root) covering the changed files. Invoke when the user mentions "coding standards", "code style", "linting", "lint", "PHPCS", "phpcbf", "PHPStan", "Rector", "ESLint", "stylelint", "twig-lint", asks what to run after editing PHP, Twig, JS, SCSS, or CSS, or asks whether code follows conventions./commit-message-generatorAutomatically generate conventional commit messages when user has staged changes and mentions committing. Analyzes git diff and status to create properly formatted commit messages following conventional commits specification. AI attribution comes from the tool's own trailer (Claude Code's Co-Authored-By); the skill never adds a second one. Invoke when user mentions "commit", "staged", "committing", or asks for help with commit messages.Other plugins' skills for the same job