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

quote-to-cash — скилл для Claude Code: каталог товаров и счета

Скилл для работы с HubSpot через CLI: создаёт товары, собирает сметы со строками и связями, читает счета и подписки.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add HubSpot/agent-cli-skills --skill quote-to-cash -a claude-code
Открыть на GitHub

Что делает quote-to-cash

Скилл закрывает путь от товара до денег в HubSpot. Он создаёт записи в каталоге продуктов, собирает сметы из строк, связывает их со сделками, а потом читает счета и подписки. Всё через hubspot CLI, без ручных кликов в интерфейсе.

Сборка сметы идёт тремя конвейерами: сначала создаются строки из JSONL, потом сама смета, потом связи строк со сметой и сметы со сделкой. Отдельный файл resources/q2c-essentials.md держит шпаргалку по шести полям и направлениям связей. Перед работой стоит прочитать bulk-operations/SKILL.md — там описан поток dry-run, digest и confirm для разрушительных операций.

Есть жёсткое ограничение: сметы, созданные через CLI, всегда в статусе DRAFT, а ссылки для клиента, PDF и создание счетов делаются только в интерфейсе HubSpot. Счета и подписки требуют подходящего скоупа на токене — иначе 403. Ещё hs_total_discount на строках только для чтения, скидку задавайте через discount в процентах.

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

  • создать товар с ценой и артикулом в каталоге HubSpot
  • собрать смету из строк и привязать её к сделке
  • выгрузить список неоплаченных счетов
  • найти просроченные счета по дате
  • посчитать суммарный MRR по активным подпискам

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

  • создай товар Enterprise License с ценой 12000
  • собери смету для сделки 12345 из файла items.jsonl
  • покажи все просроченные счета

Как установить quote-to-cash

1Через Skills CLI (Vercel)

npx skills add HubSpot/agent-cli-skills --skill quote-to-cash -a claude-code

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

~/.claude/skills/quote-to-cash/SKILL.md

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

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

Вопросы о quote-to-cash

Как установить quote-to-cash в Claude?

Выполните npx skills add HubSpot/agent-cli-skills --skill quote-to-cash -a claude-code. Скилл встанет в ~/.claude/skills/quote-to-cash/SKILL.md.

Что делает quote-to-cash?

Создаёт товары и сметы в HubSpot через CLI, связывает строки сметы со сделкой, а затем читает счета и подписки. Работает поверх команд hubspot objects и hubspot associations.

Почему счета и подписки возвращают 403?

Этим типам объектов нужен соответствующий read-скоуп на активном токене, например invoices-read или subscriptions-read. Без него запрос отклоняется.

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

SKILL.md · Apache-2.0
---
name: quote-to-cash
description: Build the product catalog, assemble quotes (line items + associations to deals), and track invoices and subscriptions through to revenue.
triggers:
  - "create product"
  - "product catalog"
  - "build a quote"
  - "create quote"
  - "line items"
  - "associate line items"
  - "outstanding invoices"
  - "overdue invoices"
  - "active subscriptions"
  - "quote to cash"
---

## Resources

| File | When to use |
|---|---|
| `resources/q2c-essentials.md` | Six-field cheat sheet, association directions, portal caveats for invoices/subscriptions/orders/carts. |

## Foundations

Read `bulk-operations/SKILL.md` first — JSONL piping, batch read, pagination, and the dry-run/digest/confirm flow for destructive ops live there. Reshape recipes (read → write payload) are in `bulk-operations/resources/json-patterns.md`.

`hubspot <command> --help` is the source of truth. Object types are plural (`products`, `line_items`, `quotes`, `invoices`, `subscriptions`). Never hardcode property tables — `hubspot properties list --type <type>` is one call away. Verify any enum value the agent is about to write with `hubspot properties options-list --type <type> <property> | jq -r '.value'`.

Portal note: `invoices`, `subscriptions`, `orders`, `carts` show an empty `objectTypeId` in `hubspot objects types`. They work through `objects search`/`list` when the token has the matching scope (`invoices-read`, `subscriptions-read`, etc.) and 403 otherwise. CLI-created quotes are always `DRAFT`; approval routing, share links, PDF generation, and invoice creation usually require the HubSpot UI.

## 1. Create a product

