Install
$ agentstack add skill-hubspot-agent-cli-skills-sales-reporting ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Source of truth
hubspot --help is authoritative. Build on bulk-operations/SKILL.md — JSONL shape, batch-read rules, and pagination live there. Reshape patterns: bulk-operations/resources/json-patterns.md. search/list cap at 100 rows per call; a result of exactly 100 is almost always truncated — paginate via bulk-operations/SKILL.md before aggregating.
Property and output shape notes
- All CRM property values come back as strings in JSONL — booleans included.
hs_is_closed_wonis returned as"true"/"false"(string);amountis a numeric string. Usetonumberfor arithmetic; compare booleans as strings (== "true") when filtering client-side. - In
--filterexpressions,hs_is_closed_won=trueandhs_is_closed!=truework — the API parses the value. --propertiesreturns the standard nested shape:{"id":"123","properties":{"amount":"5000","dealname":"..."}}. Reference fields as.properties.amountin jq.- Stage IDs in
dealstageare portal-specific. Map them withhubspot pipelines stages --type deals --pipeline. hubspot_owner_idis a numeric string. Resolve to a name withhubspot owners list(fields:id,firstName,lastName,email).
1. Daily briefing
Date windows differ between macOS and GNU date:
# macOS
TODAY=$(date +%Y-%m-%d); NEXT_7=$(date -v+7d +%Y-%m-%d); YESTERDAY=$(date -v-1d +%Y-%m-%d)
# Linux
TODAY=$(date +%Y-%m-%d); NEXT_7=$(date -d '7 days' +%Y-%m-%d); YESTERDAY=$(date -d '1 day ago' +%Y-%m-%d)
Deals closing in the next 7 days:
hubspot objects search --type deals \
--filter "closedate>$TODAY AND closedate$YESTERDAY AND hs_is_closed!=true" \
--properties dealname,amount,dealstage,hs_lastmodifieddate
Open-pipeline summary line:
hubspot objects search --type deals --filter "hs_is_closed!=true" --properties amount \
| jq -rs '{count: length, value: ([.[].properties.amount | select(. != null) | tonumber] | add // 0 | round)}
| "Open pipeline: \(.count) deals, $\(.value)"'
2. Pipeline snapshot
By stage — count and amount per dealstage:
hubspot objects search --type deals --filter "hs_is_closed!=true" \
--properties dealstage,amount \
| jq -rs '
group_by(.properties.dealstage)
| map({stage: .[0].properties.dealstage, count: length,
total: ([.[].properties.amount | select(. != null) | tonumber] | add // 0 | round)})
| sort_by(-.total) | .[] | "\(.stage)\tcount: \(.count)\tvalue: $\(.total)"' \
| column -t -s$'\t'
By owner:
hubspot objects search --type deals --filter "hs_is_closed!=true" \
--properties amount,hubspot_owner_id \
| jq -rs '
group_by(.properties.hubspot_owner_id)
| map({owner: .[0].properties.hubspot_owner_id, count: length,
total: ([.[].properties.amount | select(. != null) | tonumber] | add // 0 | round)})
| sort_by(-.total) | .[] | "owner \(.owner)\tdeals: \(.count)\tvalue: $\(.total)"' \
| column -t -s$'\t'
To label owner IDs with names, dump the owners file once and join:
hubspot owners list | jq -r '"\(.id)\t\(.firstName) \(.lastName) "' > /tmp/owners.tsv
3. Win/loss analysis
Filter on hs_is_closed_won=true for won; hs_is_closed=true AND hs_is_closed_won!=true for lost. Scope with `closedate>=YYYY-MM-DD AND closedate=2026-04-01 AND closedate=2026-04-01 AND closedate=2026-01-01" \ --properties hubspotownerid,hsisclosedwon,amount \ | jq -rs ' groupby(.properties.hubspotownerid) | map({owner: .[0].properties.hubspotownerid, total: length, won: ([.[] | select(.properties.hsisclosedwon == "true")] | length), wonvalue: ([.[] | select(.properties.hsisclosedwon == "true") | .properties.amount | select(. != null) | tonumber] | add // 0 | round)}) | map(. + {winrate: ((.won / .total * 100) | round)}) | sortby(-.wonvalue) | .[] | "owner \(.owner)\twon: \(.won)/\(.total)\trate: \(.winrate)%\twon: $\(.wonvalue)"' \ | column -t -s$'\t'
**Revenue by close month** (won deals):
```bash
hubspot objects search --type deals \
--filter "hs_is_closed_won=true AND closedate>=2026-01-01" \
--properties amount,closedate \
| jq -rs '
group_by(.properties.closedate[0:7])
| map({month: .[0].properties.closedate[0:7], count: length,
revenue: ([.[].properties.amount | select(. != null) | tonumber] | add // 0 | round)})
| sort_by(.month) | .[] | "\(.month)\tdeals: \(.count)\trevenue: $\(.revenue)"' \
| column -t -s$'\t'
Known limitations
hubspot pipelines stagesdoes not expose stage probability — won/lost stages can't be auto-identified from the stages list. Usehs_is_closed_wonon deals instead.- No team object — group by
hubspot_owner_idand resolve names fromhubspot owners listclient-side.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: HubSpot
- Source: HubSpot/agent-cli-skills
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.