Skip to main content
skill CX Codex

crm-lookup — Claude Code skill: what it does, how to install

Finds contacts, companies, and deals in HubSpot CRM using the official CLI by email, domain, or ID, and retrieves associated records.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add HubSpot/agent-cli-skills --skill crm-lookup -a claude-code
Open on GitHub

What crm-lookup does

This skill provides instructions for querying HubSpot CRM directly through the hubspot command-line tool. It covers exact matches for email and domain, batch ID lookups for up to 100 items, and token searches on names using the ~ operator. Client-side substring filtering relies on piping JSON output to jq.

For account mapping, the skill chains hubspot associations list into batch hubspot objects get calls instead of spawning separate processes per ID. Without the hubspot CLI installed and authenticated, the assistant cannot execute any lookups. All instructions in this skill are strictly read-only.

What it helps with

  • locate HubSpot contacts by exact email address
  • retrieve company records by web domain
  • pull all deals associated with a specific contact ID
  • batch fetch up to 100 CRM records in a single CLI call

Example prompts for the agent

  • Find the contact record for [email protected] in HubSpot and show their lifecycle stage.
  • List all open deals associated with company domain acme.com.
  • Look up contact ID 12345 and pull their associated company details.

How to install crm-lookup

1Skills CLI (Vercel)

npx skills add HubSpot/agent-cli-skills --skill crm-lookup -a claude-code

2Manually: put the files in place

~/.claude/skills/crm-lookup/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/crm-lookup/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about crm-lookup

How do I install crm-lookup in Claude Code?

Run npx skills add HubSpot/agent-cli-skills --skill crm-lookup -a claude-code in your terminal.

What does crm-lookup do?

It guides the assistant to search and retrieve contacts, companies, deals, and tickets using the hubspot CLI and follow object associations.

Does crm-lookup support modifying or deleting CRM data?

No, this skill is strictly read-only. Any write actions must follow the confirmation and dry-run procedures outlined in the companion bulk operations skill.

Source text

SKILL.md · Apache-2.0
---
name: crm-lookup
description: Find a specific CRM record by ID, email, domain, or name fragment, and traverse associations for the full account picture.
triggers:
  - "find contact"
  - "find contact by email"
  - "find company by domain"
  - "look up deal"
  - "contacts at this company"
  - "deals for this contact"
  - "find record"
---

## Source of truth

`hubspot <command> --help` is authoritative. Read [`bulk-operations/SKILL.md`](../bulk-operations/SKILL.md) first — it owns JSONL piping, pagination, batch-get-via-stdin, and the safety flow for any write that comes after a lookup. This skill is read-only.

## Pick properties from the live schema

Schemas drift. Run `hubspot properties list --type <type>` for the live set. First-pass `--properties` for a brief:

| Object | `--properties` |
|---|---|
| contacts | `email,firstname,lastname,company,phone,lifecyclestage,hubspot_owner_id` |
| companies | `name,domain,industry,annualrevenue,numberofemployees,hubspot_owner_id` |
| deals | `dealname,amount,dealstage,closedate,hubspot_owner_id,hs_is_closed_won` |
| tickets | `subject,hs_pipeline_stage,hs_ticket_priority,hubspot_owner_id` |

Contact ad/campaign attribution lives on `hs_analytics_*` (e.g. `hs_analytics_source`, `hs_analytics_source_data_1`/`_2`, `hs_analytics_first_touch_converting_campaign`, `hs_analytics_last_touch_converting_campaign`). Full list: `hubspot properties list --type contacts | grep hs_analytics_`.

## 1. Lookup by ID

Up to ~100 IDs in a single batch call:

```bash
hubspot objects get --type contacts 12345 67890 23456 --properties email,firstname,lastname,company,phone,lifecyclestage
```

## 2. Find one by email / domain (exact match)

`email`/`domain` are exact-match — normalize to lowercase. Multiple `--filter` flags are OR'd.

```bash
hubspot objects search --type contacts --filter "[email protected]" \
  --properties email,firstname,lastname,company,lifecyclestage,hubspot_owner_id

hubspot objects search --type companies --filter "domain=acme.com" \
  --properties name,domain,industry,annualrevenue,hubspot_owner_id

# OR — multiple emails in one call
hubspot objects search --type contacts \
  --filter "[email protected]" --filter "[email protected]" --properties email,firstname
```

## 3. Find by partial name (token + client-side narrowing)

`~` is CONTAINS_TOKEN — matches whole space-separated words. `dealname~acme` finds "Acme Renewal" but **not** "AcmeCorp". For substring, pipe to `jq`. There's no full-text search across all fields — pick the property.

```bash
hubspot objects search --type deals --filter "dealname~acme" --properties dealname,amount,dealstage \
| jq -c 'select(.properties.dealname | ascii_downcase | contains("acme corp"))'
```

## 4. Find all associated records (two CLI calls, not xargs)

Pattern: `associations list` → `jq -c '{id}'` → `objects get` batch. **Never** `xargs -I{} hubspot objects get …` — that spawns one process per record. Use **plural** in `--from` (`contacts:12345`), exactly as `--help` shows.

```bash
# All contacts at a company
hubspot associations list --from companies:67890 --to contacts \
| jq -c '{id}' \
| hubspot objects get --type contacts --properties email,firstname,lastname,jobtitle

# Open deals for a contact (filter client-side; "open" varies by pipeline)
hubspot associations list --from contacts:12345 --to deals | jq -c '{id}' \
| hubspot objects get --type deals --properties dealname,amount,dealstage,hs_is_closed \
| jq -c 'select(.properties.hs_is_closed != "true")'
```

## 5. Get a record plus its associations

```bash
contact_id=12345
hubspot objects get --type contacts $contact_id --properties email,firstname,lastname,company,lifecyclestage

# Associated company (usually one)
hubspot associations list --from contacts:$contact_id --to companies | jq -c '{id}' | head -1 \
| hubspot objects get --type companies --properties name,domain,industry,annualrevenue

# Associated deals
hubspot associations list --from contacts:$contact_id --to deals | jq -c '{id}' \
| hubspot objects get --type deals --properties dealname,amount,dealstage,closedate
```

## Constraints

- Search returns ≤100 per page. For more, use the pagination loop in `bulk-operations/SKILL.md`.
- `~` is token-based; substring filtering happens in `jq` after the search.
- If the lookup feeds a write (update, delete, merge), follow the `--dry-run` → digest → `--confirm` flow in `bulk-operations/SKILL.md`.

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

Similar skills

All skills for Automation and no-code: n8n, Zapier, Make →

From the same set15

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor