Skip to content
cccskills
FreePublished on GitHub

hubspot-hygiene

Maintain HubSpot customer records by merging duplicate contacts, filling missing information from Clearbit, and flagging inactive deals. Field-fill batches above a configured record threshold wait for human approval, and each run reports its changes and pending requests.

OriginalShow the original description

Nightly HubSpot CRM hygiene runbook for {{projectName}}. Finds and merges duplicate contacts, fills missing fields from enrichment data, flags stale deals, and gates any bulk field update over {{bulk_update_threshold}} records behind human approval.

Works withHubSpot

Run score Not tested

See how to install

Good for

  • Scheduled nightly CRM cleanup
  • Merging duplicate contact records
  • Filling missing job titles and company details
  • Identifying deals with no recent progress
  • Reviewing large field-fill batches before approval

Files included (1)

  • SKILL.md7.4 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

<skill name="hubspot-hygiene"> <overview> Keep HubSpot clean without a person babysitting it. A nightly cron spawns a fresh session with scoped access to HubSpot and Clearbit. Each run dedupes contacts, fills missing fields from enrichment data, flags deals that have gone quiet, and posts what it did. Individual field fills write directly; a bulk fill above the threshold stops for a human before it touches the CRM.

Proactive and schedule-driven; each run is stateless — there is no local ledger file. The one thing that spans runs is a pending bulk-update request: its state lives in {{alert_channel}} itself (the posted draft plus any approval reply), not in the sandbox. </overview>

<when-to-load> - The nightly cron fires the CRM hygiene sweep. - A human asks the agent to clean up HubSpot, dedupe contacts, or check CRM data quality on demand. </when-to-load> <workflow>

Step 0 — Confirm access

No local state to resume — each run starts with a clean sandbox. The one exception lives in Slack, not the sandbox: check {{alert_channel}} for an unresolved "Pending bulk update" post from a previous run before assuming this run's batches are new (see Step 5). Confirm the HubSpot and Clearbit connectors are live before touching any records:

GET /crm/v3/objects/contacts?limit=1
GET /crm/v3/objects/deals?limit=1

If either connector fails, stop and report the failure in the summary instead of running a partial sweep.

Step 1 — Pull the working set

Pull contacts and open deals touched or created in the last 24h, plus any contact record with a null in a required field:

GET /crm/v3/objects/contacts/search
  filterGroups: [{ propertyName: "lastmodifieddate", operator: "GTE", value: <24h ago> }]
GET /crm/v3/objects/contacts/search
  filterGroups: [{ propertyName: "jobtitle", operator: "NOT_HAS_PROPERTY" }, ...]
GET /crm/v3/objects/deals/search
  filterGroups: [{ propertyName: "dealstage", operator: "NEQ", value: "closedlost|closedwon" }]

Step 2 — Find and merge duplicate contacts

Two contacts are the same record when they match on any of:

  • Same primary email address.
  • Same first + last name AND same company domain.

A duplicate is often an older, untouched record that falls outside the Step 1 working set (not modified in the last 24h, no missing field). For each contact in the working set, run a targeted HubSpot search against the full contact base — by primary email, and separately by (firstname + lastname + company domain) — to surface any existing match outside the 24h window, not just duplicates among contacts already pulled in Step 1.

For each confirmed pair:

  1. Pick the primary: the record with the older createdate, or the one with more associated deals/tickets if createdate ties.
  2. Merge via HubSpot's contact merge endpoint so all associations (deals, tickets, notes, timeline) roll onto the primary.
  3. If the two records disagree on a field HubSpot can't auto-resolve (e.g. conflicting job titles), keep the primary's value and note the conflict in the summary rather than guessing.

Step 3 — Fill missing fields from enrichment

Required fields: jobtitle, industry, numemployees (company size). For each contact missing one or more:

  1. Query Clearbit by email or company domain.
  2. If Clearbit returns a value, write it to the missing field.
  3. Batch the writes for this pass. If the batch for a single field would touch more than {{bulk_update_threshold}} records, do not write it — go to Step 5 instead. Fills below the threshold write immediately, per-record.

Step 4 — Flag stale deals

A deal is stale when it hasn't moved stage and has had no logged activity (email, call, note, meeting) in 21+ days. For each match:

  • Set a hygiene_stale custom property (or tag) to true with the last activity date.
  • Never change dealstage, never close the deal — flagging only.

Step 5 — Human approval gate for bulk updates

