HubSpot Developer Skill
Purpose
Use this skill to design, implement, or review HubSpot developer platform apps and UI extensions. Prefer the project-based developer platform over legacy private/public apps unless the user only needs a simple REST token or explicitly maintains legacy code.
Platform apps are file-defined, CLI-managed projects: configuration, assets, and source live in the repo; hs project dev / hs project upload drive local and deployed behavior. UI extensions are React or TypeScript bundles registered by *-hsmeta.json and rendered inside HubSpot’s sandboxed runtime (web worker constraints; use HubSpot APIs and components, not the full browser surface) via hubspot.extend().
Official documentation (start here)
HubSpot’s docs move quickly. Prefer current pages over memory or old blog posts. For a wider link set grouped by topic, use references/official-doc-map.md.
Documentation index: HubSpot publishes a machine-oriented index at https://developers.hubspot.com/docs/llms.txt for discovering pages; if that endpoint is blocked or returns a login wall, use the table above, references/official-doc-map.md, and “See also” links in the docs.
Examples repo: https://github.com/HubSpot/ui-extensions-examples (includes legacy card converter).
Distribution, authentication, and features
From the developer platform overview, what you can ship depends on distribution and authentication (static token vs OAuth; private vs Marketplace). Use the official docs for the live matrix; at a high level:
- API calls, agent tools, app cards, app pages, app settings, custom workflow actions, telemetry, and webhooks v3 are broadly available across common private app setups; webhooks v4, app events, and app objects lean toward OAuth / Marketplace-style distribution in the documented matrix.
- Serverless functions and SCIM are documented with tighter pairing to static-token / private patterns in that matrix—verify before promising architecture.
- Public functions for CMS follow the CMS serverless path (see CMS docs), not the same shape as app project serverless functions.
When choosing features, read app configuration and the overview table together so you do not design OAuth-only features (e.g. certain webhook or app-object flows) for a static-token-only app.
First decision (task routing)
- Only scripted API access for internal automation: a legacy private app token may suffice; still mention developer platform for anything that might grow UI or Marketplace.
- In-portal UI, cards, app home, settings, OAuth, Marketplace: use a developer platform project.
- Context beside a record, ticket, preview, or supported sidebar: app card (UI extension).
- Dashboard / multi-step / full-width app experience: app pages.
- In-app configuration (API keys, mapping, toggles): settings page UI extension.
- External HTTP from the extension:
hubspot.fetch() only with allowed URLs, size/time limits, and security docs understood first.
Hard limits to internalize (see UI extensions overview and references/ui-extensions-runtime.md): default 15s fetch timeout (up to 120s), 1 MB request/response bodies, 20 concurrent fetches per account, no custom headers except Authorization, no native fetch in extension code (lint enforces this).
UI extension components (@hubspot/ui-extensions)
Follow the UI extension components overview.
Package version
Install or upgrade the SDK in the extension directory that owns the card, settings, or page bundle (often under src/app/cards, settings, or pages—match your repo):
npm i @hubspot/ui-extensions@latest
Two import surfaces
- Standard components (layout, forms, text, charts, modals, etc.): from
@hubspot/ui-extensions. They do not fetch CRM data by themselves; you compose them with hooks, props, or hubspot.fetch().
- CRM data and CRM action components: from
@hubspot/ui-extensions/crm.
import { Alert, Text, Flex, Button } from "@hubspot/ui-extensions";
import { CrmAssociationPivot, CrmActionLink } from "@hubspot/ui-extensions/crm";
CRM-specific behavior
- CRM data components load from the current CRM record context. Official docs state they are restricted to the middle column of CRM records—do not plan sidebar-only layouts for them without verifying current placement rules.
- CRM action components (e.g. action button, link, card actions) expose the same underlying CRM actions through different UI shapes—pick by UX, not by capability difference.
For layout, use Flex, Box, Inline, Spacer, AutoGrid, etc., per manage UI extension layout. Prefer HubSpot primitives over ad hoc HTML/CSS that fights the sandbox.
Design reference: Figma design kit (linked from the components overview).
Core app workflow
- Clarify audience, account type, and Marketplace vs private.
- Read platform version from
app-hsmeta.json / project docs (e.g. 2025.2, 2026.03—never assume from memory).
- Scaffold with HubSpot CLI (
hs project create, hs project add); treat generated layout as the default.
- Keep
app-hsmeta.json and each extension’s *-hsmeta.json as the source of truth for UIDs, types, location, entrypoint, objectTypes, and display metadata.
- Implement UI in React/TSX; register with
hubspot.extend() in the entrypoint.
- Prefer CRM hooks and CRM components for HubSpot-hosted CRM data; use
hubspot.fetch() only for allowed external URLs.
- Develop with
hs project dev; upload with hs project upload when validating deployed behavior.
- Use extension logs, render logs, and fetch logs before calling work “done.”
- For Marketplace, add a review pass: scopes, sensitive data, errors, install/uninstall, empty states, and security.
Modern UI extension anatomy
*-hsmeta.json: extension type, HubSpot location, display metadata, objectTypes (for CRM surfaces), entrypoint path.
- Entrypoint:
hubspot.extend(({ context, actions }) => …) (see current samples for exact typing imports your project uses).
- React tree: standard + CRM components; loading / empty / error / permission states.
- Optional
hubspot.fetch() to partner backends; optional serverless functions where docs allow for your auth model.
App-function *-hsmeta.json (serverless) and hs project upload
app-function components use "type": "app-function" and config.entrypoint (see serverless reference). hs project validate / hs project upload may fail if HTTP-oriented functions omit config.endpoint.
Common validation errors (real CLI output):
Missing required field: 'config.endpoint' — add an endpoint object under config for functions that receive inbound HTTP (for example OAuth callback routes).
Missing required field: 'config.endpoint.methods' plus additionalProperty: method — the schema expects methods (array of verbs, e.g. ["GET"], ["POST"]), not a singular method field. Remove method and use methods instead.
Always run hs project validate after editing function metadata; if the validator disagrees with an older doc example, follow the validator for your installed hs --version. Details and examples: references/serverless-app-function-hsmeta.md.
File layout rules
CLI templates evolve. After hs project add, mirror the generated paths instead of inventing filenames. Commonly you will see extension code under paths such as src/app/cards/ with a shared package.json per feature area; confirm on disk before advising moves or imports.
Do not conflate legacy CRM cards (iframe / external patterns) with modern UI extension app cards; migrations should be called out explicitly in plans and commits.
Security and sensitive data
- Request the smallest scope set that satisfies the workflow.
- Sensitive Data scopes carry extra restrictions (e.g. interactions with
hubspot.fetch() and serverless functions). Treat docs as law: if the app needs both sensitive CRM surfaces and external calls, you may need product splits or a different flow—validate in current HubSpot documentation before implementation.
Required agent behavior
- Read the repo first:
src/app/app-hsmeta.json, extension metadata, package.json, lockfile, and CLI version.
- Classify legacy vs developer platform and static vs OAuth.
- Smallest coherent change; keep generated structure unless there is a documented reason to diverge.
- Verify APIs against official pages (links in this file) when outputting config shapes, component names, or limits.
- Report what was changed, commands run, scopes, manual HubSpot test steps, and doc assumptions.
Bundled reference files
Use these for deeper patterns without duplicating them entirely in chat:
references/official-doc-map.md — curated doc index by topic (platform, UI, serverless, APIs, legacy).
references/ui-extensions-runtime.md — sandbox, hubspot.fetch() limits, location values, Sensitive Data, CRM data placement.
references/ui-extensions-sdk-primer.md — context / actions, hooks vs props, overlays, iframe modal, clipboard, logging.
references/app-cards-metadata.md — card *-hsmeta.json fields, objectTypes + scopes, sidebar vs CRM data components, help desk.
references/serverless-and-enterprise.md — 2026.03 serverless, Enterprise install, dev test accounts, vs CMS serverless.
references/serverless-app-function-hsmeta.md — config.endpoint, methods vs method, hs project validate / upload failures.
references/testing-and-linting.md — createRenderer, @hubspot/ui-extensions/testing, @hubspot/eslint-config-ui-extensions, monitoring.
references/marketplace-and-gated-features.md — matrix reminders, app objects approval, webhooks v3/v4, listing readiness.
references/hubspot-modern-platform.md — platform concepts, CLI commands, migration outline.
references/ui-extension-design.md — extension-point choice, UX, data loading, sensitive data.
references/implementation-checklist.md — before coding, review, testing, debugging.
references/examples.md — minimal shapes and prompt recipes for agents.
1---2name: hubspot-developer-skill3description: use this skill when building, reviewing, migrating, or planning hubspot developer platform apps (cli projects, app-hsmeta.json), ui extensions (app cards, app pages, settings), @hubspot/ui-extensions components, crm hooks and crm data/action components, hubspot.fetch and serverless app-function hsmeta (config.endpoint, endpoint.methods array), hs project validate upload errors, oauth vs static token distribution, webhooks, custom workflow actions, agent tools, app events/objects, scopes and sensitive data, or marketplace readiness. use for coding agents that need architecture, extension-point choice, file layout, component selection, security constraints, checklists, and testing guidance.4---56# HubSpot Developer Skill78## Purpose910Use this skill to design, implement, or review [HubSpot developer platform](https://developers.hubspot.com/docs/apps/developer-platform/overview) apps and UI extensions. Prefer the **project-based developer platform** over legacy private/public apps unless the user only needs a simple REST token or explicitly maintains legacy code.1112Platform apps are **file-defined**, **CLI-managed** projects: configuration, assets, and source live in the repo; `hs project dev` / `hs project upload` drive local and deployed behavior. UI extensions are **React or TypeScript** bundles registered by `*-hsmeta.json` and rendered inside HubSpot’s **sandboxed** runtime (web worker constraints; use HubSpot APIs and components, not the full browser surface) via `hubspot.extend()`.1314## Official documentation (start here)1516HubSpot’s docs move quickly. Prefer **current** pages over memory or old blog posts. For a wider link set grouped by topic, use `references/official-doc-map.md`.1718| Topic | URL |19| --- | --- |20| Developer platform overview | https://developers.hubspot.com/docs/apps/developer-platform/overview |21| Create an app | https://developers.hubspot.com/docs/apps/developer-platform/build-apps/create-an-app |22| App configuration (`app-hsmeta.json`) | https://developers.hubspot.com/docs/apps/developer-platform/build-apps/app-configuration |23| Migrate an app | https://developers.hubspot.com/docs/apps/developer-platform/build-apps/migrate-an-app/overview |24| Migrate to latest platform version | https://developers.hubspot.com/docs/apps/developer-platform/build-apps/migrate-an-app/migrate-to-the-latest-platform-version |25| Quickstart | https://developers.hubspot.com/docs/getting-started/quickstart |26| HubSpot CLI | https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/install-the-cli |27| Config profiles (`context.variables`) | https://developers.hubspot.com/docs/developer-tooling/local-development/build-with-config-profiles |28| **UI extensions overview** (fetch limits, locations, workflow) | https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/overview |29| **UI extensions SDK** (context, actions, hooks, overlays) | https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/ui-extensions-sdk |30| Fetching data (permitted URLs, signing, proxy) | https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/fetching-data |31| Logging and monitoring | https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/logging-and-monitoring |32| Testing UI extensions | https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/tools/testing/overview |33| Linting UI extensions | https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/tools/linting/overview |34| **UI extension components (standard + CRM)** | https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/ui-components/overview |35| CRM data components | https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/ui-components/crm-data-components/overview |36| CRM action components | https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/ui-components/crm-action-components/overview |37| Manage UI extension layout | https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/ui-components/manage-ui-extension-layout |38| App cards overview | https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/extension-points/app-cards/overview |39| **App cards reference** (schema, scopes, locations) | https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/extension-points/app-cards/reference |40| App pages | https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/extension-points/app-pages/create-app-pages |41| App home page | https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/extension-points/create-an-app-home-page |42| Settings pages | https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/extension-points/create-a-settings-page |43| Serverless functions | https://developers.hubspot.com/docs/apps/developer-platform/add-features/serverless-functions/overview |44| Serverless reference | https://developers.hubspot.com/docs/apps/developer-platform/add-features/serverless-functions/reference |45| Agent tools | https://developers.hubspot.com/docs/apps/developer-platform/add-features/agent-tools/overview |46| App objects reference | https://developers.hubspot.com/docs/apps/developer-platform/add-features/app-objects/reference |47| Webhooks v3 | https://developers.hubspot.com/docs/api-reference/webhooks-webhooks-v3/guide |48| Webhooks v4 | https://developers.hubspot.com/docs/api-reference/webhooks-webhooks-v4/webhooks-journal |49| REST APIs | https://developers.hubspot.com/docs/api-reference/latest/overview |50| Sensitive data (properties) | https://developers.hubspot.com/docs/api-reference/latest/crm/properties/sensitive-data |51| Legacy private apps | https://developers.hubspot.com/docs/apps/legacy-apps/private-apps/overview |52| Legacy public apps | https://developers.hubspot.com/docs/apps/legacy-apps/public-apps/overview |5354**Documentation index:** HubSpot publishes a machine-oriented index at `https://developers.hubspot.com/docs/llms.txt` for discovering pages; if that endpoint is blocked or returns a login wall, use the table above, `references/official-doc-map.md`, and “See also” links in the docs.5556**Examples repo:** https://github.com/HubSpot/ui-extensions-examples (includes [legacy card converter](https://github.com/HubSpot/ui-extensions-examples/tree/main/legacy-card-converter)).5758## Distribution, authentication, and features5960From the [developer platform overview](https://developers.hubspot.com/docs/apps/developer-platform/overview), **what you can ship depends on** [distribution](https://developers.hubspot.com/docs/apps/developer-platform/build-apps/app-configuration#distribution) and [authentication](https://developers.hubspot.com/docs/apps/developer-platform/build-apps/app-configuration#authentication) (static token vs OAuth; private vs Marketplace). Use the official docs for the live matrix; at a high level:6162- **API calls**, **agent tools**, **app cards**, **app pages**, **app settings**, **custom workflow actions**, **telemetry**, and **webhooks v3** are broadly available across common private app setups; **webhooks v4**, **app events**, and **app objects** lean toward OAuth / Marketplace-style distribution in the documented matrix.63- **Serverless functions** and **SCIM** are documented with tighter pairing to static-token / private patterns in that matrix—verify before promising architecture.64- **Public functions for CMS** follow the CMS serverless path (see CMS docs), not the same shape as app project serverless functions.6566When choosing features, read **app configuration** and the overview table together so you do not design OAuth-only features (e.g. certain webhook or app-object flows) for a static-token-only app.6768## First decision (task routing)69701. **Only scripted API access** for internal automation: a [legacy private app](https://developers.hubspot.com/docs/apps/legacy-apps/private-apps/overview) token may suffice; still mention developer platform for anything that might grow UI or Marketplace.712. **In-portal UI, cards, app home, settings, OAuth, Marketplace**: use a **developer platform** project.723. **Context beside a record, ticket, preview, or supported sidebar**: **app card** (UI extension).734. **Dashboard / multi-step / full-width app experience**: **app pages**.745. **In-app configuration** (API keys, mapping, toggles): **settings page** UI extension.756. **External HTTP from the extension**: `hubspot.fetch()` only with allowed URLs, size/time limits, and security docs understood first.7677**Hard limits to internalize** (see [UI extensions overview](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/overview) and `references/ui-extensions-runtime.md`): default **15s** fetch timeout (up to **120s**), **1 MB** request/response bodies, **20** concurrent fetches per account, **no custom headers** except `Authorization`, **no native `fetch`** in extension code (lint enforces this).7879## UI extension components (`@hubspot/ui-extensions`)8081Follow the [UI extension components overview](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/ui-components/overview).8283### Package version8485Install or upgrade the SDK in the **extension directory** that owns the card, settings, or page bundle (often under `src/app/cards`, `settings`, or `pages`—match your repo):8687```bash88npm i @hubspot/ui-extensions@latest89```9091### Two import surfaces9293- **Standard components** (layout, forms, text, charts, modals, etc.): from `@hubspot/ui-extensions`. They do not fetch CRM data by themselves; you compose them with hooks, props, or `hubspot.fetch()`.94- **CRM data** and **CRM action** components: from `@hubspot/ui-extensions/crm`.9596```tsx97import { Alert, Text, Flex, Button } from "@hubspot/ui-extensions";98import { CrmAssociationPivot, CrmActionLink } from "@hubspot/ui-extensions/crm";99```100101### CRM-specific behavior102103- **CRM data components** load from the **current CRM record** context. Official docs state they are restricted to the **middle column** of CRM records—do not plan sidebar-only layouts for them without verifying current placement rules.104- **CRM action components** (e.g. action button, link, card actions) expose the same underlying CRM actions through different UI shapes—pick by UX, not by capability difference.105106For layout, use **Flex**, **Box**, **Inline**, **Spacer**, **AutoGrid**, etc., per [manage UI extension layout](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/ui-components/manage-ui-extension-layout). Prefer HubSpot primitives over ad hoc HTML/CSS that fights the sandbox.107108**Design reference:** [Figma design kit](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/ui-components/figma-design-kit) (linked from the components overview).109110## Core app workflow1111121. Clarify **audience**, **account type**, and **Marketplace vs private**.1132. Read **platform version** from `app-hsmeta.json` / project docs (e.g. `2025.2`, `2026.03`—never assume from memory).1143. Scaffold with **HubSpot CLI** (`hs project create`, `hs project add`); treat generated layout as the default.1154. Keep **`app-hsmeta.json`** and each extension’s **`*-hsmeta.json`** as the source of truth for UIDs, types, `location`, `entrypoint`, `objectTypes`, and display metadata.1165. Implement UI in **React/TSX**; register with **`hubspot.extend()`** in the entrypoint.1176. Prefer **CRM hooks and CRM components** for HubSpot-hosted CRM data; use **`hubspot.fetch()`** only for allowed external URLs.1187. Develop with **`hs project dev`**; upload with **`hs project upload`** when validating deployed behavior.1198. Use **extension logs**, **render logs**, and **fetch logs** before calling work “done.”1209. For Marketplace, add a **review pass**: scopes, sensitive data, errors, install/uninstall, empty states, and security.121122## Modern UI extension anatomy123124- **`*-hsmeta.json`**: extension type, HubSpot **location**, display metadata, **objectTypes** (for CRM surfaces), **entrypoint** path.125- **Entrypoint**: `hubspot.extend(({ context, actions }) => …)` (see current samples for exact typing imports your project uses).126- **React tree**: standard + CRM components; loading / empty / error / permission states.127- **Optional** `hubspot.fetch()` to partner backends; optional **serverless functions** where docs allow for your auth model.128129## App-function `*-hsmeta.json` (serverless) and `hs project upload`130131`app-function` components use **`"type": "app-function"`** and **`config.entrypoint`** (see [serverless reference](https://developers.hubspot.com/docs/apps/developer-platform/add-features/serverless-functions/reference)). **`hs project validate`** / **`hs project upload`** may fail if HTTP-oriented functions omit **`config.endpoint`**.132133**Common validation errors (real CLI output):**134135- **`Missing required field: 'config.endpoint'`** — add an `endpoint` object under `config` for functions that receive inbound HTTP (for example OAuth callback routes).136- **`Missing required field: 'config.endpoint.methods'`** plus **`additionalProperty: method`** — the schema expects **`methods`** (array of verbs, e.g. `["GET"]`, `["POST"]`), not a singular **`method`** field. Remove `method` and use `methods` instead.137138Always run **`hs project validate`** after editing function metadata; if the validator disagrees with an older doc example, follow the **validator** for your installed **`hs --version`**. Details and examples: `references/serverless-app-function-hsmeta.md`.139140## File layout rules141142CLI templates evolve. After `hs project add`, **mirror the generated paths** instead of inventing filenames. Commonly you will see extension code under paths such as `src/app/cards/` with a shared `package.json` per feature area; **confirm on disk** before advising moves or imports.143144Do not conflate **legacy CRM cards** (iframe / external patterns) with **modern UI extension app cards**; migrations should be called out explicitly in plans and commits.145146## Security and sensitive data147148- Request the **smallest** scope set that satisfies the workflow.149- **Sensitive Data** scopes carry extra restrictions (e.g. interactions with `hubspot.fetch()` and serverless functions). Treat docs as law: if the app needs both sensitive CRM surfaces and external calls, you may need **product splits** or a **different flow**—validate in current HubSpot documentation before implementation.150151## Required agent behavior1521531. **Read the repo first**: `src/app/app-hsmeta.json`, extension metadata, `package.json`, lockfile, and CLI version.1542. **Classify** legacy vs developer platform and static vs OAuth.1553. **Smallest coherent change**; keep generated structure unless there is a documented reason to diverge.1564. **Verify APIs** against official pages (links in this file) when outputting config shapes, component names, or limits.1575. **Report** what was changed, commands run, scopes, manual HubSpot test steps, and doc assumptions.158159## Bundled reference files160161Use these for deeper patterns without duplicating them entirely in chat:162163- `references/official-doc-map.md` — **curated doc index** by topic (platform, UI, serverless, APIs, legacy).164- `references/ui-extensions-runtime.md` — sandbox, **`hubspot.fetch()` limits**, `location` values, Sensitive Data, CRM data placement.165- `references/ui-extensions-sdk-primer.md` — **`context` / `actions`**, hooks vs props, overlays, iframe modal, clipboard, logging.166- `references/app-cards-metadata.md` — card **`*-hsmeta.json`** fields, **`objectTypes` + scopes**, sidebar vs CRM data components, help desk.167- `references/serverless-and-enterprise.md` — **2026.03** serverless, **Enterprise install**, dev test accounts, vs CMS serverless.168- `references/serverless-app-function-hsmeta.md` — **`config.endpoint`**, **`methods` vs `method`**, **`hs project validate`** / upload failures.169- `references/testing-and-linting.md` — **`createRenderer`**, `@hubspot/ui-extensions/testing`, **`@hubspot/eslint-config-ui-extensions`**, monitoring.170- `references/marketplace-and-gated-features.md` — matrix reminders, **app objects approval**, webhooks v3/v4, listing readiness.171- `references/hubspot-modern-platform.md` — platform concepts, CLI commands, migration outline.172- `references/ui-extension-design.md` — extension-point choice, UX, data loading, sensitive data.173- `references/implementation-checklist.md` — before coding, review, testing, debugging.174- `references/examples.md` — minimal shapes and **prompt recipes** for agents.