tomgranot/hubspot-admin-skills

cleanup-properties

Archive or delete unused custom properties across all HubSpot object types (contacts, companies, deals). Identifies Salesforce sync properties, test/temp properties, and obsolete form fields.

First seen Apr 9, 2026

Installation

$ npx skills add tomgranot/hubspot-admin-skills --skill cleanup-properties

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from tomgranot/hubspot-admin-skills · top by installs.

npx skills add tomgranot/hubspot-admin-skills

Browse all from tomgranot/hubspot-admin-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 70
License LICENSE
Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.1
LicenseMIT
More metadata
author
tomgranot
version
1.1
category
ongoing-maintenance

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,532 B
  • docs SUMMARY.md 217 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 27 installs

SKILL.md

Cleanup Properties

Remove or archive unused custom properties. Property bloat slows down forms, confuses users, and makes data mapping harder.

Prerequisites

  • A HubSpot private app access token (HUBSPOTACCESSTOKEN in .env) with crm.schemas..read and crm.schemas..write scopes
  • Python 3.10+ with uv

Step-by-Step Instructions

Stage 1: Plan

Confirm with the user before starting:

  1. Archive-first policy (recommended) or direct deletion for clearly dead test properties?
  2. Is a Salesforce (or other CRM) sync active? If yes, get the sync property mapping before touching anything.

Stage 2: Before

Inventory custom properties for each object type via the Properties API (v3):

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

for obj_type in ["contacts", "companies", "deals"]:
    resp = requests.get(f"{BASE}/crm/v3/properties/{obj_type}", headers=HEADERS)
    resp.raise_for_status()
    custom_props = [p for p in resp.json()["results"] if not p.get("hubspotDefined")]

For each custom property, record: name, label, object type, type, group, number of records with a value (requires search queries), whether it is used in any form/workflow/list.

Stage 3: Execute

Safe to delete:

  • Properties with zero populated records and not used in any form, workflow, or list
  • Properties with names containing "test", "temp", "old", "copyof"
  • Properties created by deactivated integrations

Handle with care:

  • Salesforce sync properties (hssalesforce* prefix or mapped in sync settings) — do not delete without coordinating with the Salesforce admin
  • Form fields — check if the property is used on any active form before deleting
  • Workflow dependencies — check if any workflow reads or sets this property
  • Calculated properties — check if other calculated properties reference this one

Archive instead of delete when:

  • The property has historical data that might be needed for reporting
  • You are unsure whether anything depends on it

Archive candidates via DELETE /crm/v3/properties/{objectType}/{propertyName} (this archives — the property moves to the archived state) after presenting the list to the user and getting explicit confirmation.

Stage 4: After

  1. Archive properties first (HubSpot supports property archiving).
  2. Wait 30 days, then delete archived properties that caused no issues.
  3. Document all changes in a cleanup log.

Rollback

  • Archived properties can be unarchived at any time.
  • Deleted properties cannot be restored. The property definition and all associated data are permanently lost.
  • Always archive before deleting to provide a safety window.

Tips

  • Run this quarterly as part of the database cleanup routine.
  • Establish a property naming convention going forward (e.g., teampurposedetail).
  • Limit who can create custom properties to prevent sprawl.
  • HubSpot has a property limit per object type — cleanup prevents hitting it.