```bash
hubspot objects create --type products \
  --property name="Enterprise License" \
  --property price=12000 \
  --property hs_sku=ENT-001
```

For a recurring product set `recurringbillingfrequency`; check the API enum values first with `hubspot properties options-list --type products recurringbillingfrequency | jq -r '.value'`. Bulk-import a catalog by piping JSONL of `{"properties":{...}}` to `hubspot objects create --type products --dry-run`.

## 2. Build a quote: line items → quote → associations

`objects create` emits one result line per stdin line, in input order. That lets you build line items, capture their IDs, and associate them to the new quote in three pipes — no per-record shell loop.

```bash
DEAL_ID=12345

# 1. Create the line items. items.jsonl holds {"name":..,"qty":..,"price":..,"product_id":..} per line.
jq -c '{properties:{
    name:.name, quantity:(.qty|tostring), price:(.price|tostring),
    hs_product_id:.product_id, hs_line_item_currency_code:"USD"
  }}' items.jsonl \
| hubspot objects create --type line_items > /tmp/lineitems.jsonl

# 2. Create the quote.
QUOTE_ID=$(hubspot objects create --type quotes \
  --property hs_title="Acme Corp - 2026" \
  --property hs_expiration_date=2026-06-30 \
  --property hs_currency=USD \
  --format json | jq -r '.data.id // .id')

# 3. Associate every new line item to the quote in one pipe.
jq -r '.id' /tmp/lineitems.jsonl \
| jq -cR --arg q "$QUOTE_ID" '{from:("quotes:" + $q), to:("line_items:" + .)}' \
| hubspot associations create

# 4. Link the quote to the deal.
hubspot associations create --from "deals:$DEAL_ID" --to "quotes:$QUOTE_ID"
```

Discount handling — `discount` is the writable percentage (`10` = 10% off). `hs_total_discount` is HubSpot-computed; do not set it. Verify with `hubspot properties get --type line_items hs_total_discount` (property name is positional; look for `modificationMetadata.readOnlyValue:true`) before relying on this in a portal you don't own.

Promote a quote out of `DRAFT` when ready to share. `objects update` is irreversible — dry-run first, then re-run with the digest and `--confirm <quote_id>`:

```bash
hubspot objects update --type quotes <quote_id> --property hs_status=APPROVAL_NOT_NEEDED --dry-run
hubspot objects update --type quotes <quote_id> --property hs_status=APPROVAL_NOT_NEEDED --digest <hash> --confirm <quote_id>
```

Verify `hs_status` enum values for your portal: `hubspot properties options-list --type quotes hs_status | jq -r '.value'`.

## 3. Track invoices

The CLI reads invoice data and updates status; creation usually needs HubSpot Commerce + UI. Filter by `hs_invoice_status` and date.

```bash
# All outstanding invoices
hubspot objects search --type invoices \
  --filter "hs_invoice_status=OUTSTANDING" \
  --properties hs_number,hs_amount_billed,hs_balance,hs_due_date

# Past-due (overdue) invoices, dynamic date
hubspot objects search --type invoices \
  --filter "hs_due_date<$(date +%Y-%m-%d) AND hs_invoice_status!=PAID" \
  --properties hs_number,hs_due_date,hs_balance

# Invoices billed in the last 30 days
hubspot objects search --type invoices \
  --filter "hs_invoice_date>=$(date -v-30d +%Y-%m-%d 2>/dev/null || date -d '30 days ago' +%Y-%m-%d)" \
  --properties hs_number,hs_amount_billed,hs_invoice_date
```

Verify the status enum the same way: `hubspot properties options-list --type invoices hs_invoice_status | jq -r '.value'`.

## 4. Track subscriptions

Same shape, filter on `hs_subscription_status`. Verify the enum values before writing the filter — do not hardcode `ACTIVE`/`CANCELLED`/`PAST_DUE`:

```bash
hubspot properties options-list --type subscriptions hs_subscription_status | jq -r '.value'

# Then filter (case matters)
hubspot objects search --type subscriptions \
  --filter "hs_subscription_status=<value-from-above>" \
  --properties hs_mrr,hs_arr,hs_subscription_status

# Sum MRR across active subs
hubspot objects search --type subscriptions \
  --filter "hs_subscription_status=<active-value>" --format json \
  | jq '[.data[].properties.hs_mrr | select(. != null and . != "") | tonumber] | add // 0'
```

