> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Clean your CRM | Agent guide

> Run the deepline-crm-cleaning skill to audit a CRM, review repairs backed by evidence, and apply only the changes you approve.

[Human guide: task steps and agent prompt →](https://deepline.com/docs/human/crm-cleaning.md)

The `deepline-crm-cleaning` skill audits HubSpot, Salesforce, Attio, or a
mapped CSV export. It reports defects with evidence and proposes repairs. An
audit is read-only: it makes no CRM writes, merges, deletes, or paid lookups.

## Install the skill

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
npm install -g deepline
deepline auth status
deepline skills list
```

`deepline-crm-cleaning` appears in the list after install. Connect the CRM in
[Integrations](https://deepline.com/docs/integrations.md#crm-integrations), or use an existing export.

## Run an audit

```text theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
/deepline-crm-cleaning Audit our HubSpot companies and contacts. Report
duplicates, invalid company websites, and missing required fields. Required
company fields: domain, owner. Required contact fields: email, company. Treat
one legal entity as one account. Do not write to the CRM.
```

State four things in the request. The skill asks for any that are missing.

| Input | Example | Why it matters |
| - | - | - |
| Source | HubSpot portal, or `companies.csv` | The skill reads only the source you name |
| Account unit | Legal entity, brand, or location | Decides whether two records are one account |
| Required fields | Company domain and owner | Counts of missing fields use this list |
| Protected fields | Deal stage, owner, anything a rep entered | These are never proposed for overwrite |

## Choose a job

Start with the audit. Each other job reads the audit's output.

| Need | Job | Result |
| - | - | - |
| Find defects | Audit | Counts, issues, and gaps |
| Find duplicates | Dedupe | Supported matches and unresolved pairs |
| Prevent defects | Prevent | Which writer creates defects, and a control plan |
| Fill or refresh fields | Enrich | Validated field proposals |
| Check job changes | Employment | Dated roles and proposed links |
| Correct links | Relationships | Typed association proposals |
| Find parents and children | Hierarchy | Dated relationships and search gaps |
| Apply an approved plan | Repair | Verified results or explicit failures |
| Track quality | Monitor | Comparable trends and source status |
| Test the process | Evaluate | Scores, coverage, and test limits |

## Read the result

Every run returns the same five parts.

1. **Issue table.** One row per defect type, with the affected record count.
2. **Proposals.** Current value, proposed value, and evidence for each change.
3. **Metrics.** Each with its numerator, denominator, and time window.
4. **Unresolved cases.** Records with no supported decision, and the reason.
5. **Receipt.** A machine readable record of what was read, proposed, applied, and verified.

> [!TIP]
>
> An audit reports zero CRM changes. If the receipt shows any applied change
> during an audit, stop and report it.

A missing property and a blank value are different results. The skill checks
the CRM schema first, so a field your portal does not have is reported as
absent and not counted as blank.

## Approve a repair

Approval covers one exact plan: the tenant, the records, the fields, the
before and after values, and the cost limit. A changed plan needs a new
approval.

```text theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
/deepline-crm-cleaning Apply the approved domain repairs from the audit:
the 42 companies in repair-plan.csv, website field only. Read each record
back after writing and report any that did not change.
```

Before any paid enrichment, the skill tests at most two records inside the
cost limit and shows the output. Check identity and quality on those two
before approving more.

> [!WARNING]
>
> Merges are hard to reverse. Review each duplicate group before approving a
> merge, and keep groups that mix a parent with its subsidiary out of the
> plan.

## Bundled Plays

The skill ships Plays for the repeatable steps. None of them writes to the CRM.

| Play | Scope |
| - | - |
| `audit-crm-snapshot` | Audit fields and links in an export |
| `collect-hubspot-companies` | Read and reconcile the HubSpot company inventory |
| `sample-hubspot-crm` | Sample companies and their associated contacts |
| `classify-company-domains` | Classify what each stored URL is |
| `collect-domain-evidence` | Collect DNS, mail, website, and legal-page evidence |
| `plan-crm-domain-repairs` | Prepare supported URL replacements |
| `score-crm-company-candidates` | Retrieve likely duplicate companies for review |
| `resolve-crm-contact-duplicates` | Propose contact matches and hold conflicting groups |
| `evaluate-crm-cleaning` | Grade test cases or validate receipts |

The two matching Plays compare up to 1,000 records per run. They return
candidates for review. They do not decide identity and do not merge.

## Verify this task

Confirm the source and record count match what you asked for, the receipt
shows zero applied changes for an audit, every proposal carries evidence, and
unresolved records are listed with a reason.

## Related guides

* [Repair CRM records](https://deepline.com/docs/guides/crm-data-quality-automation.md)
* [Review job changes](https://deepline.com/docs/plays/play-job-change-alerts.md)
* [Skills](https://deepline.com/docs/features/claude-code-skills.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.