# Custom Object Management

> 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`.

- **Type:** Skill
- **Install:** `agentstack add skill-hubspot-agent-cli-skills-custom-object-management`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [HubSpot](https://agentstack.voostack.com/s/hubspot)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [HubSpot](https://github.com/HubSpot)
- **Source:** https://github.com/HubSpot/agent-cli-skills/tree/main/custom-object-management

## Install

```sh
agentstack add skill-hubspot-agent-cli-skills-custom-object-management
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## Source of truth

`hubspot schemas --help` is authoritative. Subcommands: `list`, `get`, `create`, `update` (metadata only), `delete` (destructive). Schema writes require a private app token with `crm.schemas.custom.write`. 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 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  ...`.

## Update schema metadata

`update` patches labels / description only. Property edits go through `hubspot properties`.

```bash
echo '{"labels":{"singular":"Device","plural":"Devices"}}' | hubspot schemas update equipment
```

`update` also supports `--dry-run` → digest → re-run with `--digest --confirm ` (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  --confirm ` 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 equipment --dry-run
# → digest=blast-... ; apply_command_hint shows: --digest  --confirm 'equipment'
hubspot schemas delete equipment --digest  --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`.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [HubSpot](https://github.com/HubSpot)
- **Source:** [HubSpot/agent-cli-skills](https://github.com/HubSpot/agent-cli-skills)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-hubspot-agent-cli-skills-custom-object-management
- Seller: https://agentstack.voostack.com/s/hubspot
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
