You need this when reps leave, territories shift, or you're auditing who owns what across your HubSpot portal. It resolves owner emails to IDs, searches contacts, companies, deals, and tickets by hubspot_owner_id, then pipes results through jq into bulk updates with the same dry-run and digest safety rails as bulk-operations. The rep-leaves workflow is particularly solid: loop over all four object types, preview the moves, then execute with full rollback visibility via history. No hardcoded IDs, no manual CSV exports. Team rollups are client-side grouping since HubSpot has no teams object, but the jq pattern for aggregating by owner and joining to emails is clean enough to adapt for reporting.

skills.sh installs
1.8K
GitHub stars
29
last updated
Aug 21, 2026

Install

$ npx -y skills add hubspot/agent-cli-skills --skill team-ownership --agent claude-code

Installs into .claude/skills of the current project.

Files

Prereq: read bulk-operations/SKILL.md first. JSONL piping, pagination, dry-run/digest/confirm, and hubspot history recovery live there. Reshape patterns live in bulk-operations/resources/json-patterns.md.

hubspot_owner_id is a string field on contacts, companies, deals, and tickets. Owners are CRM users — hubspot owners list returns them; there is no teams object, so team-level views are client-side groupings by hubspot_owner_id.

1. Resolve email → owner ID

Never hardcode IDs — they are portal-specific. Resolve, then cache:

FROM_ID=$(hubspot owners list | jq -r 'select(.email=="sarah@company.com") | .id')
TO_ID=$(hubspot owners list | jq -r 'select(.email=="mike@company.com")  | .id')

2. Find records for an owner

Same filter across all four object types. Add object-specific --properties for context. Unowned records use the !property form.

Sponsors

Details

Repository
github.com/hubspot/agent-cli-skills
Categories
AI & Agent Building, Rust, Sales & Marketing, CLI & Terminal
First seen
Jul 14, 2026

More from hubspot/agent-cli-skills

All 15
1hubspot avataraudience-targetinghubspot/agent-cli-skillsBuild a targeted contact segment by filtering on lifecycle, engagement, jobtitle, geography, or firmographics — then export it as JSONL for a campaign or downst1.8Kskills.sh installs
2k-dense-ai avatarxlsxk-dense-ai/scientific-agent-skillsCreate, edit, analyze, or convert Excel spreadsheets (.xlsx, .xlsm, .xltx) where the workbook file is the primary deliverable. Use for formulas, formatting, fin1.8Kskills.sh installs
3github avataroo-component-documentationgithub/awesome-copilotCreate or update standardized object-oriented component documentation using a shared template plus mode-specific guidance for new and existing docs.1.8Kskills.sh installs
4hubspot avatarquote-to-cashhubspot/agent-cli-skillsBuild the product catalog, assemble quotes (line items + associations to deals), and track invoices and subscriptions through to revenue.1.8Kskills.sh installs
5github avatarplanning-oracle-to-postgres-migration-integration-testinggithub/awesome-copilotCreates an integration testing plan for .NET data access artifacts during Oracle-to-PostgreSQL database migrations. Analyzes a single project to identify reposi1.8Kskills.sh installs
6shubhamsaboo avatarcontent-writershubhamsaboo/awesome-llm-appsWrites marketing copy for landing pages, emails, and social media posts. Use when creating promotional content, sales copy, or brand messaging.1.8Kskills.sh installs