## Known constraints

- `invoices`, `subscriptions`, `orders`, `carts`, `payments` need the matching read scope on the active token; 403 means the user OAuth login or private-app token is missing the scope.
- `objects delete` on products/quotes/line_items works under both user OAuth (`hubspot auth login`, with the object's write scope) and a service key (`export HUBSPOT_ACCESS_TOKEN=<token>`); a 403 means the active token is missing that write scope. The exception is the `--gdpr` permanent purge, which requires a service key — the GDPR endpoint does not accept user OAuth tokens. See `bulk-operations/SKILL.md` for the dry-run → digest → confirm flow before bulk-deleting catalog records.
- Quote share links, PDF generation, approval routing, and from-scratch invoice creation are UI-only — the CLI updates records but cannot send a quote to a customer.
- `hs_total_discount` on line items is read-only — set `discount` (percentage) instead.

© HubSpot · Apache-2.0 · HubSpot/agent-cli-skills

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

Все скиллы по теме «Автоматизация и no-code: n8n, Zapier, Make» →
cargo-connection getcargo Управляет интеграциями и коннекторами в Cargo CLI, находит действия и разрешает параметры connectorUuid для нод воркфлоу. CX Codex +1 10 300установок canva-creator официальный anthropics Берёт готовый бриф контента и пошагово разворачивает кампанию: строит календарь публикаций, создаёт макеты в Canva для соцсетей, пишет тексты и отправляет посты в HubSpot. CX Codex +1 1 900установок cash-flow-snapshot официальный anthropics Строит прогноз движения денег на три месяца вперёд из данных бухучёта, платёжных систем или загруженного CSV. Показывает диапазон вероятных остатков, флагирует риски просрочек и нехватки денег на зарплату. CX Codex +1 1 900установок longbridge-market-data longbridge Получает котировки, стакан заявок, свечи и календарь IPO рынков США, Гонконга и Сингапура через CLI Longbridge. Пригодится при анализе тикеров и потоков капитала. CX Codex +1 3 300установок inngest-flow-control inngest Скилл по flow control в Inngest: concurrency, throttling, rate limiting, debounce, priority, singleton и батчинг событий. Пригодится, когда внешние API отвечают 429. CX Codex +1 1 600установок cargo-segmentation getcargo Скилл для работы с сегментами Cargo: сохраняет именованные фильтры над моделью и считает, сколько записей в них попадает. Пригодится, когда агенту нужно собрать аудиторию для рассылки или экспорта. CX Codex +1 6 000установок

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

ticket-resolution Скилл ведёт тикеты HubSpot из терминала: создаёт, сортирует по приоритету, двигает по стадиям и закрывает с записью решения. CX Codex +1 2 000установок workflow-automation Скилл учит агента управлять автоматизациями HubSpot через агентский CLI hubspot. Помогает создавать, читать, обновлять и удалять сценарии v4 flows API прямо из терминала. CX Codex +1 1 800установок crm-data-quality Скилл для работы с записями HubSpot: находит незаполненные поля, приводит значения к одному виду, сливает дубликаты и проверяет свойства. CX Codex +1 1 800установок bulk-operations Скилл задаёт базовые приёмы работы с CLI hubspot: пакетное чтение, пагинация, JSONL-конвейеры и безопасные массовые записи. CX Codex +1 1 800установок customer-retention Находит клиентов без контакта и с риском оттока через фильтры CRM HubSpot, затем создаёт задачи на дозвон пачкой. CX Codex +1 1 700установок team-ownership Разбирает, кому принадлежат контакты, сделки и тикеты в HubSpot, и переносит владение при уходе сотрудника. CX Codex +1 1 700установок communication-history Скилл вытаскивает из HubSpot звонки, письма, заметки, встречи и задачи по контакту, сделке или компании и собирает справку перед звонком. CX Codex +1 1 700установок custom-object-management Скилл для работы со схемами кастомных объектов HubSpot CRM: посмотреть, создать, обновить метаданные или удалить тип объекта через CLI. CX Codex +1 1 700установок

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

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