One-click install
npx skills add https://github.com/dimagi-internal/ace --skill sweep-ocs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sweep-ocs
Source: https://github.com/dimagi-internal/ace/tree/main/skills/sweep-ocs
Command: npx skills add https://github.com/dimagi-internal/ace --skill sweep-ocs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OCS (Open Chat Studio) resources like chatbots, pipelines, collections, and sessions accumulate orphaned per-opp copies after Connect opportunities close, wasting storage and incurring unnecessary embedding API costs. Manually identifying and safely deleting these orphans is error-prone, as accidental deletion of shared resources like the golden template chatbot or shared collection would break all active opportunities.

Core Features & Use Cases

  • Orphan Detection: Diffs OCS inventory against the current opportunity live set to identify unowned chatbots, pipelines, collections, and sessions.
  • Safe Automated Cleanup: Auto-deletes only per-opp clones (chatbots, their paired pipelines, and per-opp collections) while explicitly protecting the golden template and shared collection, with soft-close support for expired sessions.
  • Dual Mode Operation: Runs in report-only recommend mode to surface triage results for human approval, or execute mode to perform only pre-approved deletions and session closures.
  • Use Case: A team managing 20 active Connect opportunities can use this skill to automatically clean up leftover OCS resources from closed opportunities, reclaiming storage and reducing embedding costs without risking damage to shared assets.

Quick Start

Use the sweep-ocs skill to generate a triage report of orphaned OCS artifacts for your current Connect opportunity.

Frequently Asked Questions about sweep-ocs

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

FAQPage Schema
How do I clean up orphaned Open Chat Studio resources after Connect opportunities close?

To clean up orphaned Open Chat Studio resources, scan your OCS inventory against the current opportunity live set to identify unowned chatbots, pipelines, collections, and sessions. This process distinguishes safe-to-delete per-opp clones from protected shared assets like the golden template chatbot.

What is orphan artifact triage in Open Chat Studio and why is it needed?

Orphan artifact triage in Open Chat Studio identifies chatbots, pipelines, collections, and sessions no longer referenced by active Connect opportunities. This triage is needed because accumulated orphaned per-opp copies waste storage and incur unnecessary embedding API costs after opportunities close.

Can I safely delete OCS chatbots and pipelines without damaging shared collection resources?

Yes, you can safely delete per-opp OCS chatbots, their paired pipelines, and per-opp collections without damaging shared resources. Explicit guardrails prevent accidental deletion of critical shared assets like the golden template chatbot and shared collection.

What's the best way to reclaim storage from expired Open Chat Studio sessions?

The best way to reclaim storage from expired Open Chat Studio sessions is to soft-close them during an automated cleanup sweep. This reclaims storage and reduces embedding costs while preserving auditability of the closed session data.

How do I run a report-only recommendation for OCS orphan cleanup before executing deletions?

Run OCS orphan cleanup in report-only recommendation mode to generate a triage report of orphaned artifacts for human approval. This mode surfaces safe-to-delete candidates and protected shared resources without performing any actual deletions or session closures.

Are there limitations or risks when automating OCS resource management across multiple Connect opportunities?

A key limitation is the risk of deleting critical shared assets like the golden template chatbot, which would break all active Connect opportunities. To mitigate this, use approved execution mode with explicit guardrails that only delete pre-approved orphaned per-opp resources.