drupal-cleanup
/drupal-cleanup
List and clean up cloned drupal.org repositories in the local cache (~/.cache/drupal-contrib/). Invoke when user asks to list, remove, or clean up cloned Drupal contrib repos, says \"cleanup drupal repos\", \"remove cloned drupal projects\", or uses /drupal-cleanup. Has side effects: permanently deletes repository clones. Requires user confirmation before deletion.
- Author
- kanopi ↗
- Repository
- cms-cultivator ↗
- Licence
- LGPL
- Last repository change
- 23.10.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 23.10.2026, without references to retired models or APIs.
LGPL, otwarta.
What it does and when to use it
List and clean up cloned drupal.org repositories in the local cache (~/.cache/drupal-contrib/). Invoke when user asks to list, remove, or clean up cloned Drupal contrib repos, says \"cleanup drupal repos\", \"remove cloned drupal projects\", or uses /drupal-cleanup. Has side effects: permanently deletes repository clones. Requires user confirmation before deletion.
Triggers from the description
Original author description
List and clean up cloned drupal.org repositories in the local cache (~/.cache/drupal-contrib/). Invoke when user asks to list, remove, or clean up cloned Drupal contrib repos, says \"cleanup drupal repos\", \"remove cloned drupal projects\", or uses /drupal-cleanup. Has side effects: permanently deletes repository clones. Requires user confirmation before deletion.
How it works
- ⚠️ Side Effect Warning
- Usage
- Environment Detection
- Listing Output Format
- Safety Checks
- When to Clean Up
- Re-cloning After Cleanup
- Related Skills
SKILL.md preview
---
name: drupal-cleanup
description: "List and clean up cloned drupal.org repositories in the local cache (~/.cache/drupal-contrib/). Invoke when user asks to list, remove, or clean up cloned Drupal contrib repos, says \"cleanup drupal repos\", \"remove cloned drupal projects\", or uses /drupal-cleanup. Has side effects: permanently deletes repository clones. Requires user confirmation before deletion."
disable-model-invocation: true
---
# Drupal Cleanup
List and clean up cloned drupal.org repositories in `~/.cache/drupal-contrib/`.
## ⚠️ Side Effect Warning
**Removing a repository permanently deletes the local clone** including:
- All branches not pushed to issue forks
- Any uncommitted changes
- Local-only commits
**The skill checks for uncommitted changes and unpushed branches before deletion and requires explicit user confirmation.** Once deleted, the repository must be re-cloned.
## Usage
- "List my cloned drupal.org repos"
- "Remove the paragraphs repository from my local cache"
- "Clean up all drupal contrib repos"
- `/drupal-cleanup` — List all repos
- `/drupal-cleanup list` — List with details
- `/drupal-cleanup {project}` — Remove specific project
- `/drupal-cleanup --all` — Remove all cloned repos
## Environment Detection
### Tier 1 — Portable (Claude Desktop, Codex, any environment)
When Bash tools are unavailable:
**For listing**:
1. Ask user to run: `ls -la ~/.cache/drupal-contrib/` and share output
2. Provide analysis and recommendations based on shared output
3. Guide cleanup decisions
**For removal (requires Bash in Tier 2)**:
- Provide the exact commands for user to run manually with explanations
### Tier 2 — Claude Code Enhanced
When running in Claude Code with Bash available:
**Listing repos**:
```bash
# Check if cache directory exists
ls -la ~/.cache/drupal-contrib/ 2>/dev/null || echo "No repos cloned yet"
# Get size and details of each project
for dir in ~/.cache/drupal-contrib/*/; do
project=$(basename "$dir")
size=$(du -sh "$dir" 2>/dev/null | cut -f1)
branches=$(cd "$dir" && git branch | wc -l)
status=$(cd "$dir" && git status --short | wc -l)
echo "$project | $size | $branches branches | $status modified files"
done
```
**Removing specific project**:
1. Check for uncommitted changes: `cd ~/.cache/drupal-contrib/{project} && git status --short`
2. Check for unpushed branches: `git log --branches --not --remotes --oneline | wc -l`
3. **Present findings to user**
4. **⛔ STOP: Warn about irreversible deletion and require confirmation**:
```
⚠️ This will permanently delete ~/.cache/drupal-contrib/{project}/
Status: {uncommitted changes / unpushed commits if any}
Reply "yes" to proceed, "no" to cancel.
```
5. **After "yes" confirmation only**: `rm -rf ~/.cache/drupal-contrib/{project}/`
**Removing all repos**:
1. Show summary: all projects, total size, any with uncommitted work
2. **⛔ STOP: Require explicit confirmation**:
```
⚠️ This will permanently delete ALL repos in ~/.cache/drupal-contrib/:
{list of projects with their sizes}
Total: {X} MB across {N} projects
{Warning if any have uncommitted changes}
Reply "yes, delete all" to proceed, or "no" to cancel.
```
3. **After "yes, delete all" confirmation only**: `rm -rf ~/.cache/drupal-contrib/`
## Listing Output Format
```markdown
**Cloned Drupal.org Repositories**
Location: ~/.cache/drupal-contrib/
| Project | Size | Branches | Modified | Status |
|---------|------|----------|----------|--------|
| paragraphs | 45 MB | 3 | 2 days ago | Clean |
| webform | 120 MB | 1 | 1 week ago | Clean |
| easy_lqp | 12 MB | 2 | Today | ⚠️ Modified |
**Total**: 177 MB across 3 projects
**To remove a repo**: Use the drupal-cleanup skill with the project name
**To remove all**: Use the drupal-cleanup skill with --all flag
```
## Safety Checks
Before any deletion, this skill checks:
1. **Uncommitted changes** — Modified files not yet staged
2. **Unstaged files** — New files not tracked by git
3. **Unpushed branches** — Local commits not pushed to issue fork
If any are found, the user is warned before proceeding.
## When to Clean Up
Consider cleaning up when:
- An MR has been merged
- You're done contributing to a project
- Disk space is low
- You want a fresh start
**Before cleanup, ensure**:
- All branches are pushed to issue forks on git.drupalcode.org
- No uncommitted changes exist
- MRs are in stable state
## Re-cloning After Cleanup
```bash
# Via drupal-mr skill (re-clones automatically):
# "Create MR for {project} issue {number}"
# Or manually:
git clone git@git.drupal.org:project/{project}.git ~/.cache/drupal-contrib/{project}
```
## Related Skills
- **drupal-mr** — Create MRs (will re-clone if needed)
- **drupal-issue** — Create issues on drupal.org
- **drupal-contribute** — Full contribution workflow
Files in this package (2)
- SKILL.md 5 KB
- agents/openai.yaml 1 KB
Versions
The database has no other skills named drupal-cleanup.
Database snapshot: 13.11.2026 · package version 851f934920f2 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100drupal-mr
Create or list merge requests for drupal.org projects via git.drupalcode.org. Invoke when user wants to create a merge request for a drupal.org issue, says \"create a drupal.org MR\", \"set up a merge request for issue\", or uses /drupal-mr. Has side effects: clones repos to… - 100drupal-contribute
Full drupal.org contribution workflow — create an issue and set up a merge request together. Invoke when user wants to contribute to a Drupal module, says \"contribute to drupal.org\", \"create a drupal.org issue and MR\", or uses /drupal-contribute. Requires user interaction at… - 100drupal-ai-contrib
Routes Drupal contribution work to the right contribution-quality stage and supplies the contribution knowledge layer. Use when user says 'contribute to Drupal', 'Drupal contribution', 'submit a Drupal patch', 'Drupal merge request', 'fix a Drupal core issue', 'contribute a… - 100canvas-contribution
Workflow for contributing features and fixes to the Drupal Canvas module on drupal.org while consuming it from a separate project: the two-repository setup, Canvas UI development, issue forks, merge requests, and composer patches. Use when developing a Canvas feature or bug fix… - 100drupal-contrib-mgmt
Manages Drupal contributed modules via Composer - module updates and major-version upgrades, cweagans/composer-patches v2 (patches.lock.json, composer patches-relock, verifying patches are applied), mglaman/composer-drupal-lenient, Drupal 11 compatibility checks with… - 100contribution-submit
Creates or updates a Drupal merge request and generates the AI-disclosure comment at the policy threshold. Use when the user runs /drupal-ai-contrib:submit or asks to submit, open, or update a Drupal merge request or patch. Creates the cross-project MR via the drupal-gitlab…