getaero-io/gtm-eng-skills / skills/deepline-crm-cleaning
deepline-crm-cleaning
VerifiedUse for CRM audits, duplicate detection, missing or stale fields, job changes, domain checks, acquisitions, parent-child relationships, repair plans, prevention, monitoring, and evaluation. Supports HubSpot, Salesforce, Attio, and mapped exports. Start with read-only analysis. Skip outreach writing, CRM interface design, and unrelated analysis.
plays/resolve-crm-contact-duplicates.play.ts
View on GitHubimport { definePlay } from 'deepline';
import { resolve_contacts_with_jev } from './shared/identity-evaluation';
import { readRecords, recordRows, objectJson } from './shared/io';
export default definePlay(
'crm-resolve-contact-duplicates',
async (
ctx,
input: {
records_file: string;
policy_json?: string;
max_evaluations?: number;
},
) => {
const records = await readRecords(
await ctx.csv<{ record_json: string }>(input.records_file),
);
const result = await resolve_contacts_with_jev(
ctx,
records,
input.policy_json
? objectJson(input.policy_json, 'policy_json')
: undefined,
input.max_evaluations,
);
const { pairs, pair_count, clusters, record_ids, ...metadata } = result;
return {
record_count: records.length,
pair_count,
cluster_count: clusters.length,
record_inventory: await ctx
.dataset(
'record_inventory',
recordRows(
record_ids.map((record_id: string) => ({ record_id })),
ctx.run.id,
),
)
.run({ key: 'row_id' }),
pairs: await ctx
.dataset('pairs', recordRows(pairs, ctx.run.id))
.run({ key: 'row_id' }),
clusters: await ctx
.dataset(
'clusters',
recordRows(
clusters.map((ids: string[], index: number) => ({
cluster_id: String(index),
record_ids: ids,
})),
ctx.run.id,
),
)
.run({ key: 'row_id' }),
metadata: await ctx
.dataset('duplicate_metadata', recordRows([metadata], ctx.run.id))
.run({ key: 'row_id' }),
crm_mutations: 0,
};
},
{
description:
'Use Jev to compare contact identities, including name variants and shared inboxes, and quarantine conflicting groups. Return proposals without CRM mutations.',
},
);
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |