Install
$ agentstack add skill-tomgranot-hubspot-admin-skills-cleanup-lists ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Cleanup Lists
Audit HubSpot lists to remove clutter. Unused lists slow down the UI, confuse team members, and can mask the lists that actually matter.
Prerequisites
- HubSpot API token in
.env - Python with
hubspot-api-clientinstalled viauv - Note: Lists API access may return 403 on some plan tiers. If so, perform the audit manually in the UI.
Step-by-Step Instructions
Stage 1: Before — Inventory All Lists
Pull all lists via the API:
from hubspot import HubSpot
api_client = HubSpot(access_token=os.getenv("HUBSPOT_API_TOKEN"))
lists = []
offset = 0
while True:
response = api_client.crm.lists.lists_api.get_page(offset=offset, limit=100)
lists.extend(response.results)
if not response.paging or not response.paging.next:
break
offset = response.paging.next.after
For each list, record: list ID, name, type (active/static), member count, created date, last updated date.
Export to CSV for review.
Stage 2: Execute — Identify Candidates for Deletion
Flag lists matching any of these criteria:
- Zero members and created more than 30 days ago
- Not referenced by any workflow, email, or ad audience
- Duplicate names or nearly identical filter criteria
- Test/temp lists (names containing "test", "temp", "copy of", "old")
- Static lists that have not been updated in 6+ months
Cross-reference with workflows and email campaigns before deleting — a list with zero members might still be used as an enrollment trigger.
Stage 3: After — Delete and Document
- Delete confirmed unused lists via the API or UI.
- Document what was deleted (list name, ID, reason) in a cleanup log.
- Inform team members if any lists they created were removed.
Stage 4: Rollback
- HubSpot does not have a list recycle bin. Deleted lists cannot be restored.
- Before deleting, export the list definition (filters/criteria) so it can be recreated if needed.
- Static lists: export member IDs before deletion if the membership data matters.
Tips
- Run this quarterly as part of the database cleanup routine.
- Establish a naming convention going forward (e.g., prefix with team name or purpose).
- Archive lists by prefixing with "[ARCHIVE]" instead of deleting if you are unsure.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: TomGranot
- Source: TomGranot/hubspot-admin-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.