/install cleanup-deals
Cleanup Deals
Standardize deal data to make pipeline reporting accurate. Test deals, missing amounts, and stale opportunities distort forecasts and pipeline metrics.
Prerequisites
- HubSpot API token in
.env - Python with
hubspot-api-clientinstalled viauv - Knowledge of which deal pipelines are active and which are synced from Salesforce
Important: Salesforce Sync Considerations
If deals are synced from Salesforce:
- Do NOT delete or modify synced deals without coordinating with the Salesforce admin.
- Changes in HubSpot may sync back to Salesforce and cause data loss.
- Identify synced deals by checking for the
hs_salesforceopportunityidproperty.
Step-by-Step Instructions
Stage 1: Before — Audit Deal Data
Pull deal metrics via the API:
from hubspot import HubSpot
from hubspot.crm.deals import PublicObjectSearchRequest
api_client = HubSpot(access_token=os.getenv("HUBSPOT_API_TOKEN"))
# Deals missing amount
no_amount = PublicObjectSearchRequest(
filter_groups=[{
"filters": [{
"propertyName": "amount",
"operator": "NOT_HAS_PROPERTY"
}]
}]
)
# Deals missing close date
no_close = PublicObjectSearchRequest(
filter_groups=[{
"filters": [{
"propertyName": "closedate",
"operator": "NOT_HAS_PROPERTY"
}]
}]
)
Record: total deals, deals per pipeline stage, deals missing amount, deals missing close date, stale deals (open with no activity in 60+ days).
Stage 2: Execute — Clean Up
- Delete test deals — search for deals with names containing "test", "demo", "sample", or with amount = $0 and no associated contacts.
- Address missing amounts — export deals without
amountand work with sales to fill in values or mark as lost. - Close stale deals — deals open with no activity in 90+ days should be reviewed with the deal owner. Set to "Closed Lost" if abandoned.
- Standardize pipeline stages — ensure all pipelines have consistent stage names and probability percentages.
- Remove unused pipelines — if a pipeline has zero active deals and is not in use, archive or delete it.
Stage 3: After — Verify
- Re-run the deal audit queries. Confirm:
- Test deals removed
- Missing amount count decreased
- Stale deal count decreased
- Check pipeline reports for accuracy.
Stage 4: Rollback
- Deleted deals can be restored from HubSpot's recycling bin within 90 days.
- Stage changes and property updates can be reverted manually but there is no bulk undo.
- For Salesforce-synced deals, check the Salesforce recycle bin as well.
Tips
- Establish a deal hygiene rule: deals without activity for 60 days get an automated reminder to the owner (build a simple workflow).
- Require
amountandclosedateas mandatory deal properties to prevent future gaps.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install cleanup-deals - 安装完成后,直接呼叫该 Skill 的名称或使用
/cleanup-deals触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Cleanup Deals 是什么?
Standardize deal pipelines, remove test deals, and address deals with missing amounts or close dates. Coordinates with Salesforce sync if applicable. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 111 次。
如何安装 Cleanup Deals?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install cleanup-deals」即可一键安装,无需额外配置。
Cleanup Deals 是免费的吗?
是的,Cleanup Deals 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Cleanup Deals 支持哪些平台?
Cleanup Deals 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Cleanup Deals?
由 TomGranot(@tomgranot)开发并维护,当前版本 v1.0.0。