Cleanup Lead Owners

Remove non-employee users from HubSpot and reassign their orphaned contacts, companies, and deals. Pairs with the assign-unowned-contacts skill for comprehensive ownership cleanup.

81 stars 19 forksOther Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add TomGranot/hubspot-admin-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add TomGranot/hubspot-admin-skills --skill cleanup-lead-owners
Manual install
git clone --depth 1 https://github.com/TomGranot/hubspot-admin-skills.git /tmp/hubspot-admin-skills
mkdir -p ~/.claude/skills
cp -r /tmp/hubspot-admin-skills/skills/cleanup-lead-owners ~/.claude/skills/cleanup-lead-owners

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Cleanup Lead Owners

Remove departed employees from HubSpot and reassign their CRM records. Orphaned records with no active owner fall through the cracks.

## Prerequisites

- A HubSpot service key (`HUBSPOT_ACCESS_TOKEN` in `.env`; an existing legacy private app token also works) with `crm.objects.owners.read` and contact/company/deal write scopes
- Python 3.10+ with [`uv`](https://github.com/astral-sh/uv)
- A list of current employees (to compare against HubSpot users)
- A default owner or round-robin assignment rule for orphaned records

## Step-by-Step Instructions

### Stage 1: Plan

Confirm with the user before starting:

1. Who receives reassigned records — a single default owner, or territory/round-robin rules?
2. Which flagged users should be deactivated vs merely stripped of records?

### Stage 2: Before

Identify non-employee owners via the Owners API:

```python
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"}

active = requests.get(f"{BASE}/crm/v3/owners", headers=HEADERS,
                      params={"limit": 100, "archived": "false"}).json()["results"]
deactivated = requests.get(f"{BASE}/crm/v3/owners", headers=HEADERS,
                           params={"limit": 100, "archived": "true"}).json()["results"]
```

Cross-reference with your current employee list. Flag:
Read the full skill on GitHub

Details

Skill name
cleanup-lead-owners
Path
skills/cleanup-lead-owners/SKILL.md
License
MIT
Repo updated
10 November 2026

FAQ

What does the Cleanup Lead Owners skill do?

Remove non-employee users from HubSpot and reassign their orphaned contacts, companies, and deals. Pairs with the assign-unowned-contacts skill for comprehensive ownership cleanup.

How do I install the Cleanup Lead Owners skill?

Claude Code plugin: /plugin marketplace add TomGranot/hubspot-admin-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Cleanup Lead Owners popular?

It lives in TomGranot/hubspot-admin-skills, which has 81 GitHub stars and 19 forks, and is included in 1 curated skill list.

Related skills

Assign Unowned Contacts

81

TomGranot/hubspot-admin-skills

Assign an owner to marketing contacts that have no owner. Ensures every marketable contact has accountability for follow-up, proper lead routing, and accurate owner-based reporting.

Marketing, Sales & BusinessIn 1 list19

Audit API Usage

81

TomGranot/hubspot-admin-skills

Inventory the integrations, service keys, legacy private apps, and internal tooling that call HubSpot APIs, and flag anything on legacy v1-v4 endpoints or legacy app architecture ahead of HubSpot's 2027 cutoffs. Produces a migration checklist to date-based API versions and service keys.

Software DevelopmentIn 1 list19

Backfill Geo Data

81

TomGranot/hubspot-admin-skills

Enrich missing geographic data (country, state, city) on contacts and companies using HubSpot workflows, external data providers, or IP-based geolocation.

Productivity & NotesIn 1 list19

Review Bounced Contacts

81

TomGranot/hubspot-admin-skills

Weekly manual review of contacts with 3+ bounce events. Decide whether to delete or attempt recovery for each flagged contact. Prevents over-suppression while removing truly bad data.

OtherIn 1 list19

Sec Analyst Master

132

OctagonAI/skills

Comprehensive SEC filing analyst skill that orchestrates all Octagon SEC analysis skills. Use when conducting due diligence, regulatory compliance review, M&A analysis, or creating comprehensive company assessments based on SEC disclosures.

Other14

Standardize Geo Values

81

TomGranot/hubspot-admin-skills

Convert inconsistent country and state/region formats to standardized values across contacts and companies. Ensures geographic segmentation works reliably.

OtherIn 1 list19

Browse the most popular Claude skills, all other skills, or write your own with the skills generator.