Quick answer: use one line for referral context, then move quickly to role-specific evidence and your likely contribution.
State referral context in one line
Mention who referred you and the context (project, event, or collaboration). Keep it short and verifiable.
Do not outsource credibility
A referral can open attention, but your letter still needs role fit, evidence, and expected contribution.
Translate the referral into role relevance
If the referrer knows your work, add one concrete result they can verify. Avoid vague praise lines.
Prompt
Rewrite my cover letter for a referral application. Use one sentence for referral source and context, one sentence connecting my evidence to role needs, and one sentence on what I can deliver in the first 90 days.