К основному содержанию
скилл CX Codex

enrich-industry — скилл для Claude Code: перенос отрасли в HubSpot

Скилл помогает скопировать отрасль из связанной компании в карточки контактов HubSpot. Пригодится для сегментации контактов по отраслям.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add TomGranot/hubspot-admin-skills --skill enrich-industry -a claude-code
Открыть на GitHub

Что делает enrich-industry

Скилл описывает настройку рабочего процесса HubSpot: он переносит значение Industry из связанной компании в пустое поле контакта. Повторная запись включается для тех же условий, чтобы обработать контакты, которым позже назначат компанию. Перед запуском нужно проверить, какое из полей контакта — industry или industry_name — используют списки и отчёты.

До и после запуска состояние проверяют скрипты scripts/before.py и scripts/after.py, которые запускаются через uv. Для работы нужны HubSpot Marketing Hub Professional или Sales Hub Professional, ключ сервиса в .env и Python 3.10+ с uv. Если значения выпадающих списков компании и контакта отличаются регистром или написанием, копирование не сработает.

Сам перенос выполняет рабочий процесс HubSpot, а не отдельный скрипт. После активации нужно проверить результаты и историю ошибок; процесс заполняет только пустые поля, а для отката рабочий процесс отключают.

Какие задачи решает

  • скопировать отрасль компании в пустые поля контактов
  • найти контакты без отрасли, у которых связанная компания уже заполнена
  • проверить число контактов до и после запуска рабочего процесса
  • выявить несовпадение значений отрасли в выпадающих списках

Примеры запросов агенту

  • Проверь, сколько контактов можно обогатить отраслью, и запусти scripts/before.py.
  • Опиши рабочий процесс HubSpot для переноса Industry из связанной компании в контакт.
  • Подскажи, как проверить результат переноса и ошибки после запуска scripts/after.py.

Как установить enrich-industry

1Через Skills CLI (Vercel)

npx skills add TomGranot/hubspot-admin-skills --skill enrich-industry -a claude-code

2Вручную: положить файлы

~/.claude/skills/enrich-industry/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/enrich-industry/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о enrich-industry

Как установить enrich-industry в Claude Code?

Выполните npx skills add TomGranot/hubspot-admin-skills --skill enrich-industry -a claude-code. Файл скилла появится по пути ~/.claude/skills/enrich-industry/SKILL.md.

Что делает enrich-industry?

Он помогает настроить рабочий процесс HubSpot, который копирует Industry из связанной компании в пустое поле контакта. Скрипты до и после запуска помогают оценить результат.

Что проверить перед копированием отрасли?

Убедитесь, что выбрано поле контакта, которое используют списки и отчёты. Значения выпадающих списков должны совпадать точно, включая регистр.

Исходный текст

SKILL.md · MIT
---
name: enrich-industry
description: "Backfill contact-level industry from associated company records using a HubSpot workflow. Enables industry-based segmentation for targeted campaigns aligned with ICP verticals."
license: MIT
metadata:
  author: tomgranot
  version: "1.1"
  category: data-enrichment
---

# Enrich Contact Industry from Associated Company

Copy industry data from company records to their associated contacts. In a typical B2B CRM, company records have industry populated at high rates (80-90%) while contact records have almost none. This workflow bridges that gap automatically.

## Why This Matters

Without industry on contact records, you cannot segment email campaigns by vertical. For B2B companies targeting specific industries, this makes the difference between spray-and-pray email blasts and targeted, relevant messaging. Industry data on contacts also feeds ICP tier classification and lead scoring models.

## Prerequisites

