/install cleanup-properties
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-clientinstalled viauv
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
- Archive properties first (HubSpot supports property archiving).
- Wait 30 days, then delete archived properties that caused no issues.
- 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.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install cleanup-properties - 安装完成后,直接呼叫该 Skill 的名称或使用
/cleanup-properties触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Cleanup Properties 是什么?
Archive or delete unused custom properties across all HubSpot object types (contacts, companies, deals). Identifies Salesforce sync properties, test/temp pro... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 106 次。
如何安装 Cleanup Properties?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install cleanup-properties」即可一键安装,无需额外配置。
Cleanup Properties 是免费的吗?
是的,Cleanup Properties 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Cleanup Properties 支持哪些平台?
Cleanup Properties 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Cleanup Properties?
由 TomGranot(@tomgranot)开发并维护,当前版本 v1.0.0。