Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

cleanup-deals

Skill by TomGranot

Finds past-due, stale, incomplete, unexplained-loss and likely test deals in HubSpot, then sends each deal owner one review task. Never bulk-closes deals, and deletes only test deals a person marked in a reviewed CSV. Skips Salesforce-synced deals.

  • Score 64
  • 81 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install cleanup-deals

Built from the published package, never by AI.

git clone --depth 1 https://github.com/TomGranot/hubspot-admin-skills /tmp/hubspot-admin-skills && mkdir -p ~/.claude/skills && cp -r /tmp/hubspot-admin-skills/skills/cleanup-deals ~/.claude/skills/cleanup-deals

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install cleanup-deals in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The cleanup-deals skill standardizes HubSpot deal data so pipeline reports are accurate. Its read-only before script finds five kinds of problem: past-close-date, stale, missing amount or close date, lost deals with no reason, and likely test deals. It exports one CSV per finding and a summary.

The execute script groups flagged deals by owner and creates one review task per owner, due in 7 days, listing why each deal was flagged. Owners with an open review task are skipped on re-runs. An optional mode deletes only deals a person marked yes in the CSV, with a backup first. The after script re-counts findings and prints a before and after table. It is aimed at HubSpot admins and sales operations teams.

Written from the project's SKILL.md and checked against it.

What it can do

  • Before stage auditRead-only script that exports one CSV per finding and a summary for later comparison.
  • Owner review tasksCreates one task per deal owner listing their flagged deals and the reason for each.
  • Reviewed test-deal deletionDeletes only test deals marked yes in the reviewed CSV, after writing a backup.
  • After stage comparisonRe-counts every finding and prints a before, after and change table.
  • Salesforce sync protectionSets aside deals synced from Salesforce and refuses to delete them.

What you need

  • HubSpot service key in HUBSPOT_ACCESS_TOKEN, with deals, owners and contacts write scopes for task creation
  • Python 3.10+ with uv
  • Knowledge of which deal pipelines are active and which are synced from Salesforce

Try asking

  • Run the before script on the sales pipeline and show me the counts table
  • Create review tasks for deal owners with flagged deals in HubSpot
  • Run the after script and compare findings with the before snapshot

Good to know

  • Never bulk-closes deals; execute has no code path that changes deal stages or properties
  • Review tasks are capped at 50 per run and deletions at 100 per run
  • The Search API does not page past 10,000 results; narrow runs with --pipeline
  • The 2026-09 API paths have not been run against a live portal

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/cleanup-deals/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to cleanup-deals

All alternatives →

Compare with lead-triage, lead-finder or outreach-composer

cleanup-deals: common questions

Does cleanup-deals close stale deals automatically?

No. The skill does not bulk-close deals. It routes flagged deals to their owners as review tasks, and only the owner can decide the outcome.

Will it touch deals synced from Salesforce?

No. Synced deals are excluded from every finding, never appear in a review task, and execute refuses to delete them even if marked in a CSV.

How does it decide which deals are test deals?

A deal is likely a test if its name contains the word test, dummy, sample or asdf, or if it has amount 0 and no associated contacts. Deals named with demo are excluded on purpose.

How do I install cleanup-deals?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is cleanup-deals free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is cleanup-deals safe to use?

It scores 64 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to cleanup-deals?

Similar skills: lead-triage, lead-finder, outreach-composer, cold-email.

cleanup-deals Install

Add to stack

Loading.