custom-object-management — Claude Code skill: HubSpot object schemas
A skill for managing custom CRM object schemas in HubSpot: list, create, update metadata or delete an object type from the CLI.
npx skills add HubSpot/agent-cli-skills --skill custom-object-management -a claude-codeWhat custom-object-management does
This skill handles custom object schemas in HubSpot CRM. It builds on hubspot schemas and its subcommands: list, get, create, update and delete. The first four run under OAuth login or a service key, while delete is service-key-only, so HUBSPOT_ACCESS_TOKEN has to be set.
Read bulk-operations/SKILL.md first. Every command here follows its JSONL conventions, and schema deletion uses the same dry-run, digest and confirm flow. Creating a schema starts from a JSON body: name, labels, primaryDisplayProperty, requiredProperties, properties and associated objects. Pipe it in or pass --file, and --dry-run previews the result before anything is applied.
Deletion is irreversible — it removes the schema and every record of that type. Run --dry-run first, then re-run with --digest <hash> --confirm <name> within 5 minutes. That is a good reason to double-check you are deleting the right schema. Once a schema exists, its name works as --type for the rest of the hubspot objects commands, so record CRUD, search and associations behave like they do on standard objects.
What it helps with
- see which custom objects already exist in the CRM
- define a new object type with its properties
- rename schema labels without touching properties
- delete a schema along with all its records
- confirm that
--typeresolves to the right object
Example prompts for the agent
- list the custom objects in HubSpot
- create the equipment schema from equipment-schema.json
- delete the pets schema using the three-step flow
How to install custom-object-management
1Skills CLI (Vercel)
npx skills add HubSpot/agent-cli-skills --skill custom-object-management -a claude-code2Manually: put the files in place
~/.claude/skills/custom-object-management/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/custom-object-management/
1Skills CLI (Vercel)
npx skills add HubSpot/agent-cli-skills --skill custom-object-management -a codex2Manually: put the files in place
.agents/skills/custom-object-management/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add HubSpot/agent-cli-skills --skill custom-object-management -a cursor2Manually: put the files in place
.cursor/skills/custom-object-management/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install HubSpot/agent-cli-skills custom-object-management2Manually: put the files in place
.github/skills/custom-object-management/SKILL.md1Skills CLI (Vercel)
npx skills add HubSpot/agent-cli-skills --skill custom-object-management -a gemini-cli2Platform CLI
gemini skills install https://github.com/HubSpot/agent-cli-skills --path custom-object-managementManually: put the files in place
.devin/skills/custom-object-management/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add HubSpot/agent-cli-skills --skill custom-object-management -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about custom-object-management
How do I install custom-object-management in Claude?
Run npx skills add HubSpot/agent-cli-skills --skill custom-object-management -a claude-code. The skill lands in ~/.claude/skills/custom-object-management/SKILL.md.
What does custom-object-management do?
It gives the agent commands for HubSpot CRM custom object schemas: list, inspect, create, patch metadata and delete. Everything goes through hubspot schemas.
What do I need to delete a schema?
A service key in HUBSPOT_ACCESS_TOKEN, since schemas delete is service-key-only. Start with --dry-run, then re-run with --digest <hash> --confirm <name> within 5 minutes.
Source text
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