custom-object-management — скилл для Claude Code: схемы объектов
Скилл для работы со схемами кастомных объектов HubSpot CRM: посмотреть, создать, обновить метаданные или удалить тип объекта через CLI.
npx skills add HubSpot/agent-cli-skills --skill custom-object-management -a claude-codeЧто делает custom-object-management
Скилл закрывает работу со схемами кастомных объектов в HubSpot CRM. Он опирается на hubspot schemas и его подкоманды: list, get, create, update и delete. Первые четыре работают под OAuth-логином или сервисным ключом, а delete — только с сервисным ключом, поэтому нужен HUBSPOT_ACCESS_TOKEN.
Перед началом стоит прочитать bulk-operations/SKILL.md: все команды используют его конвенции JSONL, а удаление схемы идёт через его же поток dry-run, digest и confirm. Создание схемы начинается с JSON-тела — имя, метки, primaryDisplayProperty, requiredProperties, свойства и связанные объекты. Тело передаётся через пайп или --file, а --dry-run показывает результат до применения.
Удаление необратимо: оно сносит схему вместе со всеми записями этого типа. Сначала --dry-run, потом повторный запуск с --digest <hash> --confirm <name> в течение 5 минут. Это повод проверить, что вы удаляете именно ту схему. После создания схемы её name подходит как --type для остальных команд hubspot objects — CRUD записей, поиск и связи работают так же, как у стандартных объектов.
Какие задачи решает
- посмотреть, какие кастомные объекты уже есть в CRM
- создать новый тип объекта с нужными свойствами
- переименовать метки схемы, не трогая свойства
- удалить схему вместе со всеми её записями
- проверить, что
--typeрезолвится в нужный объект
Примеры запросов агенту
- покажи список кастомных объектов в HubSpot
- создай схему объекта equipment из equipment-schema.json
- удали схему pets по трёхшаговому потоку
Как установить custom-object-management
1Через Skills CLI (Vercel)
npx skills add HubSpot/agent-cli-skills --skill custom-object-management -a claude-code2Вручную: положить файлы
~/.claude/skills/custom-object-management/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/custom-object-management/
1Через Skills CLI (Vercel)
npx skills add HubSpot/agent-cli-skills --skill custom-object-management -a codex2Вручную: положить файлы
.agents/skills/custom-object-management/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add HubSpot/agent-cli-skills --skill custom-object-management -a cursor2Вручную: положить файлы
.cursor/skills/custom-object-management/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install HubSpot/agent-cli-skills custom-object-management2Вручную: положить файлы
.github/skills/custom-object-management/SKILL.md1Через Skills CLI (Vercel)
npx skills add HubSpot/agent-cli-skills --skill custom-object-management -a gemini-cli2Командой платформы
gemini skills install https://github.com/HubSpot/agent-cli-skills --path custom-object-managementВручную: положить файлы
.devin/skills/custom-object-management/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add HubSpot/agent-cli-skills --skill custom-object-management -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о custom-object-management
Как установить custom-object-management в Claude?
Выполните npx skills add HubSpot/agent-cli-skills --skill custom-object-management -a claude-code. Скилл окажется в ~/.claude/skills/custom-object-management/SKILL.md.
Что делает custom-object-management?
Даёт агенту команды для схем кастомных объектов HubSpot CRM: список, просмотр, создание, правка метаданных и удаление. Работает через hubspot schemas.
Что нужно для удаления схемы?
Сервисный ключ в HUBSPOT_ACCESS_TOKEN — schemas delete доступен только с ним. Сначала запускается --dry-run, затем повтор с --digest <hash> --confirm <name> в течение 5 минут.
Исходный текст
SKILL.md · Apache-2.0
---
name: custom-object-management
description: Discover, create, update, and delete custom CRM object schemas. Use when defining a new object type, inspecting existing schemas, or removing one. Record CRUD on custom objects is identical to standard objects — see `bulk-operations`.
triggers:
- "create custom object"
- "custom object schema"
- "define new object type"
- "list object schemas"
- "delete custom object"
- "update schema labels"
- "what custom objects exist"
---
## Source of truth
`hubspot schemas --help` is authoritative. Subcommands: `list`, `get`, `create`, `update` (metadata only), `delete` (destructive). `schemas list`/`get`/`create`/`update` work under OAuth login or a service key; `schemas delete` is service-key-only (`AppTokenOnly`) — set `HUBSPOT_ACCESS_TOKEN`. Read `bulk-operations/SKILL.md` first — every command here uses its JSONL conventions, and `schemas delete` uses its dry-run / digest / confirm flow.
## Discover existing schemas
```bash
hubspot schemas list # JSONL: name, label, singular, objectTypeId, source
hubspot schemas list | jq 'select(.source=="custom")' # custom only
hubspot objects types | jq -c 'select(.source=="custom")' # same set, also shown to confirm `--type` resolves
```
`name` is what every other command takes. `objectTypeId` (e.g. `2-12345678`) is only needed for workflow `PLATFORM_FLOW` targets.
## Inspect one schema
```bash
hubspot schemas get --type pets
```
Returns the full definition — properties, associations, labels, `requiredProperties`, `primaryDisplayProperty`, `fullyQualifiedName`. Reshape with `jq` as needed (see `bulk-operations/resources/json-patterns.md`).
## Create a schema
Build a JSON body and pipe it (or pass `--file`). Minimal valid body:
```json
{
"name": "equipment",
"labels": {"singular": "Equipment", "plural": "Equipment"},
"primaryDisplayProperty": "equipment_name",
"requiredProperties": ["equipment_name"],
"properties": [
{"name": "equipment_name", "label": "Name", "type": "string", "fieldType": "text"}
],
"associatedObjects": ["contacts"]
}
```
```bash
cat equipment-schema.json | hubspot schemas create --dry-run # preview
hubspot schemas create --file equipment-schema.json # execute
```
Add more properties later with `hubspot properties create --type <name> ...`.
## Update schema metadata
`update` patches labels / description only. Property edits go through `hubspot properties`.
```bash
echo '{"labels":{"singular":"Device","plural":"Devices"}}' | hubspot schemas update --type equipment
```
`update` also supports `--dry-run` → digest → re-run with `--digest --confirm <name>` (see `bulk-operations/SKILL.md` for the pattern).
## Delete a schema (destructive)
Schema delete is destructive and irreversible — it permanently removes the schema **and every record of that type**. It is gated as `MetadataDestroy`: every delete requires `--dry-run` first, then re-run with `--digest <hash> --confirm <name>` within 5 minutes.
Follow the three-step flow documented in `bulk-operations/SKILL.md` ("Safe destructive workflow"). For schemas, the confirm value is the schema name:
```bash
hubspot schemas delete --type equipment --dry-run
# → digest=blast-... ; apply_command_hint shows: --digest <hash> --confirm 'equipment'
hubspot schemas delete --type equipment --digest <hash> --confirm equipment
```
Check `hubspot history --since 24h --kind MetadataDestroy` to audit recent schema deletes.
## Using the schema after creation
Once a schema exists, all `hubspot objects ...` commands accept its `name` as `--type` (e.g. `--type pets`). Record CRUD, search, association, bulk upsert — all identical to standard objects. Don't re-implement those flows here; see `bulk-operations/SKILL.md` and `crm-lookup`.
© HubSpot · Apache-2.0 · HubSpot/agent-cli-skills