sweep-hq

Identify orphan CommCare HQ apps and generate triage reports.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the manual effort and risk of cleaning up unused orphan CommCare HQ applications in the ACE-owned domain, which accumulate as Connect opportunities close and are difficult to identify and remove safely without disrupting active resources.

Core Features & Use Cases

  • Orphan App Detection: Diffs the full CommCare HQ app inventory against the current ACE live-set to flag apps not referenced by any active ACE opportunity.
  • Relevance Scoring: Ranks orphan candidates by alignment with ACE's domain and naming patterns to prioritize high-confidence cleanup targets.
  • Safe Soft-Deletion: Supports optional soft-deletion of human-approved orphan apps via CommCare's official API, with full 90-day reversibility via the HQ admin UI to eliminate permanent data loss risk.
  • Use Case: After a Connect opportunity closes, use this Skill to automatically identify and clean up its associated unused CommCare HQ apps, keeping the ACE domain tidy without manual admin work.

Quick Start

Run the sweep-hq skill to diff your CommCare HQ app inventory against the current ACE live-set, score orphan candidates, and generate a triage report for cleanup.

Frequently Asked Questions about sweep-hq

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

FAQPage Schema
How do I identify orphan CommCare HQ apps for cleanup?

Orphan app detection works by diffing the full CommCare HQ app inventory against the current ACE live-set to flag unreferenced apps. This Skill scores candidates by relevance to ACE naming conventions, generating a structured triage report for human review without modifying data.

Can I safely delete unused CommCare HQ applications without losing data?

Yes, you can safely soft-delete unused CommCare HQ applications via the official delete_app web view. This process enforces strict mode separation and offers full reversibility for 90 days via the HQ admin UI, eliminating permanent data loss risk for human-approved apps.

What is the best way to triage orphan apps in an ACE-owned CommCare domain?

The best way to triage orphan apps is to score them by alignment with ACE's domain ownership and naming patterns. This prioritizes high-confidence cleanup targets by generating structured reports that separate read-only recommendations from execution phases to prevent unauthorized mutations.

Does this CommCare HQ cleanup process require manual approval before deletion?

Yes, this CommCare HQ cleanup process requires manual approval before deletion. It enforces strict mode separation between generating report-only recommendations and executing the soft-deletion phase to prevent unauthorized mutations of the ACE-owned domain.

When should I run an orphan app cleanup sweep on my CommCare HQ domain?

You should run an orphan app cleanup sweep after a Connect opportunity closes. This automatically identifies and cleans up associated unused CommCare HQ apps, keeping the ACE-owned domain tidy without manual admin work.