
Team Ownership
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-codeInstalls 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