First, resolve any pending request from a previous run: search {{alert_channel}} for the agent's own most recent "Pending bulk update: <field>" post.

  • No pending post found, or the last one already carries this agent's own "Applied"/"Resolved" reply → this field has nothing outstanding; if Step 3 produced a new batch over {{bulk_update_threshold}} records for it, go to "New batch" below.
  • A pending post exists with no resolution reply yet → check whether an authorized approver (not the agent) has replied "approve"/"approved" in that thread:
    • Approved — re-verify each record in the posted sample still needs the fill (skip any that changed since the post), write the batch for that field, reply in-thread confirming exactly what was applied, then continue to Step 6. Do not also start a "New batch" for the same field this run.
    • No approval reply yet — do not write, and do not post a duplicate request for the same field. Note it as still pending in this run's summary (Step 6) and move on.

New batch — when Step 3 produces a batch over {{bulk_update_threshold}} records for a field with no unresolved pending post:

  1. Do not write any record in that batch.
  2. Draft an approval request: field name, record count, and a sample of 5–10 affected records with old → new values.
  3. Post it to {{alert_channel}} as "Pending bulk update: <field>" and stop — do not write, do not wait inside this run. The batch is applied on a later run, once that run's Step 5 finds an explicit approval reply in this thread; never retry-write without one.

Step 6 — Post the summary

Post one summary to {{alert_channel}} covering:

  • Duplicate contacts merged (count + any unresolved conflicts).
  • Fields filled from enrichment (count per field).
  • Deals flagged stale (count, with links).
  • Any bulk update pending approval, what it is, and why it's waiting.
</workflow> <guardrails> - **Bulk updates require approval.** Any single field-fill batch touching more than {{bulk_update_threshold}} records stops for a human before it writes — no exceptions. - **No write without an explicit approval reply.** A pending bulk update is only applied once a run's Step 5 finds an explicit "approve"/"approved" reply in its thread from someone other than the agent — checked fresh at the start of every run. Silence is not approval. - **One pending post per field.** Don't post a second "Pending bulk update" request for a field that already has one awaiting approval — resolve or fold it into that thread first. - **Merge, never delete.** Duplicate resolution always merges into a primary record; a contact is never deleted outright. - **Flag, never close.** Stale deals are marked for visibility; the agent never changes deal stage or closes a deal. - **Scoped secrets.** HubSpot and Clearbit credentials are injected into the sandbox at runtime, scoped to this agent's grant. - **No cross-run assumptions beyond the channel itself.** Each run re-derives duplicates, gaps, and stale deals from current HubSpot state; the only thing it checks from a prior run is an outstanding approval reply in {{alert_channel}}. </guardrails> </skill>

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

access-policy

FreeSummary

Review Slack access requests against Okta role and team information, then prepare narrowly scoped GitHub or AWS IAM permissions. Apply changes only after an eligible person's approval and record the grant, reasoning, approver, and timestamp.

  • Reviewing GitHub repository access requests from Slack
  • Preparing AWS IAM permissions for a specific task
  • Routing sensitive access requests for additional review
kortix-ai/suna20.3KUpdated Oct 23, 2026

account-research

FreeSummary

Research companies and people before outreach or meetings. Combines business profiles, recent news, hiring signals, and key contacts into a sourced brief with talking points and suggested questions, adding relationship history when CRM data is connected.

  • Research a prospective customer before outreach
  • Prepare background information for meeting attendees
  • Compare a competitor's products and positioning
kortix-ai/suna20.3KUpdated Oct 23, 2026

Review daily Google Ads and Meta Ads results for budget pacing, declining performance, and unusual activity. Get prioritized findings with supporting numbers and concrete recommendations for a marketing team to assess and carry out.

  • Checking whether campaign budgets are being spent on schedule
  • Investigating rising acquisition costs or falling ad returns
  • Finding ads and keywords that spend without converting
kortix-ai/suna20.3KUpdated Oct 23, 2026

agent-browser

FreeSummary

Automate website tasks such as navigating pages, filling forms, clicking buttons, taking screenshots, and extracting data. The skill also supports web app testing, with specialized guides for Electron desktop apps, Slack, and cloud browsers.

  • Automate form entry and page navigation
  • Capture screenshots and extract page data
  • Explore web apps for bugs
kortix-ai/suna20.3KUpdated Oct 23, 2026

ap-invoice-match

FreeSummary

Process emailed vendor invoices by extracting details, comparing them with purchase orders and invoice history, and recording duplicates, overcharges, or missing orders. Summarize results in Slack for human review; payment approval and execution remain with people.

  • Checking incoming invoices against purchase orders
  • Finding duplicate invoices and likely resends
  • Reviewing unit prices and remaining order balances
kortix-ai/suna20.3KUpdated Oct 23, 2026

billing

FreeSummary

Guide changes to Kortix billing code, admin controls, and pricing screens. Explain how plans, trials, enterprise contracts, and access exceptions should work, where pricing is defined, and which audited routes must handle account changes.

  • Update billing logic and its specification together
  • Review how trials and enterprise contracts are handled
  • Find the code that defines prices and allowances
kortix-ai/suna20.3KUpdated Oct 23, 2026

See all skills by kortix-ai

Report a problem with this skill