Crm field audit
@revopslab/crm-field-audit
Audit the fields in any CRM export (HubSpot, Salesforce, or other CSV). Reports fill rates, placeholder junk like n/a and unknown, top values, and flags empty, sparse, constant, default-heavy, and likely duplicate fields, plus fill rates by owner or team. Ends with a cleanup plan: what to hide, merge, make required, or fix.
- Activity
- New: be the first to try it
- Installs
- 0 installs
- Likes
- 0 likes
- Clones
- 0 clones
- 1{
- 2 "name": "crm-field-audit",
- 3 "owner": "revopslab",
- 4 "version": "1.0.0",
- 5 "type": "skill",
- 6 "description": "Audit the fields in any CRM export (HubSpot, Salesforce, or other CSV). Reports fill rates, placeholder junk like n/a and unknown, top values, and flags empty, sparse, constant, default-heavy, and likely duplicate fields, plus fill rates by owner or team. Ends with a cleanup plan: what to hide, merge, make required, or fix.",
- 7 "category": "revops",
- 8 "license": "MIT",
- 9 "compat": [
- 10 "claude-code"
- 11 ],
- 12 "permissions": {
- 13 "shell": [
- 14 "node scripts/field-audit.mjs"
- 15 ],
- 16 "files": {
- 17 "read": [
- 18 "./data/**"
- 19 ],
- 20 "write": [
- 21 "./out/**"
- 22 ]
- 23 }
- 24 },
- 25 "tests": {
- 26 "cases": [
- 27 {
- 28 "name": "flags empty, sparse, constant, default-heavy, placeholder, and duplicate fields",
- 29 "inputs": {
- 30 "data/companies.csv": "Record ID,Company Name,Domain,Industry,Industry (Custom),Employees,Annual Revenue,Lifecycle Stage,Country,Legacy Score,Partner Tier,Original Source,Owner,Region\n1,Northwind Traders,northwind.example,Retail,Retail,350,42000000,Customer,US,,,Organic search,Rep A,NA\n2,Contoso Robotics,contoso.example,Manufacturing,Manufacturing,1200,,Lead,DE,,Gold,n/a,Rep B,NA\n3,Fabrikam Health,fabrikam.example,Healthcare,Healthcare,4200,610000000,Lead,US,,,Paid search,Rep A,NA\n4,Tailspin Toys,tailspin.example,Retail,Retail,45,,Lead,US,,,n/a,Rep C,NA\n5,Litware,litware.example,Software,Software,12,,Lead,CA,,,Referral,Rep C,NA\n6,Adventure Works,adventure.example,Retail,Retail,600,88000000,Lead,US,,,n/a,,NA\n7,Wide World Importers,wideworld.example,Logistics,Logistics,250,,Lead,GB,,,Organic search,Rep B,NA\n8,Proseware,proseware.example,Software,,30,,Lead,US,,,Unknown,Rep C,NA\n9,Coho Winery,coho.example,Food and beverage,Food and beverage,80,,Lead,US,,,Event,Rep A,NA\n10,Lucerne Publishing,lucerne.example,Media,Media,150,21000000,Lead,US,,,n/a,Rep B,NA\n11,Woodgrove Bank,woodgrove.example,Financial services,Financial services,9000,,Lead,US,,,Paid social,Rep A,NA\n12,Alpine Ski House,alpine.example,,,25,,Lead,CH,,,,Rep C,NA\n"
- 31 },
- 32 "checks": [
- 33 {
- 34 "type": "command_exits_zero",
- 35 "command": "node scripts/field-audit.mjs data/companies.csv --group-by Owner --key-fields Industry,Employees,Owner --out out"
- 36 },
- 37 {
- 38 "type": "file_contains",
- 39 "path": "out/field-audit.md",
- 40 "text": "- Industry and Industry (Custom)"
- 41 },
- 42 {
- 43 "type": "output_matches_schema",
- 44 "path": "out/field-audit.json",
- 45 "schema": {
- 46 "type": "object",
- 47 "required": [
- 48 "summary",
- 49 "field_profiles",
- 50 "duplicates",
- 51 "by_group"
- 52 ],
- 53 "properties": {
- 54 "file_rows": {
- 55 "const": 12
- 56 },
- 57 "fields": {
- 58 "const": 14
- 59 },
- 60 "summary": {
- 61 "type": "object",
- 62 "properties": {
- 63 "empty": {
- 64 "const": 1
- 65 },
- 66 "sparse": {
- 67 "const": 1
- 68 },
- 69 "constant": {
- 70 "const": 1
- 71 },
- 72 "default_heavy": {
- 73 "const": 1
- 74 },
- 75 "placeholders": {
- 76 "const": 1
- 77 },
- 78 "possible_duplicates": {
- 79 "const": 1
- 80 }
- 81 }
- 82 },
- 83 "key_fields": {
- 84 "type": "array",
- 85 "minItems": 3,
- 86 "maxItems": 3
- 87 }
- 88 }
- 89 }
- 90 }
- 91 ]
- 92 },
- 93 {
- 94 "name": "NA as a region is a value, not a placeholder",
- 95 "inputs": {
- 96 "data/x.csv": "id,region,notes\n1,NA,\n2,NA,n/a\n3,EMEA,tbd\n"
- 97 },
- 98 "checks": [
- 99 {
- 100 "type": "command_exits_zero",
- 101 "command": "node scripts/field-audit.mjs data/x.csv --out out"
- 102 },
- 103 {
- 104 "type": "output_matches_schema",
- 105 "path": "out/field-audit.json",
- 106 "schema": {
- 107 "type": "object",
- 108 "properties": {
- 109 "field_profiles": {
- 110 "type": "array",
- 111 "minItems": 3,
- 112 "maxItems": 3,
- 113 "items": {
- 114 "type": "object",
- 115 "required": [
- 116 "field",
- 117 "fill_rate",
- 118 "flags"
- 119 ]
- 120 }
- 121 },
- 122 "summary": {
- 123 "type": "object",
- 124 "properties": {
- 125 "empty": {
- 126 "const": 1
- 127 },
- 128 "placeholders": {
- 129 "const": 1
- 130 }
- 131 }
- 132 }
- 133 }
- 134 }
- 135 }
- 136 ]
- 137 }
- 138 ]
- 139 }
- 140}
