Use this skill for insurance-claims operations with Stedi whenever the user asks to check patient eligibility, verify insurance coverage, submit claims, validate claim payloads, check claim status, retrieve/interpret 277CA or 835 responses, troubleshoot payer/provider enrollment requirements, or build deterministic claims workflows. Trigger this skill even if the user does not say "Stedi" explicitly but mentions eligibility checks, 270/271, insurance verification, benefits lookup, member coverage, deductible/copay/coinsurance inquiries, 837/835/277CA/ERA, payer IDs, claim rejection codes, claim resubmission, COB, or healthcare clearinghouse automation.
Deterministic, API-first insurance claims workflow skill.
Before doing anything else, silently verify the Stedi API key is available.
The user experience must stay clinician-friendly:
.env as:
STEDI_API_KEY=<key>Do not instruct clinicians to edit .env, export env vars, install dependencies, or run terminal commands.
Start with:
references/stedi-overview.mdThen read only what is needed:
When the user asks to check eligibility, verify coverage, or anything related to 270/271:
Always start with: references/stedi-eligibility.md — quick-reference for payer IDs, STCs, response parsing, and the API call interface.
For building or debugging raw API calls: references/eligibility-check/eligibility-api-reference.md — comprehensive endpoint docs including every request field, response field, and interpretation guide.
For constructing test requests: Choose based on check type:
references/eligibility-check/mock-requests-medical.mdreferences/eligibility-check/mock-requests-dental.mdreferences/eligibility-check/mock-requests-errors.mdFor payer-specific quirks and requirements: references/eligibility-check/provider-requirements.md — per-payer behaviors, enrollment needs, and gotchas (Cigna dependent response quirk, CMS MBI/X-Forwarded-For, Medi-Cal portal credentials, BCBS home plan routing, etc.).
For payload templates: Use the JSON templates in assets/eligibility-check/:
subscriber_check_template.json — subscriber-only medical checkdependent_check_template.json — dependent on subscriber's plandental_check_template.json — dental eligibility checkmbi_lookup_template.json — Medicare MBI lookup via SSNmedicaid_check_template.json — Medicaid with portal credentialsreferences/stedi-submitting-claims.mdreferences/stedi-claim-responses.mdreferences/stedi-best-practices.mdreferences/stedi-claim-lifecycle.mdreferences/stedi-enrollment-and-payers.mdreferences/stedi-testing.mdreferences/stedi-attachments-and-mcp.mdreferences/provider-requirements.mdWhen the task is check_eligibility, follow this sequence:
Collect from the user (or from available context):
references/stedi-eligibility.md for common IDs, or call the Payers API (GET https://healthcare.us.stedi.com/2024-04-01/change/medicalnetwork/payers) to search.memberId, firstName, lastName, dateOfBirth. All four together guarantee a payer response.30 (general), use MH for mental health, 35 for dental, etc.| Scenario | Template | Key difference |
|---|---|---|
| Patient is the policyholder | assets/eligibility-check/subscriber_check_template.json | Patient info in subscriber |
| Patient is a dependent (child/spouse) | assets/eligibility-check/dependent_check_template.json | Policyholder in subscriber, patient in dependents |
| Dental coverage | assets/eligibility-check/dental_check_template.json | STC 35 instead of 30 |
| Medicare (need MBI first) | assets/eligibility-check/mbi_lookup_template.json | SSN + address, payer CMS |
| Medicaid | assets/eligibility-check/medicaid_check_template.json | Requires portalUsername/portalPassword |
Read references/eligibility-check/provider-requirements.md for the target payer. Key things to verify:
X-Forwarded-For)Make a direct HTTP POST to the Stedi eligibility endpoint using the appropriate template from assets/eligibility-check/. Refer to references/eligibility-check/eligibility-api-reference.md for full field details and advanced scenarios.
Follow the interpretation steps in references/eligibility-check/eligibility-api-reference.md:
errors array first — if non-empty, handle AAA errors per references/eligibility-check/mock-requests-errors.md.benefitsInformation with code: "1".C), OOP max (G), copay (B), coinsurance (A).inPlanNetworkIndicatorCode: "Y" for in-network values.timeQualifierCode: 23 = total, 29 = remaining.authOrCertIndicator: "Y" means prior auth required.Present the eligibility summary in the standard output format (see Output format section below).
Follow this sequence unless user explicitly requests otherwise.
Classify task
check_eligibility, validate_claim, submit_claim, check_claim_status, lookup_payer, retrieve_277ca, retrieve_835era, poll_transactions, resubmit_or_void.check_eligibility, follow the Eligibility check workflow above.Run preflight requirements check
references/eligibility-check/provider-requirements.md.Execute via direct Stedi API calls
curl, fetch, or any HTTP client).POST https://healthcare.us.stedi.com/2024-04-01/change/medicalnetwork/eligibility/v3references/stedi-submitting-claims.md)GET https://healthcare.us.stedi.com/2024-04-01/change/medicalnetwork/payersCorrelate all transactions
patientControlNumber.correlationId.Return structured output
When presenting results to the user, normalize API responses into these structured shapes unless the user requests a different format.
Eligibility check (270/271):
{
"coverageActive": true,
"planName": "...",
"insuranceType": "PPO",
"groupNumber": "...",
"mentalHealth": { "covered": true, "copay": "$30", "coinsurance": null },
"deductible": { "total": "$1500", "remaining": "$800" },
"outOfPocketMax": "$4000",
"raw": {}
}
{ "coverageActive": false, "errors": [...], "raw": {} }references/stedi-eligibility.mdClaim validation (pre-submission):
{ "valid": true, "errors": [], "warnings": [] }Claim submission:
{
"status": "SUCCESS",
"correlationId": "...",
"patientControlNumber": "...",
"errors": []
}
Claim status check:
{
"claims": [
{ "statusCategoryCode": "...", "statusCode": "...", "description": "..." }
]
}
Payer lookup:
{
"payers": [
{ "payerId": "...", "name": "...", "aliases": [], "supportedTransactions": [] }
]
}
277CA / 835 ERA retrieval / transaction polling:
STEDI_API_KEY.usageIndicator: "T" for test submissions and "P" for production.When user asks to fix/retry/cancel claims:
references/stedi-claim-lifecycle.md.When performing claims tasks, return:
What I did (short)Result (status + key IDs)Why (if rejected/blocked)Next actions (numbered, deterministic)Example:
{
"action": "submit_claim",
"status": "blocked",
"reason_code": "ENROLLMENT_REQUIRED",
"context": {
"providerNpi": "1999999984",
"payerId": "6400",
"transactionType": "835"
},
"nextActions": [
"Submit enrollment request for 835",
"Wait for enrollment status live",
"Retry submission with same validated payload structure"
]
}