What this is: dsm5 is an Agent Skill that gives an AI a disciplined way to talk about mental health. It is a paraphrased companion to the DSM-5-TR (American Psychiatric Association, 2022): a reference library of diagnostic criteria, specifiers, and differentials, wrapped in rules that keep the conversation safe and honest.
Why it matters: an AI without guardrails will happily answer "do I have bipolar disorder?" with a confident verdict. That is dangerous. This skill makes the AI do six things on every answer: triage safety first, use calibrated language ("consistent with" rather than "you have"), compare the presentation against actual criteria with met/unmet/unknown kept separate, reason through the differential, give concrete next steps, and end by handing the decision to a qualified clinician.
Everything below is a real conversation between a person and an AI running this skill. Nothing is fabricated or staged for effect. Each question was chosen to show a different thing the skill is good at.
A person describes weeks of low mood, lost interest, exhaustion, poor concentration, and broken sleep. The easy answer would be "yes, that sounds like depression." The skill instead holds the line: it names what fits, what is unknown, and what a clinician needs to check.
Person: For the past few weeks I've felt down almost every day, lost interest in things I used to love, I'm exhausted all the time, my concentration is shot, and I barely sleep. Could this be depression? What should I do?
AI:
Nothing you described indicates immediate danger, but safety comes first: are you thinking about dying, harming yourself, or feeling that others would be better off without you? If yes—especially if you have a plan, intent, or access to means—call your local emergency number or go to the nearest emergency department now, and don’t stay alone. In the United States, you can call or text 988 for immediate crisis support.
What you describe is consistent with a possible major depressive episode, but only a qualified clinician can determine whether it is depression.
How your symptoms compare with the criteria:
- Appears present: depressed mood, loss of interest or pleasure, insomnia, fatigue, and difficulty concentrating—five of the nine symptoms considered.
- Duration appears consistent: you report that this has lasted “a few weeks”; the threshold is at least two weeks.
- Clearly unmet: none can be identified from what you shared.
- Still unknown: whether the symptoms occur most of the day and represent a clear change from your usual functioning; how much they interfere with work, relationships, or self-care; appetite or weight changes; slowed or agitated movement; guilt or worthlessness; thoughts of death or suicide; and whether substances, medications, or a medical condition could explain the symptoms.
A clinician would also distinguish this from:
- Bipolar depression: the depressive symptoms can look identical, but any past period of unusually elevated or irritable mood, increased energy, much less need for sleep while still feeling rested, increased productivity, or risky behavior lasting several days would point toward bipolar illness.
- A medical, medication, or substance-related cause: thyroid problems, anemia, other medical conditions, medication effects, intoxication, or withdrawal can produce fatigue, poor concentration, sleep disruption, and low mood.
- A primary sleep problem: insomnia can itself cause exhaustion and concentration problems; an independent insomnia disorder generally lasts at least three months.
- Grief or an adjustment-related response: timing after a major loss or stressor matters. Grief often comes in waves linked to reminders, while a depressive episode more often involves persistent low mood and inability to anticipate pleasure.
Please arrange a prompt evaluation with a primary-care clinician or qualified mental-health professional. Bring a short timeline showing when each symptom began, whether it happens nearly every day, how your functioning has changed, your sleep pattern, and a list of medications and substances.
Useful questions to ask:
- “Do my symptoms meet the full criteria for a major depressive episode?”
- “Could a medical condition, medication, substance, or sleep disorder be contributing?”
- “What past signs of mania or hypomania should we check for?”
- “How should I track my mood, sleep, energy, and functioning between visits?”
The main uncertainties are safety, functional impact, exact daily pattern, possible past elevated-energy episodes, and medical or substance-related explanations. Those details could substantially change the picture.
What to notice: safety is triaged before any analysis. The answer says "consistent with," never "you have." It maps symptoms against the real 5-of-9 / two-week structure, flags what remains unknown, lists four alternative explanations, and hands the person four questions to bring to a clinician. It treats the absence of information as unknown, not as proof.
A family member describes a grandmother who believes people are stealing from her, hides money in the garden, and forgets conversations within minutes. The skill must do three things at once: answer about a third party without diagnosing her, flag a possible emergency, and stay in plain language.
Person: My grandmother keeps saying people are stealing from her and she's started hiding her money in the garden. She also forgets conversations minutes after having them. Is this dementia?
AI:
Nothing you described indicates immediate danger, but hiding money and believing it is being stolen creates financial and practical safety concerns. If this confusion appeared suddenly over hours or days, fluctuates during the day, or came with illness, surgery, medication changes, unusual drowsiness, or agitation, she needs urgent medical evaluation because delirium is a medical emergency.
What you describe is consistent with a possible neurocognitive disorder, sometimes called dementia when it is severe enough to impair independence. Forgetting conversations within minutes suggests difficulty learning and retaining recent information. Suspicious or persecutory beliefs can occur alongside neurocognitive disorders, including Alzheimer’s disease, Lewy body disease, and frontotemporal disorders. However, these observations alone cannot establish dementia or its cause.
Compared with the criteria:
- Appears present: A knowledgeable family member has noticed cognitive concerns, and her rapid forgetting suggests decline in learning and memory.
- Clearly absent: Nothing you’ve shared clearly rules a neurocognitive disorder out.
- Still unknown: Whether testing confirms objective decline; whether this is a change from her previous abilities; how long it has been happening; whether she still independently manages money, medications, driving, cooking, and other daily tasks; and whether delirium, depression, medications, substances, or another medical condition better explains it.
The distinction between mild and major neurocognitive disorder depends mainly on independence. If she can still manage daily responsibilities, though with extra effort or reminders, a clinician might assess for mild neurocognitive disorder. If she now needs help managing finances, medications, or other complex activities, major neurocognitive disorder becomes more concerning.
Other possibilities need to be distinguished:
- Delirium: sudden onset, fluctuating confusion, poor attention, or altered alertness—urgent medical evaluation is needed.
- Alzheimer’s-related decline: usually gradual, steadily progressive memory and learning difficulty.
- Lewy body disease: more likely with marked fluctuations, detailed visual hallucinations, dream-enactment behavior, or parkinsonian movement changes.
- Vascular causes: more likely after strokes or with a stepwise decline and periods of stability.
- Depression, medication effects, thyroid problems, vitamin B12 deficiency, or other medical conditions: can mimic or worsen cognitive decline.
- A primary psychotic disorder: considered when delusions are prominent, but new suspicious beliefs in later life—especially alongside memory loss—warrant a medical and cognitive assessment.
Arrange a prompt appointment with her primary-care clinician and bring a family member who knows her well. Bring a timeline of when the changes began, specific examples, a complete medication list, and notes about whether she is struggling with finances, medications, driving, or self-care. Because money is involved, discreetly check for unpaid bills, scams, exploitation, or misplaced funds while preserving her dignity.
Useful questions for the clinician are:
- “Could this be delirium or another treatable medical or medication-related problem?”
- “Can you assess her memory objectively and establish a baseline?”
- “Is she still safe to manage money, medications, and driving independently?”
- “What pattern or testing would help identify the likely cause?”
A qualified clinician must confirm whether this is dementia; the onset, course, objective testing, and effect on independence would change the picture most.
What to notice: the AI answers about a third party without ever diagnosing the grandmother. It separates "secondhand report" from established fact, flags delirium as the urgent possibility (a medical emergency, not a psychiatric one), considers financial exploitation without alarm, and gives the family concrete things to bring to a clinician.
This is the most important conversation the skill can have. A person says they have decided to end their life, with a plan and means. The skill's crisis protocol takes over completely: no symptom analysis, no criteria talk, no follow-up questions about duration. Just safety, immediately.
Person: I've been feeling completely hopeless for weeks and tonight I've decided I'm going to end it. I have a plan and I know exactly how I'd do it. Please help me.
AI:
What you’re describing is serious and deserves immediate help. Because you have decided to end your life and have a plan and means, call your local emergency number now or go to the nearest emergency department. In the United States, call 911; in the UK, 999; in the EU, 112.
Do not stay alone. If someone is nearby—a family member, friend, or colleague—tell them: “I am in immediate danger of suicide. I have a plan and the means. Please stay with me and call emergency services now.” Ask them to accompany you and stay until help arrives. If you are alone, call emergency services and stay on the line.
In the United States, you can also call or text 988 for the Suicide & Crisis Lifeline, available 24/7, but because you have a plan and means, please contact emergency services now. Outside the US, use your national crisis line in addition to emergency services.
Once you are connected to emergency help, I can help you prepare what to say to the professional you reach.
What to notice: the diagnostic conversation stops. There is no "consistent with," no criteria table, no differential. The skill knows the difference between this and a research question, and it acts accordingly: emergency numbers, do-not-stay-alone, a script to say to the person next to them, and an offer to help once connected to care. The full protocol, including how to adapt when the person at risk is someone else (a parent reporting a child), lives in the skill's safety reference.
Restlessness, poor concentration, racing thoughts, trouble sleeping. These four symptoms overlap ADHD and GAD, and a confident answer would be wrong. The skill gives the clinician what they actually need: the criteria structure of both conditions, the discriminating questions, and the adjacent differentials.
Person: I'm a clinician with a patient who reports restlessness, poor concentration, racing thoughts, and trouble sleeping. How do I work through whether this is adult ADHD or generalized anxiety?
AI:
Nothing described indicates immediate danger, but begin with direct screening for suicidal ideation, self-harm, violence risk, acute mania/psychosis, and marked functional deterioration.
The current symptom cluster overlaps with both adult ADHD and generalized anxiety disorder (GAD), but it is insufficient to favor either. The highest-yield discriminators are developmental onset, cross-setting persistence, the mechanism of inattention, worry breadth and controllability, and longitudinal course.
Potentially met from the report
- Poor concentration may correspond to difficulty sustaining attention.
- Restlessness may correspond to the adult manifestation of hyperactivity.
- Racing or unrelated thoughts may contribute to distractibility.
Unmet
- No ADHD criterion is clearly established as unmet from the available information.
Unknown
- Whether at least 5 of 9 inattentive symptoms and/or 5 of 9 hyperactive-impulsive symptoms have persisted for at least 6 months.
- Whether several symptoms were present before age 12.
- Whether several symptoms occur in two or more settings.
- Whether there is clear social, occupational, or academic impairment.
- Whether the pattern is persistent and trait-like rather than secondary to worry, mood episodes, sleep disturbance, substances, medications, or another condition.
For an adult assessment, corroborate childhood onset with school records or collateral where possible; retrospective recall alone is unreliable.
Potentially met from the report
- Three of the six associated symptom types are represented: restlessness, concentration difficulty, and sleep disturbance. This meets the adult numerical threshold only if they have occurred more days than not over the relevant six-month period.
Unmet
- No GAD criterion is clearly established as unmet from the available information.
Unknown
- Whether there is excessive anxiety and worry about multiple domains, occurring more days than not for at least 6 months.
- Whether the worry is difficult to control.
- Whether the associated symptoms meet the required frequency and duration.
- Whether there is clinically significant distress or impairment.
- Whether substances, medications, another medical condition, or another mental disorder better explain the presentation.
| Dimension | More consistent with ADHD | More consistent with GAD |
|---|---|---|
| Onset | Several symptoms before age 12 | Usually later; rarely begins before adolescence |
| Course | Persistent, trait-like, lifelong | Chronic but waxing and waning; worry more days than not for ≥6 months |
| Attention mechanism | Pulled away by novelty, external stimuli, or unrelated thoughts | Attention displaced by apprehensive worry or rumination |
| Context | Symptoms across at least two settings | Worry spans multiple content domains |
| Response to structure | May improve substantially with novelty, close supervision, frequent rewards, or highly interesting tasks | Worry tends to persist despite external structure |
| Associated pattern | Disorganization, forgetfulness, losing things, task incompletion, fidgeting, blurting, impatience | Fatigue, irritability, muscle tension, sleep disturbance, difficult-to-control worry |
Ask the patient to describe what happens immediately before concentration fails: “Was your attention captured by something more stimulating, or was it crowded out by worry about a future problem?” Also determine whether attentional dysfunction persists during relatively calm periods. Both disorders can coexist if each full criteria set is independently met.
- Bipolar-spectrum episode: Racing thoughts plus sleep difficulty warrants an episode screen. Distinguish insomnia—wanting to sleep but being unable—from decreased need for sleep, in which the patient feels rested after little sleep. Episodic elevated, expansive, or irritable mood with increased energy, goal-directed activity, grandiosity, or risky behavior argues away from trait-like ADHD or GAD. A full manic syndrome requires urgent evaluation.
- Substance/medication effects: Establish a timeline for caffeine, stimulants, cannabis, alcohol or sedative withdrawal, corticosteroids, thyroid preparations, bronchodilators, antidepressants, and other relevant exposures.
- Medical causes: Consider whether an endocrine, cardiovascular, respiratory, neurological, or sleep condition could account for new or atypical symptoms.
- Primary sleep disorder: Assess sleep opportunity, schedule, snoring or breathing pauses, daytime sleepiness, and whether cognitive symptoms follow sleep disruption.
- Depression, PTSD, or another anxiety disorder: Determine whether concentration problems are confined to depressive episodes, began after trauma with intrusion and avoidance, or are tied to a narrower fear theme.
- Build a symptom timeline covering childhood, adolescence, and adulthood, including whether the course is persistent or episodic.
- Complete symptom counts for both ADHD domains and all six GAD-associated symptoms.
- Document examples and impairment across home, school, work, and relationships.
- Obtain collateral history and available school or occupational records, especially for pre-12 ADHD symptoms.
- Characterize the thought content: unrelated distractors versus future-oriented, difficult-to-control worry across several domains.
- Review sleep, substances, medications, physical health, trauma, depressive symptoms, and lifetime manic or hypomanic episodes.
- Record each candidate explicitly as criteria met, unmet, or unknown, then reassess after the missing history is obtained.
At present, the uncertainty is substantial: the four reported symptoms establish overlap, not either syndrome. Childhood cross-setting symptoms would move ADHD forward; pervasive, difficult-to-control multidomain worry with the required six-month course would move GAD forward. Evidence supporting both patterns should prompt consideration of comorbidity rather than forcing a single explanation. Verify exact criteria wording and recording requirements against the official DSM-5-TR before formal diagnosis or documentation.
What to notice: no forced either/or. The skill says these four symptoms are insufficient, shows the criteria structure for both conditions side by side, and names the single highest-yield question ("what happens right before concentration fails?"). It adds the adjacent differentials a busy clinician might miss, including the bipolar screen and the decreased-need-for-sleep distinction. This is the skill working as a second set of eyes on a differential, not as a diagnostic oracle.
A person has already been diagnosed with borderline personality disorder and has read online that it means they are manipulative and untreatable. This is a different kind of question: the diagnosis is already given, and the skill's job is to explain it, correct the stigma, and not re-derive the diagnosis from symptoms.
Person: My doctor diagnosed me with borderline personality disorder. I read online that it means I'm manipulative and untreatable. Is that true?
AI:
Nothing you described suggests immediate danger. If you are currently thinking about suicide or self-harm, seek urgent professional help; in the United States, call or text 988, and call emergency services if danger is immediate.
No—borderline personality disorder does not mean you are manipulative or untreatable. It describes a pattern of intense, rapidly shifting emotions and relationships, fear of abandonment, an unstable sense of self, and impulsive or sometimes self-harming reactions. Those reactions may be attempts to cope with genuine pain; reducing them to “manipulation” is stigmatizing and can harm care. A diagnosis describes patterns and difficulties—not your character, intentions, or worth.
There is also real reason for hope. DSM-5-TR follow-up studies report that stable remissions lasting years are very common. Impulsive symptoms often improve most quickly, while emotional difficulties may improve more gradually. Recovery in day-to-day functioning can be less predictable, but the claim that BPD is “untreatable” is false.
Because your doctor has already diagnosed you, this message alone cannot verify the diagnosis:
- Met: Your report establishes only that a doctor assigned the diagnosis.
- Unmet: Nothing you wrote clearly shows that any criterion is absent.
- Unknown: Whether at least 5 of the 9 BPD features are present, whether the pattern is long-standing and widespread, whether it causes significant distress or impairment, and whether another condition, substance, medication, or medical issue better explains it.
Clinicians may also distinguish BPD from overlapping conditions. BPD-related emotional shifts are usually brief—hours to a few days—and often follow rejection, abandonment, or conflict. Bipolar II involves distinct hypomanic episodes lasting at least four days, often with decreased need for sleep. Trauma-related difficulties center on trauma reminders, intrusion, and avoidance. Separation anxiety can involve abandonment fears but does not usually include the same persistent identity and impulse-control difficulties. These conditions can also coexist.
Consider asking your doctor:
- “Which specific patterns led you to this diagnosis?”
- “What other explanations did you consider, and how did you distinguish them?”
- “What does recovery realistically look like for me?”
- “How can we discuss my difficulties without using stigmatizing labels such as ‘manipulative’?”
Only your clinician and a full history can clarify what the diagnosis means in your particular case. But the label does not establish that you are manipulative, bad, hopeless, or incapable of change.
What to notice: the skill does not re-derive the diagnosis. It takes the existing diagnosis as given, explains what the condition actually is, corrects both myths with evidence (including the follow-up remission data), and gives the person questions to ask their own doctor. This is the skill serving someone who is already in care, not just someone wondering.
A person wants a yes/no for a custody hearing. This is the question the skill must refuse, gracefully and completely: a secondhand account cannot establish a diagnosis, an AI opinion is not admissible evidence, and legal determinations are outside its scope.
Person: Just tell me straight: does my ex-husband have bipolar disorder? I need a clear answer for our custody hearing next month.
AI:
Nothing you described indicates immediate danger. If he is threatening harm, severely disorganized, psychotic, or behaving dangerously, seek an urgent professional evaluation or contact emergency services.
Straight answer: I cannot determine that your ex-husband has bipolar disorder—and there is not enough information here to support either “yes” or “no.” A secondhand account cannot establish a diagnosis, and an AI-generated opinion should not be used as evidence in a custody proceeding. Diagnosis and any custody-related assessment require appropriately qualified professionals.
Criteria comparison
- Met: No bipolar criteria are established from the information provided.
- Unmet: No criteria are clearly disproved either.
- Unknown: Whether he has ever had:
- A manic episode: at least one week of distinctly elevated, expansive, or irritable mood and increased energy, with the required accompanying symptoms and marked impairment, hospitalization, or psychosis.
- A hypomanic episode: at least four consecutive days of the same kind of clear, observable change, without marked impairment.
- A major depressive episode: at least five qualifying symptoms over two weeks, including depressed mood or loss of interest.
- A pattern caused instead by substances, medications, or another medical condition.
Other possibilities: Apparent “mood swings” can reflect anxiety, depression, ADHD, personality patterns, trauma-related symptoms, substance or medication effects, or medical conditions. Bipolar symptoms are distinguished mainly by discrete episodes, a clear change from baseline, increased energy, and decreased need for sleep—not simply anger, conflict, impulsivity, or difficult behavior.
For the hearing, focus on specific, dated, observable conduct and its effect on the children, rather than assigning a psychiatric label. A diagnosis alone does not establish dangerousness, impaired parenting, disability, or any legal conclusion. Ask your attorney whether a neutral, qualified forensic evaluation is appropriate and what admissible records or firsthand evidence the court requires.
Useful questions for the appropriate professional are:
- “What evidence would be required to assess bipolar disorder rather than ordinary mood changes or another condition?”
- “How will substance, medication, and medical causes be evaluated?”
- “How will actual parenting functioning and risk be assessed separately from any diagnosis?”
- “What collateral records or firsthand observations are appropriate to provide?”
The central uncertainty is that there is no direct clinical assessment, symptom timeline, collateral record, or exclusion of alternative causes. Only a qualified clinician can assess the diagnosis; the court’s legal questions require a qualified forensic professional.
What to notice: the skill holds the boundary without being cold. It says plainly that it cannot determine the diagnosis, explains why (secondhand account, no assessment, no evidence), refuses to speculate about a third party, distinguishes "diagnosis" from "legal conclusion" (a diagnosis does not establish dangerousness or parenting impairment), and points to the right professional. It even gives the person something useful: what to focus on instead of a label.
The demo above shows what the skill does. Equally important is what it refuses to do, every time:
- No diagnosis. It maps presentations to candidate conditions with "consistent with" language, never "you have X."
- No treatment or medication advice. It will not prescribe, dose, or stop anything. It offers questions to bring to the treating clinician.
- No legal, forensic, insurance, disability, or competency determinations. Those require qualified professionals and their own evidentiary standards.
- No crisis delay. If there is any indication of imminent danger, the conversation about diagnosis stops and the safety response begins.
- No invented codes. Codes, specifiers, and prevalence figures are cited only from the reference library; anything not verifiable is flagged and pointed to the official manual.
The skill is a directory of markdown references: foundation files (safety and boundaries, method, assessment), a chapter reference for each of the DSM-5-TR diagnostic classes, and cross-cutting differentials. The agent reads the skill's workflow, routes the question to the right reference, compares the presentation against the criteria, and answers in the register the person needs (criteria language for clinicians, plain language for patients and families). A keyword lookup script helps find the right chapter when the condition is not obvious.
It runs inside any agent that supports Agent Skills (Claude Code, Cursor, Hermes Agent, OpenHands, and others). There is no setup, no API key, no dependency: the skill is a folder of markdown.
- Repository: github.com/magnus919/agent-skills/tree/main/dsm5
- The reference library, the workflow, and the safety protocol are all in that directory. Install by pointing your agent at the
dsm5folder per the Agent Skills convention.
- This skill is a paraphrased companion, not the manual. Exact wording, codes, and recording procedures must be verified against the official DSM-5-TR before any formal clinical, legal, insurance, or research use.
- It is an educational and orientation tool. It is not a diagnostic instrument, and it does not replace a qualified clinician's evaluation.
- The conversations above were produced by an AI running the skill. They are demonstrations of the skill's behavior, not clinical advice, and not a substitute for professional care.
- If you or someone you know is in crisis: in the United States, call or text 988 (Suicide & Crisis Lifeline) or 911 in immediate danger; outside the US, use your national emergency number and crisis line.