Claude-skill-registry hubspot-master
Shared resource library for HubSpot integration skills. DO NOT load directly - provides common references (setup, API docs, error handling, authentication) and scripts used by hubspot-connect and individual HubSpot skills.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/hubspot-master" ~/.claude/skills/majiayu000-claude-skill-registry-hubspot-master && rm -rf "$T"
skills/data/hubspot-master/SKILL.mdHubSpot Master
This is NOT a user-facing skill. It's a shared resource library referenced by HubSpot integration skills.
Purpose
Provides shared resources to eliminate duplication across:
- Meta-skill for HubSpot CRM operationshubspot-connect
- List contactshubspot-list-contacts
- Create contacthubspot-create-contact
- Update contacthubspot-update-contact
- Search contactshubspot-search-contacts
- List companieshubspot-list-companies
- Create companyhubspot-create-company
- Search companieshubspot-search-companies
- List dealshubspot-list-deals
- Create dealhubspot-create-deal
- Update dealhubspot-update-deal
- Search dealshubspot-search-deals
- Get CRM associationshubspot-get-associations
- List email engagementshubspot-list-emails
- Log email engagementhubspot-log-email
- List call engagementshubspot-list-calls
- Log call engagementhubspot-log-call
- List noteshubspot-list-notes
- Create notehubspot-create-note
- List meetingshubspot-list-meetings
- Create meetinghubspot-create-meeting
Instead of loading this skill, users directly invoke the specific skill they need above.
Architecture: DRY Principle
Problem solved: HubSpot skills would have duplicated content (setup instructions, API docs, auth flow, error handling).
Solution: Extract shared content into
hubspot-master/references/ and hubspot-master/scripts/, then reference from each skill.
Result: Single source of truth, reduced context per skill.
Shared Resources
All HubSpot skills reference these resources (progressive disclosure).
references/
setup-guide.md - Complete setup wizard
- Creating Private App in HubSpot
- Configuring required scopes
- Getting access token
- Environment configuration
api-reference.md - HubSpot API patterns
- Base URL and authentication
- All CRM endpoints documented
- Request/response examples
- Common property names
error-handling.md - Troubleshooting
- Common errors and solutions
- HTTP error codes
- Validation error handling
- Rate limiting
authentication.md - Token management
- Private App setup
- Token format and usage
- Security best practices
scripts/
Authentication & Configuration
check_hubspot_config.py - Pre-flight validation
python check_hubspot_config.py [--json]
| Argument | Required | Default | Description |
|---|---|---|---|
| No | False | Output structured JSON for AI consumption |
Exit codes: 0=configured, 1=partial, 2=not configured
When to Use: Run this FIRST before any HubSpot operation. Use to validate access token is configured, diagnose authentication issues, or check if setup is needed.
setup_hubspot.py - Interactive setup wizard
python setup_hubspot.py
No arguments - runs interactively. Guides through Private App setup, tests connection, saves to
.env.
When to Use: Use when HubSpot integration needs initial setup, when check_hubspot_config.py returns exit code 2, or when user needs to reconfigure credentials.
CRM Operations - Contacts
list_contacts.py - List contacts (GET /crm/v3/objects/contacts)
python list_contacts.py [--limit N] [--properties PROPS] [--after CURSOR] [--json]
| Argument | Required | Default | Description |
|---|---|---|---|
| No | 10 | Number of results (max 100) |
| No | email,firstname,lastname | Comma-separated properties |
| No | - | Pagination cursor |
| No | False | Output as JSON |
When to Use: Use when user says "list contacts", "get contacts", "show contacts".
create_contact.py - Create contact (POST /crm/v3/objects/contacts)
python create_contact.py --email EMAIL [--firstname NAME] [--lastname NAME] [--phone PHONE] [--company COMPANY] [--json]
| Argument | Required | Default | Description |
|---|---|---|---|
| Yes | - | Contact email address |
| No | - | First name |
| No | - | Last name |
| No | - | Phone number |
| No | - | Company name |
| No | False | Output as JSON |
When to Use: Use when user says "create contact", "add contact", "new contact".
update_contact.py - Update contact (PATCH /crm/v3/objects/contacts/{id})
python update_contact.py --id CONTACT_ID [--email EMAIL] [--firstname NAME] [--lastname NAME] [--phone PHONE] [--json]
| Argument | Required | Default | Description |
|---|---|---|---|
| Yes | - | Contact ID to update |
| No | - | New email |
| No | - | New first name |
| No | - | New last name |
| No | - | New phone |
| No | False | Output as JSON |
When to Use: Use when user says "update contact", "edit contact", "modify contact".
search_contacts.py - Search contacts (POST /crm/v3/objects/contacts/search)
python search_contacts.py [--email EMAIL] [--name NAME] [--company COMPANY] [--limit N] [--json]
| Argument | Required | Default | Description |
|---|---|---|---|
| No | - | Search by email |
| No | - | Search by name (first or last) |
| No | - | Search by company |
| No | 10 | Max results |
| No | False | Output as JSON |
When to Use: Use when user says "search contacts", "find contact", "lookup contact".
CRM Operations - Companies
list_companies.py - List companies (GET /crm/v3/objects/companies)
python list_companies.py [--limit N] [--properties PROPS] [--after CURSOR] [--json]
When to Use: Use when user says "list companies", "get companies", "show companies".
create_company.py - Create company (POST /crm/v3/objects/companies)
python create_company.py --name NAME [--domain DOMAIN] [--industry INDUSTRY] [--json]
When to Use: Use when user says "create company", "add company", "new company".
search_companies.py - Search companies (POST /crm/v3/objects/companies/search)
python search_companies.py [--name NAME] [--domain DOMAIN] [--industry INDUSTRY] [--limit N] [--json]
When to Use: Use when user says "search companies", "find company", "lookup company".
CRM Operations - Deals
list_deals.py - List deals (GET /crm/v3/objects/deals)
python list_deals.py [--limit N] [--properties PROPS] [--after CURSOR] [--json]
When to Use: Use when user says "list deals", "get deals", "show deals", "show pipeline".
create_deal.py - Create deal (POST /crm/v3/objects/deals)
python create_deal.py --name NAME [--amount AMOUNT] [--stage STAGE] [--pipeline PIPELINE] [--json]
When to Use: Use when user says "create deal", "add deal", "new deal", "new opportunity".
update_deal.py - Update deal (PATCH /crm/v3/objects/deals/{id})
python update_deal.py --id DEAL_ID [--name NAME] [--amount AMOUNT] [--stage STAGE] [--json]
When to Use: Use when user says "update deal", "edit deal", "change deal stage".
search_deals.py - Search deals (POST /crm/v3/objects/deals/search)
python search_deals.py [--name NAME] [--stage STAGE] [--min-amount N] [--max-amount N] [--limit N] [--json]
When to Use: Use when user says "search deals", "find deal", "lookup deal".
Associations
get_associations.py - Get associations (GET /crm/v4/objects/{type}/{id}/associations/{toType})
python get_associations.py --object-type TYPE --object-id ID --to-type TO_TYPE [--json]
When to Use: Use when user says "get associations", "linked records", "related contacts".
Engagements
list_emails.py - List email engagements log_email.py - Log email engagement list_calls.py - List call engagements log_call.py - Log call engagement list_notes.py - List notes create_note.py - Create note list_meetings.py - List meetings create_meeting.py - Create meeting
Intelligent Error Detection Flow
When a HubSpot skill fails due to missing configuration, the AI should:
Step 1: Run Config Check with JSON Output
python 00-system/skills/hubspot/hubspot-master/scripts/check_hubspot_config.py --json
Step 2: Parse the ai_action
Field
ai_action| ai_action | What to Do |
|---|---|
| Config OK, continue with the original operation |
| Ask user: "I need your HubSpot access token. Create a Private App to get one." |
| Create file and ask user for credentials |
| Guide user to add scopes in HubSpot Private App settings |
| Token exists but connection failed - verify it's correct |
Step 3: Help User Fix Issues
If
ai_action is prompt_for_access_token:
- Tell user: "HubSpot integration needs setup. I need your Private App access token."
- Show them: "Create one in HubSpot: Settings → Integrations → Private Apps"
- Ask: "Paste your HubSpot access token here (starts with 'pat-'):"
- Once they provide it, write directly to
:.envHUBSPOT_ACCESS_TOKEN=pat-na1-their-token-here - Re-run config check to verify
Environment Variables
Required in
.env:
HUBSPOT_ACCESS_TOKEN=pat-na1-xxxxxxxxxxxxx
API Base URL
All API requests go to:
https://api.hubapi.com
Version: 1.0 Created: 2025-12-13 Status: Production Ready