Back to Skills

cleanup-properties

TomGranot
Updated 2 days ago
6 views
33
11
33
View on GitHub
Testingtesting

About

This skill helps developers clean up unused custom properties in HubSpot by archiving or deleting them across contacts, companies, and deals. It identifies problematic properties like Salesforce sync fields, test/temp properties, and obsolete form fields that slow down forms and complicate data mapping. Use it during ongoing maintenance to reduce property bloat and improve system performance.

Quick Install

Claude Code

Recommended
Primary
npx skills add TomGranot/hubspot-admin-skills -a claude-code
Plugin CommandAlternative
/plugin add https://github.com/TomGranot/hubspot-admin-skills
Git CloneAlternative
git clone https://github.com/TomGranot/hubspot-admin-skills.git ~/.claude/skills/cleanup-properties

Copy and paste this command in Claude Code to install this skill

Documentation

Cleanup Properties

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

Prerequisites

  • HubSpot API token in .env
  • Python with hubspot-api-client installed via uv

Step-by-Step Instructions

Stage 1: Before — Inventory All Custom Properties

Pull properties for each object type:

from hubspot import HubSpot

api_client = HubSpot(access_token=os.getenv("HUBSPOT_API_TOKEN"))

for obj_type in ["contacts", "companies", "deals"]:
    props = api_client.crm.properties.core_api.get_all(
        object_type=obj_type
    )
    custom_props = [p for p in props.results if not p.hubspot_defined]

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 2: Execute — Identify Candidates for Deletion

Safe to delete:

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

Handle with care:

  • Salesforce sync properties (hs_salesforce_* 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

Stage 3: After — Delete or Archive

  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.

Stage 4: 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., team_purpose_detail).
  • Limit who can create custom properties to prevent sprawl.
  • HubSpot has a property limit per object type — cleanup prevents hitting it.

GitHub Repository

TomGranot/hubspot-admin-skills
Path: skills/cleanup-properties
0

Related Skills

evaluating-llms-harness

Testing

This Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.

View skill

cloudflare-cron-triggers

Testing

This skill provides comprehensive knowledge for implementing Cloudflare Cron Triggers to schedule Workers using cron expressions. It covers setting up periodic tasks, maintenance jobs, and automated workflows while handling common issues like invalid cron expressions and timezone problems. Developers can use it for configuring scheduled handlers, testing cron triggers, and integrating with Workflows and Green Compute.

View skill

webapp-testing

Testing

This Claude Skill provides a Playwright-based toolkit for testing local web applications through Python scripts. It enables frontend verification, UI debugging, screenshot capture, and log viewing while managing server lifecycles. Use it for browser automation tasks but run scripts directly rather than reading their source code to avoid context pollution.

View skill

finishing-a-development-branch

Testing

This skill helps developers complete finished work by verifying tests pass and then presenting structured integration options. It guides the workflow for merging, creating PRs, or cleaning up branches after implementation is done. Use it when your code is ready and tested to systematically finalize the development process.

View skill