← 返回 Skills 市场
tomgranot

Cleanup Deals

作者 TomGranot · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
111
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install cleanup-deals
功能描述
Standardize deal pipelines, remove test deals, and address deals with missing amounts or close dates. Coordinates with Salesforce sync if applicable.
使用说明 (SKILL.md)

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-client installed via uv
  • 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_salesforceopportunityid property.

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

  1. Delete test deals — search for deals with names containing "test", "demo", "sample", or with amount = $0 and no associated contacts.
  2. Address missing amounts — export deals without amount and work with sales to fill in values or mark as lost.
  3. Close stale deals — deals open with no activity in 90+ days should be reviewed with the deal owner. Set to "Closed Lost" if abandoned.
  4. Standardize pipeline stages — ensure all pipelines have consistent stage names and probability percentages.
  5. Remove unused pipelines — if a pipeline has zero active deals and is not in use, archive or delete it.

Stage 3: After — Verify

  1. Re-run the deal audit queries. Confirm:
    • Test deals removed
    • Missing amount count decreased
    • Stale deal count decreased
  2. 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 amount and closedate as mandatory deal properties to prevent future gaps.
安全使用建议
This skill’s instructions are coherent with a HubSpot deal-cleanup task, but the package metadata omits the HubSpot credential it requires and the SKILL.md contains ambiguous text (e.g., 'uv' install). Before installing or running it: 1) Treat the HUBSPOT_API_TOKEN as sensitive and only provide a token with the minimum scopes needed; consider using a read-only token for audits and a separate limited token for deletes/updates. 2) Require a dry-run mode or test in a sandbox account first; do not run destructive steps against production without explicit human confirmation. 3) Coordinate with Salesforce admins when synced records exist, and implement explicit checks to skip hs_salesforceopportunityid-bearing records. 4) Update the skill metadata to declare required env vars (HUBSPOT_API_TOKEN) and fix the install guidance (clarify how to install hubspot-api-client). 5) Add explicit safety controls in the workflow: confirmation prompts, logging, and an audit report before performing bulk deletes or status changes.
功能分析
Type: OpenClaw Skill Name: cleanup-deals Version: 1.0.0 The skill bundle provides legitimate instructions and Python code snippets for auditing and cleaning up HubSpot CRM deal data. It uses the official hubspot-api-client to identify and manage deals, includes warnings regarding Salesforce synchronization, and provides a rollback strategy via the HubSpot recycling bin. No malicious patterns, data exfiltration, or harmful prompt injections were detected in SKILL.md or _meta.json.
能力评估
Purpose & Capability
The SKILL.md clearly targets HubSpot deal cleanup (searching, deleting test deals, closing stale deals) and also notes Salesforce-synced deals — that purpose aligns with the operations described. However, the registry metadata declares no required environment variables or primary credential while the instructions explicitly expect a HUBSPOT_API_TOKEN (in .env). This mismatch is unexpected and should be corrected.
Instruction Scope
The runtime instructions instruct the agent to read a HUBSPOT_API_TOKEN (via os.getenv) and use the HubSpot API to search, delete, and modify deals. They include concrete deletion criteria (name contains 'test', amount = 0 with no contacts) and guidance to set deals to 'Closed Lost'. These are destructive operations and the SKILL.md does not mandate confirmation, dry-run/testing, or explicit safeguards beyond 'review with owner' for some steps. The instructions also reference Salesforce sync behavior (hs_salesforceopportunityid) — appropriate contextually, but again no guidance on how to safely detect and avoid modifying synced records beyond a note to coordinate with Salesforce admin.
Install Mechanism
This is an instruction-only skill with no install spec or code files, which reduces installation risk. The SKILL.md asks for Python with 'hubspot-api-client' but oddly states 'installed via `uv`' (likely a typo). That ambiguity could confuse implementers and lead to incorrect installation commands.
Credentials
The skill effectively requires a HubSpot API token (HUBSPOT_API_TOKEN) to operate, yet the registry lists no required env vars or primary credential. Requesting a single HubSpot token is proportionate to the stated purpose, but the omission in metadata is misleading. The SKILL.md also refers to Salesforce-synced deals but does not require any Salesforce credentials (which is reasonable if the skill only needs to avoid modifying synced records), though that should be made explicit.
Persistence & Privilege
The skill does not request persistent or elevated platform presence (always:false), which is appropriate. However, since model-invocation is enabled by default, an agent with access to the HubSpot token could autonomously perform deletions or closures if run without safeguards. The combination of autonomous invocation and destructive instructions increases operational risk even though it is not a metadata privilege escalation.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cleanup-deals
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cleanup-deals 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of cleanup-deals skill. - Standardizes deal pipelines and addresses data quality issues (missing amounts, close dates, stale/test deals). - Provides detailed instructions for handling both standalone and Salesforce-synced HubSpot deals. - Includes audit, cleanup, verification, and rollback steps to ensure safe deal data cleanup. - Offers tips for ongoing deal hygiene to prevent future data gaps.
元数据
Slug cleanup-deals
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

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。

💬 留言讨论