lookup
Skill2 starsChanged 8 months agoMITView on GitHub
Twilio development skill: lookup
1 other project uses a version of this.
Adopted by
Most recently taken up by
- giacomoguidotto/skillstheir own version, first seen Jul 23, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- giacomoguidotto/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository66 other files it gives its agents.
- adversarial-reviewSkill
- agent-connectSkill
- agent-teams-guideSkill
- agent-testingSkill
- android-sdkSkill
- brainstormSkill
- branded-callingSkill
- callbacksSkill
- compliance-regulatorySkill
- conferenceSkill
- context-engineeringSkill
- context-hubSkill
- conversational-intelligenceSkill
- conversation-relay-referenceSkill
- conversation-relaySkill
- conversationrelaySkill
- conversations-v2Skill
- customer-memorySkill
- deepgramSkill
- deep-validationSkill
- elastic-sip-trunkingSkill
- env-doctorSkill
- event-streamsSkill
- getting-startedSkill
- hooks-referenceSkill
- iamSkill
- ios-sdkSkill
- ivr-crawlerSkill
- ivr-migratorSkill
- media-streamsSkill
- memory-systemsSkill
- messaging-services-referenceSkill
- messaging-servicesSkill
- messagingSkill
- multi-agent-patternsSkill
- operational-gotchasSkill
- paymentsSkill
- paySkill
- phone-numbersSkill
- proxySkill
- real-time-transcriptionSkill
- recordingsSkill
- segmentSkill
- sendgrid-emailSkill
- sip-byocSkill
- sipSkill
- sync-referenceSkill
- syncSkill
- taskrouter-referenceSkill
- taskrouterSkill
- tdd-workflowSkill
- tool-boundariesSkill
- twilio-cliSkill
- twilio-invariantsSkill
- verify-referenceSkill
- verifySkill
- video-patternsSkill
- videoSkill
- voice-insightsSkill
- voice-referenceSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 233
CNAM billed even when no data returned: Every caller_name request costs $0.01 regardless of whether a name is found.
- Very specific: line 245
Phone Number Quality Score uses snake_case in SDK response: Every other package returns camelCase properties (carrierName, callerType).
- Very specific: line 247
Unrequested packages return
null, not absent: When you request specific fields, all other data package fields are still present in the …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
name: lookup description: Twilio Lookup v2 phone number intelligence guide. Use when validating phone numbers, detecting line type or carrier, checking fraud risk (SIM swap, SMS pumping), verifying caller identity, or choosing between Lookup data packages. allowed-tools: mcp__twilio__lookup_phone_number, mcp__twilio__check_fraud_risk, Read, Grep, Glob
Lookup v2 Development Skill
Decision-making guide for Twilio Lookup v2 — phone number intelligence, validation, fraud detection, and identity verification. Load this skill when choosing which data packages to use, interpreting Lookup responses, or integrating number intelligence into voice/messaging workflows.
Evidence date: 2026-03-29 | Account: ACxx...xx
Scope
What Lookup v2 Can Do
- Validate phone numbers (free) — format check, E.164 normalization, country detection
- Identify line type — 12-type classification including fixedVoip vs nonFixedVoip distinction
- Retrieve carrier data — carrier name, MCC, MNC for mobile/VoIP numbers
- CNAM lookup — caller name and type (US numbers only)
- Detect SIM swap — carrier-reported SIM change history (Beta, 10 countries)
- Assess SMS pumping risk — per-number risk score and carrier risk category
- Check number reassignment — whether a US number changed owners since a given date
- Verify identity — match name/address/DOB against carrier records (10 countries)
- Check line status — HLR-based reachability (active/reachable/unreachable/inactive)
- Detect call forwarding — unconditional forwarding status (UK only, Private Beta)
- Combine multiple packages in a single API call — comma-separated
fieldsparameter - Override line type classification — persist per-account line type override for a number
What Lookup v2 Cannot Do
- Cannot look up information by name/address — input is always a phone number; you cannot reverse-search "who owns this number" without a number
- Cannot get CNAM for non-US numbers — returns error 60600 (out of coverage); no international CNAM
- Cannot detect conditional call forwarding — only unconditional forwarding is detected, and only for UK carriers
- Cannot guarantee SIM swap data without carrier registration — returns error 60606 until carrier approval is completed
- Cannot use Reassigned Number outside the US — US-only dataset with monthly update cadence
- Cannot get real-time SMS pumping scores — scores are statistical models, not live traffic analysis; they change between calls but reflect aggregate patterns
- Cannot write data — Lookup v2 is read-only (GET only). The one exception is Line Type Override (POST/DELETE)
- Cannot batch multiple phone numbers in one request — one number per API call; use concurrent requests for bulk lookups
- Cannot avoid billing on CNAM requests that return no data — billed per request regardless of whether caller name is found
- Cannot use Phone Number Quality Score or Pre-fill without account provisioning — returns 60606; contact Twilio sales
Quick Decision
| Need | Use | Why |
| Validate a number is real | No fields (free) | Returns valid, validationErrors, country, format |
| Check if mobile/landline/VoIP | line_type_intelligence ($0.008) | 12-type classification with carrier data |
| Get caller name for US number | caller_name ($0.01) | CNAM database; US-only |
| Block SMS pumping before OTP | sms_pumping_risk (free NAMER / $0.025 ROW) | Risk score + carrier risk category |
| Detect SIM swap for fraud check | sim_swap (contact sales) | Carrier-reported swap history; requires registration |
| KYC identity verification | identity_match ($0.10–$1.20) | Name/address/DOB match against carrier; 10 countries |
| Check if number was reassigned | reassigned_number ($0.02–$0.0015) | US-only; requires LastVerifiedDate |
| Check if number is reachable | line_status ($0.007–$0.00385) | HLR query; Private Beta |
| Detect call forwarding | call_forwarding (contact sales) | UK major carriers only; Private Beta |
Decision Frameworks
Choosing Data Packages for Fraud Prevention
| Scenario | Recommended packages | Rationale |
| OTP/2FA signup | sms_pumping_risk + line_type_intelligence | Block pumping bots and filter non-SMS-capable types |
| High-value transaction auth | sim_swap + line_type_intelligence | SIM swap detects account takeover; line type filters VoIP |
| Re-engagement campaign | reassigned_number + line_type_intelligence | Avoid contacting wrong person after number recycling |
| KYC onboarding | identity_match + line_type_intelligence | Verify identity against carrier records |
| Inbound caller screening | caller_name + line_type_intelligence | CNAM + carrier data for US callers |
SMS Pumping Risk Interpretation
The smsPumpingRiskScore and carrierRiskCategory are independent signals:
| Score range | Risk level | Action |
| 0–60 | Low | Send normally |
| 60–75 | Mild | Add CAPTCHA or rate limiting |
| 75–90 | Moderate | Require additional verification |
| 90–100 | High | Block the request |
carrierRiskCategory reflects the carrier's overall fraud profile, not this specific number. A number can have a low smsPumpingRiskScore but a high carrier risk category (e.g., VoIP carriers). Use both signals together.
Line Type for SMS Routing
| Line type | Can receive SMS? | Action |
mobile | Yes | Send directly |
nonFixedVoip | Usually | Send, but higher fraud risk |
fixedVoip | Sometimes | Test before relying on it |
landline | No | Use voice call or skip |
tollFree | No | Do not message |
personal, premium, sharedCost, uan, voicemail, pager | No | Do not message |
unknown | Unknown | Test or skip |
Integration Patterns
Basic Validation (Free)
const client = require('twilio')(accountSid, authToken);
const result = await client.lookups.v2
.phoneNumbers('+14159929960')
.fetch();
console.log(result.valid); // true
console.log(result.validationErrors); // []
console.log(result.countryCode); // "US"
console.log(result.nationalFormat); // "(415) 992-9960"Line Type Intelligence
const result = await client.lookups.v2
.phoneNumbers('+14159929960')
.fetch({ fields: 'line_type_intelligence' });
console.log(result.lineTypeIntelligence.type); // "nonFixedVoip"
console.log(result.lineTypeIntelligence.carrierName); // "Twilio - SMS/MMS-SVR"Multiple Packages in One Request
const result = await client.lookups.v2
.phoneNumbers('+14159929960')
.fetch({ fields: 'line_type_intelligence,caller_name,sms_pumping_risk' });
// All three populated in a single response
console.log(result.lineTypeIntelligence.type);
console.log(result.callerName.callerType);
console.log(result.smsPumpingRisk.smsPumpingRiskScore);SMS Pumping Guard Before OTP
const result = await client.lookups.v2
.phoneNumbers(userPhone)
.fetch({ fields: 'sms_pumping_risk,line_type_intelligence' });
const score = result.smsPumpingRisk.smsPumpingRiskScore;
const lineType = result.lineTypeIntelligence.type;
if (score >= 75 || lineType === 'landline') {
// Block or require additional verification
throw new Error('Phone number failed fraud check');
}
// Safe to send OTP
await client.verify.v2.services(verifySid)
.verifications.create({ to: userPhone, channel: 'sms' });Identity Match (KYC)
const result = await client.lookups.v2
.phoneNumbers('+14159929960')
.fetch({
fields: 'identity_match',
firstName: 'Jane',
lastName: 'Smith',
addressLine1: '123 Main St',
city: 'San Francisco',
state: 'CA',
postalCode: '94105',
addressCountryCode: 'US',
});
const match = result.identityMatch;
console.log(match.summaryScore); // 0-100
console.log(match.firstNameMatch); // "exact_match", "partial_match", etc.
console.log(match.lastNameMatch);National Format Input
// Non-E.164 input requires countryCode parameter
const result = await client.lookups.v2
.phoneNumbers('5551234567')
.fetch({ countryCode: 'US' });
console.log(result.phoneNumber); // "+15551234567" (normalized to E.164)Using MCP Tools
# Basic lookup with line type
ToolSearch("select:mcp__twilio__lookup_phone_number")
mcp__twilio__lookup_phone_number({ phoneNumber: "+14159929960", fields: ["line_type_intelligence"] })
# Fraud risk check
ToolSearch("select:mcp__twilio__check_fraud_risk")
mcp__twilio__check_fraud_risk({ phoneNumber: "+14159929960", checks: ["sim_swap", "sms_pumping_risk"] })MCP tool limitations: The lookup_phone_number tool exposes validation, caller_name, line_type_intelligence, and line_status fields. The check_fraud_risk tool exposes sim_swap and sms_pumping_risk. For identity_match, reassigned_number, call_forwarding, or phone_number_quality_score, use the Node.js SDK directly.
Gotchas
Request & Response
- Invalid numbers return HTTP 200, not 404: Unlike Lookup v1 which returned 404, v2 returns HTTP 200 with
valid: falseand avalidationErrorsarray. Check thevalidfield, not the HTTP status code. - Garbage input gets country code prepended: Passing
"notanumber"returnsphoneNumber: "+1notanumber"withvalid: false,validationErrors: ["NOT_A_NUMBER"]. The API silently prepends+1(US default) to non-E.164 input. [Evidence: live test 2026-03-29] - Empty phone number input causes HTTP 404: The only way to get a 404 from Lookup v2 is passing an empty string, which resolves to
/v2/PhoneNumbers(no number segment). All other invalid inputs return 200. [Evidence: error 20404, live test 2026-03-29] callerTypehas undocumented value "UNDETERMINED": Docs list onlyBUSINESS,CONSUMER, andnull. In practice, Twilio VoIP numbers returncallerType: "UNDETERMINED". Handle this value in your code. [Evidence: live test on +15551234567, 2026-03-29]validationErrorsis an empty array for valid numbers, not null: Despite docs showingnull, live testing returns[]. Checkresult.validrather than testingvalidationErrorsfor truthiness. [Evidence: live test 2026-03-29]
Billing & Coverage
- CNAM billed even when no data returned: Every
caller_namerequest costs $0.01 regardless of whether a name is found. Non-US numbers return error 60600 without charge, but US numbers with no CNAM data are still billed. - SMS pumping scores are dynamic: Consecutive lookups on the same number return different
smsPumpingRiskScorevalues (observed: 34, then 41 on the same number seconds apart). Do not cache or compare scores across calls. [Evidence: live tests 6 and 17, 2026-03-29] - Carrier risk and pumping score are independent: A number can have
smsPumpingRiskScore: 34(low) butcarrierRiskCategory: "high". The carrier category reflects the carrier's overall profile (VoIP carriers are flagged high), while the score is number-specific. [Evidence: live test on +15551234567, 2026-03-29]
Data Package Availability
- Unprovisioned packages return 200 with error_code in the response body: Requesting
sim_swap,line_status,reassigned_number, orphone_number_quality_scorewithout account provisioning returns HTTP 200 witherrorCode: 60606inside the package object. No HTTP error is thrown — you must checkerrorCodein the response. [Evidence: live tests 7–11, 2026-03-29] errorCodetype is inconsistent across packages:reassigned_numberreturnserrorCodeas a string ("60606"), whilesim_swapand others return it as a number (60606). Always coerce to string or number before comparison. [Evidence: live tests 9 vs 7, 2026-03-29]- Phone Number Quality Score uses snake_case in SDK response: Every other package returns camelCase properties (
carrierName,callerType). Quality Score returns snake_case (carrier_risk_category,quality_score). This is an SDK inconsistency. [Evidence: live test 11, 2026-03-29] - Unrequested packages return
null, not absent: When you request specific fields, all other data package fields are still present in the response asnull. Don't check for key existence — check for non-null values. [Evidence: live test 17, 2026-03-29]
Package-Specific
reassigned_numberrequiresLastVerifiedDate: Omitting this parameter returns error 60617 in the response body (not an HTTP error). Format isYYYYMMDD. [Evidence: live test 20, 2026-03-29]identity_matchon VoIP numbers returns error 60003: VoIP/non-mobile numbers may not have carrier identity records. The error appears in the response body, not as an HTTP error. [Evidence: live test 12, 2026-03-29]call_forwardingreturns error 60607 (not 60606) when unavailable: This is a different error code than the standard "not enabled" 60606. Likely indicates the feature's Private Beta status or UK-only restriction. [Evidence: live test 10, 2026-03-29]- Line type carrier data is null for non-carrier types:
carrierName,mobileCountryCode, andmobileNetworkCodereturnnullfor types:personal,tollFree,premium,sharedCost,uan,voicemail,pager,unknown. Onlymobile,fixedVoip,nonFixedVoip, andlandlinehave carrier data. validationas a field name is accepted but adds nothing: Passingfields: "validation"returns the same response as no fields. The validation data (valid,validationErrors,countryCode,nationalFormat) is always included for free.
Error Codes
| Code | Meaning | Common cause |
| 60600 | Unprovisioned or out of coverage | CNAM on non-US number; number not assigned to carrier |
| 60601 | Canada authorization required | CLNPC/NPAC approval needed for Canadian line type |
| 60003 | Authentication/eligibility error | Identity match on VoIP number |
| 60606 | Package not enabled | Account not provisioned for the requested package |
| 60607 | Feature unavailable | Call forwarding outside UK |
| 60608 | Downstream provider error | Carrier/data provider timeout; retry |
| 60610 | Outside coverage area | Number in unsupported region for the package |
| 60611 | Quota reached | Package request quota exceeded |
| 60616 | Rate limit exceeded | Reassigned number: 50 RPS limit |
| 60617 | Missing required parameters | Reassigned number without LastVerifiedDate; Identity match without names |
| 60618 | Malformed parameter | PartnerSubId exceeds 64 chars |
Related Resources
Skills
/verify— Verify integration withlookupEnabledflag for carrier detection during OTP/phone-numbers— Phone number management, usesmcp__twilio__lookup_phone_numberfor carrier checks/branded-calling— CNAM registration and caller identity (complementary to Lookup CNAM)/voice-trust— Caller identity verification, SHAKEN/STIR attestation
MCP Tools
mcp__twilio__lookup_phone_number— Line type, caller name, validation, line statusmcp__twilio__check_fraud_risk— SIM swap, SMS pumping risk
API Reference
- Endpoint:
GET https://lookups.twilio.com/v2/PhoneNumbers/{PhoneNumber} - Auth: HTTP Basic (Account SID + Auth Token, or API Key + Secret)
- Regions: US1 (default), IE1 (Ireland)
Reference Files
| Topic | File | When to read |
| Data package response shapes | references/data-packages.md | When interpreting response fields, checking enums, or reviewing pricing |
| Live test evidence | references/test-results.md | When verifying a specific behavioral claim |
| Assertion audit | references/assertion-audit.md | When reviewing the provenance chain for skill claims |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

