Files
Magnus HedemarkGitHubfactory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
3256a87bcb feat(skill): add collaboration & business-app tool layer (Slack, Notion, email, CRM, payments) (#269)
Adds five top-level operational tool skills, one per named tool:

- slack: messages, channels, threads, search, files, and webhook signature
  verification (HMAC-SHA256) via a bounded, stdlib-only slack-cli.
- notion: pages, database queries, search, and guarded page updates via
  notion-cli.
- email: transactional email via Twilio SendGrid (send, deliverability
  bounces/spam reports, Signed Event Webhook verification with a
  self-contained ECDSA P-256 verifier) via email-cli.
- crm: HubSpot CRM records, contact search, and deal pipeline views with
  guarded stage updates via crm-cli.
- stripe: read-only-first balance, payment, and subscription queries with
  a guarded period-end subscription cancellation via stripe-cli.

Each skill ships an executable script (--json output, --limit bounded reads,
--dry-run/--yes mutation gate), a human README with the five required
sections, a schema-v1 evals/evals.json with six output-quality cases, a dated
source index + operations reference, and a deterministic unittest suite run
by check-artifacts. All five are indexed in the top-level README and the
generated catalogs were regenerated. Eval coverage rises from 78/139 to
83/144.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-08-03 20:19:26 -04:00
..

CRM — Operate HubSpot from the Terminal

Look up contacts, search records, and view deal pipeline stages from your terminal or agent — and apply confirmed stage changes — all against HubSpot's CRM API.

Why Install This Skill

CRM data is where the answers to "who is this person?" and "what is in the pipeline?" live, and agents have had no bounded way to reach it. This skill gives your agent a real read path into HubSpot (contact records, contact search, deal pipeline views, pipeline stage maps) and a safe write path: moving a deal between stages is a guarded mutation that requires a preview and an explicit confirmation, so the agent can answer sales questions without ever silently changing the pipeline.

It ships crm-cli, a small Python script that speaks the HubSpot CRM v3 API with no third-party dependencies. Reads are capped (--limit), output is clean JSON for the agent or readable text for you, and --help works with no token and no network. Records are summarized as the fields people actually ask about — name, email, company, amount, stage — instead of raw property maps.

What You Get

Directory Purpose
SKILL.md Agent-facing operating contract, mutation gates, and verification boundaries
references/ Dated source index and a HubSpot CRM operations reference (endpoints, object model, pagination, stage updates, errors)
scripts/crm-cli Bounded, stdlib-only CLI: contacts list/get/search, deals list/update-stage, pipelines list; --json, --limit, stage changes gated by --dry-run/--yes
tests/ 13 deterministic tests against a stub HubSpot API, covering the mutation gate and read-only contract
evals/evals.json Six output-quality evaluation cases for agent runs

Quick Start

# Help works with no token and no network
crm/scripts/crm-cli --help

# List contacts (capped)
HUBSPOT_TOKEN=pat_... crm/scripts/crm-cli --json --limit 20 contacts list

# Find a contact by name
HUBSPOT_TOKEN=pat_... crm/scripts/crm-cli --json contacts search --query "ada"

# View the deal pipeline (optionally filtered)
HUBSPOT_TOKEN=pat_... crm/scripts/crm-cli --json --limit 20 deals list
HUBSPOT_TOKEN=pat_... crm/scripts/crm-cli --json deals list --pipeline default --stage appointmentscheduled

# Resolve stage labels to IDs
HUBSPOT_TOKEN=pat_... crm/scripts/crm-cli --json pipelines list

# Move a deal only with a preview first, then explicit confirmation
HUBSPOT_TOKEN=pat_... crm/scripts/crm-cli deals update-stage --id 901 --stage closedwon --dry-run
HUBSPOT_TOKEN=pat_... crm/scripts/crm-cli deals update-stage --id 901 --stage closedwon --yes

Triggers

Load this skill for hubspot / crm operations: "who is this contact", searching contacts, what deals are in the pipeline, listing deals by stage, resolving pipeline stages, or moving a deal to a new stage with confirmation. Do not load it for building HubSpot apps or workflow automations, marketing automation, or other CRMs like Salesforce.

Requirements

  • Python 3.9+ for crm-cli (stdlib only; --help needs nothing else).
  • A HubSpot private app access token (HUBSPOT_TOKEN) with object scopes: crm.objects.contacts.read and crm.objects.deals.read for reads, plus crm.objects.deals.write for stage updates.
  • Network access to api.hubapi.com for live reads and updates.