NG Lawyer DB Build (Step 1)
What this skill does
This is Step 1 of Fei Gao’s “Nigeria Lawyer Network” workflow:
- Build a Lawyer Database (this skill)
- Send outreach emails and score by response (separate skill)
- Sort & export for fast lookup (separate skill)
The objective is to create a database that allows fast matching by:
City → Practice → Sub-specialty → Regulator → Firm size → Position → Score → Contact.
This skill focuses on data collection + structured classification with evidence links.
Inputs
- city:
Lagos | Abuja
- practice:
Construction | RealEstate | Labour | Tax | Criminal | IP
- n_per_segment: integer (target 3)
Output files
- lawyer_db_ng.xlsx (main database)
- sources.jsonl (evidence per record: url + snippet + timestamp)
Database schema (fixed column order)
The Excel must contain columns in this exact order:
- Lawyer_UID
- Country
- City
- Practice
- Sub_Practice
- Regulator_Tag
- Firm_Name
- Firm_Size
- Position
- Lawyer_Name
- Email
- Phone
- LinkedIn
- Website
- Evidence_URL
- Score_Total (blank in Step 1)
- Score_ResponseSpeed (blank)
- Score_Detail (blank)
- Score_Pricing (blank)
- Score_Cooperation (blank)
- Risk_Flag (blank)
- NeedFollowUp (0/1)
- ChannelCostRisk (Low/Medium/High)
- Last_Updated
Non-negotiable rules (to avoid future scoring chaos)
1) Unique key (Lawyer_UID)
All later scoring MUST be written back by Lawyer_UID, never by name.
Format:
LAW-NG-{CITYCODE}-{PRACTICECODE}-{NNNN}
- CityCode: Lagos=LAG, Abuja=ABJ
- PracticeCode: Construction=CON, RealEstate=REA, Labour=LAB, Tax=TAX, Criminal=CRI, IP=IPR
Example:
2) Email policy (anti-channel-cost)
- Email must be explicitly published on the evidence page (law firm bio page, author page, or official profile).
- NO guessing (e.g., firstname.lastname@firm.com is not allowed unless shown).
- If only a general firm email exists (info@ / contact@), it may be used but set:
ChannelCostRisk=High
NeedFollowUp=1
3) Evidence chain
Each row must store Evidence_URL.
The skill also writes sources.jsonl with:
- Lawyer_UID
- Evidence_URL
- Evidence_Snippet (<= 300 chars)
- Captured_At
4) Firm_Size classification (fee proxy)
Firm_Size affects pricing expectation. Classify using evidence:
- Top:
- The firm is ranked in Chambers or Legal 500 in Nigeria for the relevant practice; OR
- Firm lawyer count > 50 (evidence required)
- Mid: lawyer count 15–50
- Small: lawyer count 2–14
- Solo: sole practitioner / independent (count=1)
- Unknown: insufficient evidence → set NeedFollowUp=1
5) Position mapping (fee proxy)
Normalize to:
- Partner / Counsel / SeniorAssociate / Associate / Junior / Independent / Unknown
Mapping hints:
- Partner: Managing Partner, Senior Partner, Partner
- Counsel: Counsel, Of Counsel
- SeniorAssociate: Senior Associate, Associate (Senior)
- Associate: Associate, Solicitor
- Junior: Junior Associate, Trainee
- Independent: Sole Practitioner, Principal, Independent Legal Practitioner
Regulator_Tag (only with evidence)
Allowed values:
- CAC, NIPC, FIRS, StateIRS, NAFDAC, Immigration, MinistryOfMines, IPRegistry, EFCC, Police, Court
Rule:
- Tag only when evidence mentions regulator or shows relevant matters.
- If not evidenced, leave blank; outreach email will ask the lawyer to self-report regulators handled.
Data collection strategy (recommended sources)
Priority order:
- Chambers / Legal 500 ranked firms for Nigeria practice (Top candidates)
- Official law firm team pages (bio pages with emails)
- Author pages on firm sites / Lexology / IFLR (when email is shown)
- Boutique firm sites for Small/Solo
Segmentation target
For each (Firm_Size x Position) segment, collect n_per_segment candidates with verified emails where possible.
Recommended priority within Top firms:
- Counsel / SeniorAssociate / Associate (often more willing for flexible cooperation)
Example run (MVP)
City: Lagos
Practice: Construction
n_per_segment: 3
Goal: produce a usable initial database for Lagos Construction to validate:
- Firm_Size classification is correct
- Position mapping is correct
- Emails are evidence-backed
- Column order is stable
1---2name: ng-lawyer-db-build-step-13description: This is Step 1 of Fei Gao’s “Nigeria Lawyer Network” workflow: 1) Build a Lawyer Database (this skill) 2) Send outreach emails and score by response (separate skill) 3) Sort & export for fast looku...4---5
6# NG Lawyer DB Build (Step 1)
7
8## What this skill does
9This is **Step 1** of Fei Gao’s “Nigeria Lawyer Network” workflow:
101) Build a **Lawyer Database** (this skill)
112) Send outreach emails and score by response (separate skill)
123) Sort & export for fast lookup (separate skill)
13
14The objective is to create a database that allows **fast matching** by:
15**City → Practice → Sub-specialty → Regulator → Firm size → Position → Score → Contact**.
16
17This skill focuses on **data collection + structured classification** with evidence links.
18
19---
20
21## Inputs
22- **city**: `Lagos` | `Abuja`
23- **practice**: `Construction` | `RealEstate` | `Labour` | `Tax` | `Criminal` | `IP`
24- **n_per_segment**: integer (target **3**)
25
26---
27
28## Output files
29- **lawyer_db_ng.xlsx** (main database)
30- **sources.jsonl** (evidence per record: url + snippet + timestamp)
31
32---
33
34## Database schema (fixed column order)
35The Excel must contain columns in this exact order:
36
371. Lawyer_UID
382. Country
393. City
404. Practice
415. Sub_Practice
426. Regulator_Tag
437. Firm_Name
448. Firm_Size
459. Position
4610. Lawyer_Name
4711. Email
4812. Phone
4913. LinkedIn
5014. Website
5115. Evidence_URL
5216. Score_Total (blank in Step 1)
5317. Score_ResponseSpeed (blank)
5418. Score_Detail (blank)
5519. Score_Pricing (blank)
5620. Score_Cooperation (blank)
5721. Risk_Flag (blank)
5822. NeedFollowUp (0/1)
5923. ChannelCostRisk (Low/Medium/High)
6024. Last_Updated
61
62---
63
64## Non-negotiable rules (to avoid future scoring chaos)
65### 1) Unique key (Lawyer_UID)
66All later scoring MUST be written back by **Lawyer_UID**, never by name.
67
68Format:
69- `LAW-NG-{CITYCODE}-{PRACTICECODE}-{NNNN}`
70- CityCode: Lagos=LAG, Abuja=ABJ
71- PracticeCode: Construction=CON, RealEstate=REA, Labour=LAB, Tax=TAX, Criminal=CRI, IP=IPR
72
73Example:
74- `LAW-NG-LAG-CON-0001`
75
76### 2) Email policy (anti-channel-cost)
77- Email must be **explicitly published** on the evidence page (law firm bio page, author page, or official profile).
78- **NO guessing** (e.g., firstname.lastname@firm.com is not allowed unless shown).
79- If only a general firm email exists (info@ / contact@), it may be used but set:
80 - `ChannelCostRisk=High`
81 - `NeedFollowUp=1`
82
83### 3) Evidence chain
84Each row must store **Evidence_URL**.
85The skill also writes **sources.jsonl** with:
86- Lawyer_UID
87- Evidence_URL
88- Evidence_Snippet (<= 300 chars)
89- Captured_At
90
91### 4) Firm_Size classification (fee proxy)
92Firm_Size affects pricing expectation. Classify using evidence:
93
94- **Top**:
95 - The firm is ranked in **Chambers** or **Legal 500** in Nigeria for the relevant practice; OR
96 - Firm lawyer count **> 50** (evidence required)
97- **Mid**: lawyer count **15–50**
98- **Small**: lawyer count **2–14**
99- **Solo**: sole practitioner / independent (count=1)
100- **Unknown**: insufficient evidence → set NeedFollowUp=1
101
102### 5) Position mapping (fee proxy)
103Normalize to:
104- Partner / Counsel / SeniorAssociate / Associate / Junior / Independent / Unknown
105
106Mapping hints:
107- Partner: Managing Partner, Senior Partner, Partner
108- Counsel: Counsel, Of Counsel
109- SeniorAssociate: Senior Associate, Associate (Senior)
110- Associate: Associate, Solicitor
111- Junior: Junior Associate, Trainee
112- Independent: Sole Practitioner, Principal, Independent Legal Practitioner
113
114---
115
116## Regulator_Tag (only with evidence)
117Allowed values:
118- CAC, NIPC, FIRS, StateIRS, NAFDAC, Immigration, MinistryOfMines, IPRegistry, EFCC, Police, Court
119
120Rule:
121- Tag only when evidence mentions regulator or shows relevant matters.
122- If not evidenced, leave blank; outreach email will ask the lawyer to self-report regulators handled.
123
124---
125
126## Data collection strategy (recommended sources)
127Priority order:
1281) Chambers / Legal 500 ranked firms for Nigeria practice (Top candidates)
1292) Official law firm team pages (bio pages with emails)
1303) Author pages on firm sites / Lexology / IFLR (when email is shown)
1314) Boutique firm sites for Small/Solo
132
133---
134
135## Segmentation target
136For each (Firm_Size x Position) segment, collect **n_per_segment** candidates **with verified emails** where possible.
137
138Recommended priority within Top firms:
139- Counsel / SeniorAssociate / Associate (often more willing for flexible cooperation)
140
141---
142
143## Example run (MVP)
144City: Lagos
145Practice: Construction
146n_per_segment: 3
147
148Goal: produce a usable initial database for Lagos Construction to validate:
149- Firm_Size classification is correct
150- Position mapping is correct
151- Emails are evidence-backed
152- Column order is stable
153