sweep-opp-runs

Prune outdated per-opportunity run folders in ACE Google Drive.

1|2|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/dimagi-internal/ace --skill sweep-opp-runs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sweep-opp-runs
Source: https://github.com/dimagi-internal/ace/tree/main/skills/sweep-opp-runs
Command: npx skills add https://github.com/dimagi-internal/ace --skill sweep-opp-runs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ACE stores individual run folders for every opportunity execution in Google Drive, and over time these folders accumulate without cleanup, leading to slow load times for Drive listings like the /ace:status dashboard. This Skill solves that problem by automating retention pruning of old per-opportunity run folders.

Core Features & Use Cases

  • Automated Retention Pruning: Sorts all run folders under each ACE opportunity by creation time, retains the newest N runs per opp as configured, and proposes the rest for trash.
  • Reversible Cleanup: All trashed run folders are moved to the 30-day Google Drive bin, so no data is permanently lost if you need to recover a run later.
  • Use Case: If your ACE Drive has 20 opportunities each with 15+ old run folders, running this Skill with a keep value of 3 will reduce each opp's run history to the 3 most recent runs, cutting down Drive clutter and improving listing load times.

Quick Start

Use the sweep-opp-runs skill to prune outdated per-opportunity run folders from ACE Drive, keeping only the 3 newest runs for each opportunity.

Frequently Asked Questions about sweep-opp-runs

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

FAQPage Schema
How do I clean up old ACE opportunity run folders in Google Drive?

ACE opportunity run folder cleanup is automated by scanning all legitimate opportunity folders, sorting runs by Drive createdTime, and trashing all but the newest N runs per opportunity to reduce clutter and improve listing load times.

Why does the ACE status dashboard load slowly when listing Google Drive folders?

The ACE status dashboard loads slowly because individual run folders for every opportunity execution accumulate in Google Drive over time without cleanup, creating clutter that bogs down Drive listing load times for ACE tools.

Can I review which Google Drive run folders get deleted before they are trashed?

Yes, you can use recommend mode to generate a human-reviewable prune plan that lists the outdated run folders slated for deletion before using execute mode to trash the approved folders via the Google Drive API.

Is Google Drive folder pruning permanent, or can I recover trashed ACE run folders?

Google Drive folder pruning is fully reversible because all trashed ACE run folders are moved to the 30-day Drive bin, meaning no data is permanently lost and you can recover any run folder within that window.

What is the best way to automate retention pruning for per-opportunity runs in ACE?

Automated retention pruning for ACE runs is handled by setting a keep value, which retains the newest N run folders per opportunity and automatically trashes the older ones to keep Drive fast and eliminate clutter.