Cleans and organizes CRM deal data for accurate reporting and forecasting.

Install

mkdir -p .claude/skills/cleanup-deals && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16182" && unzip -o skill.zip -d .claude/skills/cleanup-deals && rm skill.zip

Installs to .claude/skills/cleanup-deals

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Standardize deal pipelines, remove test deals, and address deals with missing amounts or close dates. Coordinates with Salesforce sync if applicable.
149 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Identify deals with missing amounts or close dates.
  • Delete test deals from HubSpot pipelines.
  • Close stale deals based on inactivity.
  • Standardize pipeline stage names and probability percentages.
  • Archive or delete unused pipelines.
  • Coordinate with Salesforce admin for synced deals.

How it works

The skill audits HubSpot deal data, identifies issues like test deals or missing information, and then executes cleanup actions such as deletion, closing, or standardization.

Inputs & outputs

You give it
User request to clean up HubSpot deal data.
You get back
Cleaned HubSpot deal pipelines, reduced counts of test/stale deals, and standardized deal properties.

When to use cleanup-deals

  • Clean up test deals in pipeline
  • Remove stale opportunities
  • Standardize CRM deal data

About this skill

Cleanup Deals

Standardize deal data to make pipeline reporting accurate. Test deals, missing amounts, and stale opportunities distort forecasts and pipeline metrics.

Prerequisites

  • A HubSpot private app access token (HUBSPOT_ACCESS_TOKEN in .env) with crm.objects.deals.read and crm.objects.deals.write scopes
  • Python 3.10+ with 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: Plan

Confirm with the user before starting:

  1. Which pipelines are in scope, and which are Salesforce-synced (hands off without coordination)?
  2. The staleness cutoff for closing abandoned deals (default: 90 days without activity).

Stage 2: Before

Pull deal metrics via the CRM Search API:

import os, requests
from dotenv import load_dotenv

load_dotenv()
TOKEN = os.environ["HUBSPOT_ACCESS_TOKEN"]
BASE = "https://api.hubapi.com"
HEADERS = {"Authorization": f"Bearer {TOKEN}", "Content-Type": "application/json"}

def deal_count(prop, operator):
    resp = requests.post(f"{BASE}/crm/v3/objects/deals/search", headers=HEADERS, json={
        "filterGroups": [{"filters": [{"propertyName": prop, "operator": operator}]}],
        "limit": 1,
    })
    resp.raise_for_status()
    return resp.json()["total"]

no_amount = deal_count("amount", "NOT_HAS_PROPERTY")
no_close = deal_count("closedate", "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 3: Execute

  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 4: After

  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.

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.

When not to use it

  • When deleting or modifying Salesforce-synced deals without coordination.

Prerequisites

A HubSpot private app access token with crm.objects.deals.read and crm.objects.deals.write scopesPython 3.10+uv

Limitations

  • It requires a HubSpot private app access token with specific scopes.
  • It cannot delete or modify Salesforce-synced deals without coordination.
  • Deleted deals can only be restored from HubSpot's recycling bin within 90 days.

How it compares

This skill automates the process of cleaning and standardizing HubSpot deal data, unlike manual review and correction.

Compared to similar skills

cleanup-deals side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
cleanup-deals (this skill)04moReviewIntermediate
googlesheets-automation34moNo flagsIntermediate
add-vault-note15moNo flagsIntermediate
taxonomy-management02moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

googlesheets-automation

sickn33

Automate Google Sheets operations (read, write, format, filter, manage spreadsheets) via Rube MCP (Composio). Read/write data, manage tabs, apply formatting, and search rows programmatically.

321

add-vault-note

tradingstrategy-ai

Add a note to specific vault

11

taxonomy-management

DusanEngIt

Manage the skill taxonomy: add new skills, deprecate old ones, review and approve pending skill proposals from imports or employee free-text input, check for duplicates, and invalidate taxonomy cache. Use when HR needs to update taxonomy or clear a backlog of unreviewed skill proposals.

00

airtable-automation

diegosouzapw

Airtable Automation via Rube MCP workflow skill. Use this skill when the user needs Automate Airtable tasks via Rube MCP (Composio): records, bases, tables, fields, views. Always search tools first for current schemas and the operator should preserve the upstream workflow, copied support files, and

00

project-management

elhaddajiOtmane

Automated workflows for Git version control, database backups, semantic naming, and task tracking. Use this skill whenever the user asks to save progress, commit changes, or perform project management tasks.

00

everjust-documents

ever-just

Operate the "Documents" app of an everjust.app Odoo 19 tenant (browse/create/move folders and files, upload, download, tag, migrate storage, point Documents at the tenant's private cloud) via the Odoo MCP/ORM. Use to read or mutate a tenant's documents — create a folder (dms.directory) or file (dms.

00

Search skills

Search the agent skills registry