- HubSpot Marketing Hub Professional or Sales Hub Professional (for Workflows)
- A HubSpot service key (`HUBSPOT_ACCESS_TOKEN` in `.env`; an existing legacy private app token also works) for the scripted stages
- Python 3.10+ with [`uv`](https://github.com/astral-sh/uv)
- Company name enrichment (enrich-company-name skill) should be completed first, as it may trigger new company associations
- Access to Settings > Properties to verify/create the contact Industry property

## Scripts

Script 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/enrich-industry/` in a clone of the repo).

| Stage | Script | Run with |
|-------|--------|----------|
| Before | [`scripts/before.py`](./scripts/before.py) | `uv run scripts/before.py` |
| After | [`scripts/after.py`](./scripts/after.py) | `uv run scripts/after.py` |

There is no execute script: the enrichment itself runs as a HubSpot workflow (see Execute below).

## Plan

1. Verify the contact Industry property exists and is compatible with the company Industry property
2. Audit how many contacts can be enriched (before state)
3. Build a workflow that copies industry from the associated company
4. Verify enrichment results (after state)

## Before

### Check Property Compatibility

This is the most important pre-step. Contacts may have TWO industry properties: `industry` and `industry_name`. You must verify which one HubSpot uses for lists and reports.

1. Go to **Settings > Properties > Contact properties**
2. Search for "Industry"
3. Note ALL industry-related properties on the contact object
4. Check which property is used in existing lists, reports, and workflows
5. The target property must be compatible with the company Industry property:
   - If both are **dropdown select**: option values must match exactly (same spelling, same case)
   - If the contact property is **single-line text**: it will accept any value (safest option)
   - If unsure, use single-line text to avoid copy failures

**If no contact Industry property exists**, create one:
- Object: Contact
- Group: Contact information
- Label: Industry
- Field type: Dropdown select (copy all values from the company Industry property) OR Single-line text (accepts any value)

### Audit Enrichment Opportunity

Run `uv run scripts/before.py`. The core query:

```python
resp = requests.post(f"{BASE}/crm/v3/objects/contacts/search", headers=HEADERS, json={
    "filterGroups": [{"filters": [
        {"propertyName": "industry", "operator": "NOT_HAS_PROPERTY"},
    ]}],
    "limit": 1,
})
print(f"Contacts missing industry: {resp.json()['total']}")
```

Also create a HubSpot list to estimate enrichable contacts:
- Filter 1: Contact Industry > is unknown
- Filter 2: AND Associated company > Industry > is known
- This count tells you how many contacts will actually be enriched

## Execute

### Create the Enrichment Workflow

This workflow is nearly identical to the company name enrichment workflow. If you already built that one, clone it and swap the property references.

1. Go to **Automation > Workflows > Create workflow**
2. Select **Contact-based > Blank workflow**
3. Name: `AUTO-ENRICH: Copy Industry from Company`

**Enrollment trigger:**
- Contact property > Industry > **is unknown**
- AND Associated company > Industry > **is known**

**Re-enrollment:**
- Enable re-enrollment on the same criteria. This ensures contacts that later get associated with a company are also enriched.

**Action: Copy property**
- Copy FROM: Company > Industry
- Copy TO: Contact > Industry

**Activate:**
- Click Review > Turn on
- Select **Yes, enroll existing contacts**

**Note:** Unlike the company name workflow, no delay is needed here. If the contact already has an associated company with industry data (checked by the enrollment trigger), the copy can happen immediately.

## After

Wait 1-2 hours for the workflow to process, then verify: `uv run scripts/after.py` (re-runs the before-state query and compares against the baseline).

**Verification checklist:**

1. Contact industry count should jump from near-zero to tens of thousands
2. The enrichment list (missing industry + has company association) should be near 0
3. Spot-check 20+ contacts for accuracy:
   - Open the contact record
   - Verify the Industry field shows a value
   - Click the associated company and confirm the industry matches
4. Check that the industry distribution on contacts roughly mirrors the company industry distribution
5. Check workflow history for failures — most common is property value mismatch (company has a value that does not match a dropdown option on the contact)

## Rollback

- Turn off the workflow to stop further enrichment.
- The workflow only fills empty fields. If wrong values were copied (e.g., mismatched dropdown options), filter contacts by the workflow's enrollment history and clear the contact `industry` property, or restore individual values from property history.

## External Providers

This skill only moves industry data the portal already has (company → contact). When the *company* itself has no industry value, that gap needs external data — see `/waterfall-enrich-contacts` for the provider-agnostic enrichment path, or HubSpot's Breeze Intelligence add-on for in-platform enrichment.

## Key Technical Learnings

- **Two industry properties can exist.** Some HubSpot portals have both `industry` and `industry_name` on contacts. Verify which one is authoritative before building the workflow. Writing to the wrong one means your lists and reports will not see the data.
- **Dropdown value matching is case-sensitive and exact.** If the company Industry has "Healthcare" and the contact Industry dropdown has "healthcare" (lowercase), the copy will fail. Ensure values match exactly.
- **Consider consolidating similar industries.** Many CRMs have overlapping values like "Healthcare" and "Hospital & Health Care". For segmentation, consider creating a separate "Industry Group" property that maps similar values into broader categories. This is optional but improves list usability.
- **This does not overwrite existing values.** The enrollment trigger requires "Industry is unknown", so contacts that already have industry data are not affected.
- **If using a text field instead of dropdown:** Enrichment works, but you lose the ability to filter by exact dropdown values in lists. You can convert to a dropdown later but will need to clean up inconsistent text values first.
- **Run this after company name enrichment.** Company name enrichment may trigger new company associations, which increases the number of contacts eligible for industry enrichment.
- **Clone the company name workflow.** The structure is nearly identical. Clone it in HubSpot and swap the property references to save time.

© tomgranot · MIT · TomGranot/hubspot-admin-skills

Похожие скиллы

Все скиллы по теме «Данные и базы» →
xlsx официальный anthropics Работает с табличными файлами: создаёт, читает, правит и преобразует книги. Подходит, когда итогом должен стать файл Excel или другой табличный формат. 187 223установок google-agents-cli-observability официальный Google Помогает настроить трассировку и сбор данных о работе ИИ-агентов, включая агентов на ADK. Пригодится, когда нужно разбирать выполнение запросов или наблюдать за агентом после развёртывания. CX Codex +1 511 300установок caveman-evidence-review JuliusBrussee Скилл читает данные Caveman Cloud о расходах LLM, трассах и маршрутизации. Подходит для проверки того, куда уходит бюджет проекта. CX Codex +1 104 500установок migration JuliusBrussee Скилл задаёт правила безопасных миграций схем, данных и API с обязательным откатом. Пригодится при изменениях, где нельзя терять данные или ломать совместимость. CX Codex +1 103 900установок performance-optimization addyosmani Скилл для агентов ИИ-кодинга: сначала замеряет, потом чинит узкое место — от Core Web Vitals до N+1 запросов и индексов в базе. CX Codex +1 65 200установок supabase официальный supabase Скилл помогает настраивать базу данных, аутентификацию и RLS в Supabase без скрытых дыр в безопасности. CX Codex GP ChatGPT 8установок

Из того же набора21

review-bounced-contacts Еженедельный ручной разбор контактов с 3+ отскоками: удалить или попробовать восстановить. Помогает не переусердствовать с подавлением и убрать мусор. CX Codex +1 ★ 78звёзд репо quarterly-database-cleanup Скилл проверяет качество данных в HubSpot, активность контактов и состояние списков, затем формирует отчёт с сравнением кварталов. Пригодится для регулярной очистки CRM. CX Codex +1 ★ 78звёзд репо new-contact-hygiene-workflow Создаёт в HubSpot воркфлоу, который при появлении контакта ставит стадию жизненного цикла и подтягивает компанию с отраслью. CX Codex +1 ★ 78звёзд репо lifecycle-progression-workflow Скилл помогает создать в HubSpot четыре workflow для перехода контактов от лида до клиента. Переходы запускаются по событиям в воронке продаж. CX Codex +1 ★ 78звёзд репо enrich-company-name Копирует название компании из связанной записи в пустое поле контакта HubSpot. Пригодится, если сегментация и токены персонализации ломаются из-за пустых значений. CX Codex +1 ★ 78звёзд репо delete-no-email-contacts Скилл находит в HubSpot CRM контакты без email, сохраняет аудит и удаляет их через API. Нужен для очистки базы перед работой с контактами. CX Codex +1 ★ 78звёзд репо create-segment-lists Собирает в HubSpot библиотеку списков сегментов: клиенты, партнёры, конкуренты, сотрудники, уровни ICP и отрасли. Нужна для таргетинга, подавления рассылок и отчётности. CX Codex +1 ★ 78звёзд репо connect-hubspot-mcp Подключает Claude Code к удалённому MCP-серверу HubSpot для поиска записей, проверки результатов и небольших подтверждённых изменений в CRM. CX Codex +1 ★ 78звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой