/hubspot-admin:build-smart-listsfrom hubspot-admin
Creates dynamic segmented lists for marketing and sales via HubSpot Lists API and UI, including master sendable, ICP-based, persona, and engagement lists.
Ships in hubspot-admin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Create the core active (dynamic) lists that serve as the foundation for all marketing campaigns, sales prioritization, and database health monitoring. Ten foundation lists are created automatically via the Lists API (v3); a further set of advanced segments is built in the UI.
Without predefined lists, every email campaign requires building filters from scratch, there is no standardized definition of "who can we actually email", and there is no persona-based segmentation. The marketing team cannot quickly answer basic questions like "How many senior decision-makers can we email right now?" or "How many engaged contacts do we have?"
HUBSPOT_ACCESS_TOKEN in .env; an existing legacy private app token also works) with crm.lists.read and crm.lists.write scopesuvcompany_segment with values like tier_1_primary_icp; adjust its configuration block if yours differScript paths are relative to this skill's directory. Run them from your project directory so .env, data/, and reports/ resolve there: prefix each path with wherever this skill is installed (skills/build-smart-lists/ in a clone of the repo).
| Stage | Script | Run with |
|---|---|---|
| Execute | scripts/execute.py | uv run scripts/execute.py |
execute.py creates the 10 foundation lists below via POST /crm/v3/lists, skips lists that already exist (409), and writes a CSV audit trail of created list IDs. There are no before/after scripts: the before-state inventory is a single Lists API query (see Before), and verification is a member-count review in the UI.
Before executing, collect the following information from the user:
Q1: What defines "engaged" for your business? (e.g., activity in last 60-120 days)
ACTIVE_WINDOW_DAYS in the script; shorter cycles suit high-velocity sales, longer cycles suit enterprise)Q2: What job titles represent your target personas?
| # | List Name | Object | Key Filter |
|---|---|---|---|
| 1 | All Marketing Contacts | Contacts | hs_marketable_status = true |
| 2 | All Leads | Contacts | Lifecycle stage = Lead |
| 3 | All MQLs | Contacts | Lifecycle stage = MQL |
| 4 | All SQLs | Contacts | Lifecycle stage = SQL |
| 5 | All Customers | Contacts | Lifecycle stage = Customer |
| 6 | ICP Tier 1 Companies | Companies | ICP Tier = Tier 1 |
| 7 | ICP Tier 2 Companies | Companies | ICP Tier = Tier 2 |
| 8 | ICP Tier 3 Companies | Companies | ICP Tier = Tier 3 |
| 9 | Engaged Last 90 Days | Contacts | Email open OR click within the active window |
| 10 | Unengaged 180+ Days | Contacts | Marketable + no email open beyond the re-engagement window |
These use features that benefit from human judgment and portal-specific configuration (list-membership filters, persona keywords, form-name keywords):
| # | List Name | Purpose | Key Filters |
|---|---|---|---|
| A | Marketable - Active | Master sendable list (who CAN receive email) | Marketing contact + not unsubscribed + not bounced + has email + not quarantined |
| B | ICP Tier 1 Contacts | Highest priority contacts | Associated company ICP Tier = Tier 1 + member of Marketable - Active |
| C | ICP Tier 2 Contacts | Secondary priority contacts | Associated company ICP Tier = Tier 2 + member of Marketable - Active |
| D | Partners | Partner communications and exclusion | Lifecycle stage = Partner (or custom contact type property) |
| E | Re-engagement Needed | Sunset candidates | 5+ emails delivered + no open in 180 days + member of Marketable - Active |
| F | Senior Decision Makers | Top persona list | Job title contains target titles |
| G | Industry Leaders | Contacts at companies in target verticals | Associated company industry is any of target industries |
| H | Content Engaged | Form submissions and content downloads | Form submissions > 0 OR conversion contains content keywords |
Overlap note: "All Customers" (script) covers the Customers use case; "Unengaged 180+ Days" (script) is a simpler variant of "Re-engagement Needed" (UI, adds the delivered-count guard). Keep whichever fits your operation — do not maintain both without a reason.
ACTIVE_WINDOW_DAYS, REENGAGEMENT_WINDOW_DAYS, and ICP_PROPERTY_NAME in the script's configuration blockInventory existing lists to avoid duplicates (POST /crm/v3/lists/search with an empty query returns all lists, paginated). Check for name collisions with the library above — the script skips exact name matches (HTTP 409), but near-duplicates ("Customers" vs "All Customers") need a human decision: merge, rename, or skip.
uv run scripts/execute.py
The script posts each definition to POST /crm/v3/lists with processingType: "DYNAMIC". Example payload shape (see the script for all ten):
{
"name": "All Customers",
"objectTypeId": "0-1", # contacts ("0-2" for companies)
"processingType": "DYNAMIC",
"filterBranch": {
"filterBranchType": "AND",
"filterBranches": [],
"filters": [{
"filterType": "PROPERTY",
"property": "lifecyclestage",
"operation": {
"operationType": "ENUMERATION",
"operator": "IS_EQUAL_TO",
"value": "customer",
},
}],
},
}
If the Lists API returns 403 on your plan tier, build the same lists manually in the UI using the table above.
This is the most important advanced list. It defines the single source of truth for "who can receive marketing email." All campaign sends should reference this list.
Marketable - ActiveICP Tier 1 / Tier 2 Contacts (B, C):
Partners (D): Lifecycle stage > is any of > Partner. Always exclude from prospect campaigns.
Re-engagement Needed (E):
Senior Decision Makers (F): Job title > contains any of > [your target titles]. Customize keywords to your buyer personas.
Industry Leaders (G): Associated company property > Industry > is any of > [your target industries].
Content Engaged (H): OR logic between groups:
After all lists are created and processed:
| List | Expected Range | Red Flag If... |
|---|---|---|
| All Marketing Contacts / Marketable - Active | 30-80% of total contacts | Below 10% (too many excluded) or above 90% (filters too loose) |
| ICP Tier lists | 2-10% of marketable | 0 (ICP Tier not populated) |
| Engaged (active window) | 5-30% of total contacts | Below 2% (possible engagement tracking issue) |
| All Customers | Known customer count | Off by more than 20% from expected |
| Partners | Known partner count | Off by more than 20% from expected |
| Unengaged / Re-engagement Needed | 10-40% of marketable | Above 60% (possible date threshold issue) |
| Senior Decision Makers | 5-25% of total contacts | 0 (job title data missing) |
| Industry Leaders | 10-50% of total contacts | 0 (industry data missing) |
| Content Engaged | 1-10% of total contacts | 0 (no form submissions or wrong keywords) |
DELETE /crm/v3/lists/{listId} or the UI — the script's CSV audit trail records every list ID it created.company_segment with values tier_1_primary_icp / tier_2_secondary_icp / tier_3_tertiary_icp. If you chose different names, update the script's configuration block before running.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tomgranot/hubspot-admin-skills --plugin hubspot-admin40 skills in this plugin
/assign-unowned-contactsAssign 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./audit-api-usageInventory 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./backfill-geo-dataEnrich missing geographic data (country, state, city) on contacts and companies using HubSpot workflows, external data providers, or IP-based geolocation.Other plugins' skills for the same job