getaero-io/gtm-eng-skills / skills/deepline-ads-audiences
deepline-ads-audiences
VerifiedUse this skill when building, enriching, auditing, or uploading B2B paid ads audiences to Google Customer Match, Meta/Facebook Custom Audiences, or LinkedIn Matched Audiences. Triggers on phrases like '/deepline-ads-audience', '/deepline-ads-audiences', 'upload this audience', 'create custom audiences', 'personal email hashes', 'increase Facebook match rate', 'Google ads audience', 'Meta audience', 'FB audience', or any workflow that turns CRM/customer/contact data into paid ads upload lists. Skip for outbound prospecting sequences, cold email, or pure campaign copywriting.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 37.6 KB |
| plays/audit-no-double-hash.play.ts | script | 3.1 KB |
| plays/build-contactout-hash-pool.play.ts | script | 9.7 KB |
| plays/build-hash-only-audience.play.ts | script | 7.0 KB |
| plays/enrich-audience-waterfall.play.ts | script | 16.7 KB |
| plays/evaluate-leadmagic-personal-email.play.ts | script | 3.7 KB |
| plays/evaluate-personal-email-provider.play.ts | script | 13.8 KB |
| plays/report-google-coverage-lift.play.ts | script | 8.6 KB |
| plays/shared/audience-hash.ts | script | 10.8 KB |
| plays/upload-facebook-google-hash-only-audience.play.ts | script | 5.4 KB |
| plays/upload-google-hash-only-audience.play.ts | script | 3.3 KB |
| recipes/enrich-and-upload-facebook-google.md | markdown | 6.9 KB |
| recipes/max-coverage-audience.md | markdown | 11.3 KB |
| recipes/sample-abm-segment-example.md | markdown | 4.9 KB |
| shared/audience-basics.md | markdown | 4.5 KB |
| shared/contactout-hash-pool.md | markdown | 7.9 KB |
| shared/meta-connection.md | markdown | 3.7 KB |
| shared/upload-failure-modes.md | markdown | 9.3 KB |
| skill-metadata.json | config | 3.3 KB |
plays/audit-no-double-hash.play.ts
View on GitHubimport deepline from 'deepline';
import {
auditHashRows,
auditUploadFile,
normalizeSha256,
sha256Hex,
} from './shared/audience-hash';
type HashRow = Record<string, string | undefined>;
function collectHashes(row: HashRow, columns: string[]): string[] {
const hashes: string[] = [];
for (const column of columns) {
const hash = normalizeSha256(row[column]);
if (hash) hashes.push(hash);
}
return hashes;
}
export const config = {
name: 'ads-audience-audit-no-double-hash',
description:
'Verify a paid-ads upload payload is hash-only, deduped, and free of hash-of-hash mistakes before it reaches a platform.',
};
export default async function (input: {
payloadFile: string;
providerHashFile: string;
providerHashColumns?: string[];
}) {
const payloadDataset = await deepline.csv<HashRow>(input.payloadFile);
const providerDataset = await deepline.csv<HashRow>(input.providerHashFile);
const payloadRows = await payloadDataset.materialize();
const providerRows = await providerDataset.materialize();
const providerHashColumns = input.providerHashColumns ?? [
'email_sha256',
'personal_email_sha256',
'hashed_personal_email_sha256',
'aviato_hash',
'limadata_hash',
];
const payloadHashes = new Set(
payloadRows
.map((row) => normalizeSha256(row.email_sha256))
.filter((hash): hash is string => Boolean(hash)),
);
const providerHashes = new Set<string>();
providerRows.forEach((row) => {
collectHashes(row, providerHashColumns).forEach((hash) =>
providerHashes.add(hash),
);
});
const missingProviderHashes = Array.from(providerHashes).filter(
(hash) => !payloadHashes.has(hash),
);
const doubleHashedProviderHashes = Array.from(providerHashes)
.map((hash) => sha256Hex(hash))
.filter((hash) => payloadHashes.has(hash));
const audit = auditHashRows(payloadRows);
// Column purity, plain names beside hashed emails, names without zip, and
// hash-of-hash inside the payload itself: each uploads cleanly and matches
// nothing, so this is the only place they can be caught.
const fileAudit = auditUploadFile(payloadRows);
const ok =
audit.malformedHashes === 0 &&
audit.duplicateHashes === 0 &&
audit.rawEmailFieldsPresent === false &&
fileAudit.ok &&
missingProviderHashes.length === 0 &&
doubleHashedProviderHashes.length === 0;
if (!ok) {
throw new Error(
JSON.stringify({
message: 'Audience hash audit failed.',
audit,
file_audit: fileAudit,
provider_hashes: providerHashes.size,
missing_provider_hashes: missingProviderHashes.length,
double_hashed_provider_hashes: doubleHashedProviderHashes.length,
missing_provider_hash_examples: missingProviderHashes.slice(0, 5),
double_hashed_provider_hash_examples: doubleHashedProviderHashes.slice(
0,
5,
),
}),
);
}
return {
ok: true,
audit,
file_audit: fileAudit,
provider_hashes: providerHashes.size,
missing_provider_hashes: 0,
double_hashed_provider_hashes: 0,
};
}
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 |