К основному содержанию
скилл CX Codex

crisis-response-protocol — скилл для Claude Code

Скилл crisis-response-protocol помогает внедрить оценку кризисных сигналов и многоуровневые ответы в ИИ-коучинг. Нужен при разработке функций безопасности для таких чатов.

MIT 274 установок ★ 274 обновлён 2026-10-30

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add curiositech/some_claude_skills --skill crisis-response-protocol -a claude-code
Открыть на GitHub

Что делает crisis-response-protocol

Скилл описывает, как оценивать сообщения и историю общения, выделять признаки риска и выбирать действие: от спокойной проверки самочувствия до передачи ситуации на экстренное реагирование. Уровни учитывают сигналы в сообщении, ухудшение тенденции в отметках пользователя и нарастание тревоги в переписке.

В примерах есть TypeScript-интерфейсы для оценки и действий, а также шаблоны ответов для разных уровней. В обработчике чата оценка выполняется до генерации ответа ИИ; предусмотрены запись результата и передача критического случая на проверку человеком. ИИ не должен оставаться единственным ответчиком при остром кризисе.

Скилл предназначен для разработки функций, а не для помощи человеку, который прямо сейчас переживает кризис. В приведённых примерах указаны ресурсы США, включая 988 и 911, поэтому их нельзя без проверки переносить в другой регион.

Какие задачи решает

  • оценить сообщения на признаки кризиса
  • разделить сигналы риска по уровням
  • выбрать ответ для каждого уровня риска
  • передать критический случай на проверку человеком

Примеры запросов агенту

  • Добавь оценку кризисных сигналов перед генерацией ответа в обработчике чата.
  • Спроектируй уровни риска и соответствующие ответы для ИИ-коучинга.
  • Покажи, как передавать критический случай на проверку человеком.

Как установить crisis-response-protocol

1Через Skills CLI (Vercel)

npx skills add curiositech/some_claude_skills --skill crisis-response-protocol -a claude-code

2Вручную: положить файлы

~/.claude/skills/crisis-response-protocol/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/crisis-response-protocol/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о crisis-response-protocol

Как установить crisis-response-protocol в Claude Code?

Выполните npx skills add curiositech/some_claude_skills --skill crisis-response-protocol -a claude-code. Файл скилла находится в ~/.claude/skills/crisis-response-protocol/SKILL.md.

Что делает crisis-response-protocol?

Помогает реализовать оценку кризисных сигналов и выбирать реакцию чата по уровню риска. Также описывает передачу критических случаев человеку.

Можно ли использовать скилл для ответа человеку в кризисе?

Нет. Он предназначен для разработки функций кризисного реагирования; ИИ не должен быть единственным помощником при остром кризисе. Примеры ресурсов в скилле относятся к США.

Исходный текст

SKILL.md · MIT
---
name: crisis-response-protocol
description: Handle mental health crisis situations in AI coaching safely. Use when implementing crisis detection, safety protocols, emergency escalation, or suicide prevention features. Activates for crisis
  keywords, safety planning, hotline integration, and risk assessment.
allowed-tools: Read,Write,Edit
metadata:
  category: Lifestyle & Personal
  tags:
  - mental-health
  - crisis-intervention
  - safety
  pairs-with:
  - skill: crisis-detection-intervention-ai
    reason: Detection triggers the response protocol; they form a complete safety pipeline
  - skill: recovery-community-moderator
    reason: Community moderators need crisis response protocols for at-risk member interactions
  - skill: hipaa-compliance
    reason: Crisis responses involving health data must comply with HIPAA privacy requirements
---

# Crisis Response Protocol

This skill helps you implement safe crisis intervention features for the AI coaching system, following mental health best practices.

## When to Use

✅ **USE this skill for:**
- Implementing crisis detection in recovery/mental health apps
- Building safety planning features
- Integrating hotline and emergency resource displays
- Designing risk assessment interfaces
- Creating escalation protocols for AI chat systems

❌ **DO NOT use for:**
- **Responding to an actual crisis yourself** → Call 988 or emergency services
- General mental health content → use `sober-addict-protector` or `recovery-coach-patterns`
- Medical advice or diagnosis → Always defer to licensed professionals
- Replacing human crisis counselors → AI should augment, never replace

## Critical Safety Principle

> **AI should NEVER be the sole responder in acute crisis situations.**
> Always provide pathways to human support and emergency services.

## Crisis Detection

### Risk Indicator Categories

```typescript
interface RiskIndicators {
  // PRIMARY - Immediate escalation required
  primary: {
    suicidalIdeation: string[];      // "want to die", "end it all"
    selfHarmIntent: string[];         // "hurt myself", "cutting"
    homicidalIdeation: string[];      // "hurt someone"
    activeSubstanceEmergency: string[]; // "overdosed", "can't stop"
  };

  // SECONDARY - Elevated monitoring
  secondary: {
    severeDepression: string[];       // "hopeless", "no point"
    panicSymptoms: string[];          // "can't breathe", "heart racing"
    psychoticSymptoms: string[];      // "hearing voices"
    severeAnxiety: string[];          // "terrified", "losing control"
  };

  // TERTIARY - Check-in triggers
  tertiary: {
    isolationPatterns: string[];      // "no one cares", "alone"
    substanceRelapse: string[];       // "started using", "slipped"
    hopelessness: string[];           // "never get better"
  };
}
```

### Detection Implementation

```typescript
// src/lib/ai/crisis-detection.ts

export interface CrisisAssessment {
  level: 'none' | 'low' | 'medium' | 'high' | 'critical';
  indicators: string[];
  recommendedAction: CrisisAction;
  timestamp: Date;
}

export type CrisisAction =
  | 'continue_conversation'
  | 'gentle_check_in'
  | 'safety_resources'
  | 'crisis_protocol'
  | 'emergency_escalation';

export function assessCrisisLevel(
  messageContent: string,
  conversationHistory: Message[],
  userCheckInHistory: CheckIn[]
): CrisisAssessment {
  const indicators: string[] = [];
  let level: CrisisAssessment['level'] = 'none';

  // Check primary indicators (critical)
  if (hasPrimaryIndicators(messageContent)) {
    level = 'critical';
    indicators.push('primary_risk_detected');
  }

  // Check secondary indicators
  if (hasSecondaryIndicators(messageContent)) {
    level = level === 'none' ? 'high' : level;
    indicators.push('secondary_risk_detected');
  }

  // Check pattern indicators from history
  if (hasWorseningPattern(userCheckInHistory)) {
    level = level === 'none' ? 'medium' : level;
    indicators.push('worsening_trend');
  }

  // Check conversation escalation
  if (hasEscalatingDistress(conversationHistory)) {
    level = level === 'none' ? 'medium' : level;
    indicators.push('escalating_distress');
  }

  return {
    level,
    indicators,
    recommendedAction: getRecommendedAction(level),
    timestamp: new Date(),
  };
}
```

## Tiered Response Protocol

### Level 1: Continue Conversation (No Crisis)
Normal AI coaching interaction.

### Level 2: Gentle Check-In (Low Risk)

```typescript
const gentleCheckInResponse = `
I want to make sure I understand how you're feeling.
It sounds like you're going through a difficult time.

Would you like to:
- Talk more about what's on your mind?
- Try a grounding exercise together?
- Look at some coping strategies?

I'm here to listen.
`;
```

### Level 3: Safety Resources (Medium Risk)

```typescript
const safetyResourcesResponse = `
I hear that you're struggling, and I want you to know that support is available.

Here are some resources that might help:
📞 988 Suicide & Crisis Lifeline: Call or text 988
💬 Crisis Text Line: Text HOME to 741741
🌐 SAMHSA Helpline: 1-800-662-4357

Would you like to talk about what's going on, or would connecting with one of these resources feel right?
`;
```

### Level 4: Crisis Protocol (High Risk)

```typescript
const crisisProtocolResponse = `
I'm concerned about what you've shared, and I want to make sure you're safe.

Right now, I'd like you to consider reaching out to someone who can help:

🆘 If you're in immediate danger: Call 911
📞 988 Suicide & Crisis Lifeline: Call or text 988 (24/7)
💬 Crisis Text Line: Text HOME to 741741

These are trained counselors who understand what you're going through.

Is there someone you trust - a friend, family member, or sponsor - who you could reach out to right now?

I'm still here with you.
`;
```

### Level 5: Emergency Escalation (Critical)

```typescript
const emergencyResponse = `
I'm very concerned about your safety right now.

🆘 Please call 911 or go to your nearest emergency room immediately.

If you can't do that, please call 988 right now - they can help.

Your life matters. Please reach out for help right now.

[EMERGENCY CONTACTS DISPLAYED]
`;

// System action: Flag for human review, notify emergency contact if configured
```

## Implementation in Chat Handler

```typescript
// src/lib/ai/chat-handler.ts

export async function handleChatMessage(
  message: string,
  conversationId: string,
  userId: string
): Promise<ChatResponse> {
  // 1. Assess crisis level BEFORE generating AI response
  const crisisAssessment = await assessCrisisLevel(
    message,
    await getConversationHistory(conversationId),
    await getUserCheckIns(userId, 7)
  );

  // 2. Log assessment (for safety review)
  await logCrisisAssessment(userId, conversationId, crisisAssessment);

  // 3. Handle based on level
  if (crisisAssessment.level === 'critical') {
    // Don't use AI - provide immediate crisis response
    await notifyEmergencyContact(userId);
    await flagForHumanReview(conversationId, 'critical_crisis');

    return {
      message: emergencyResponse,
      showEmergencyContacts: true,
      disableChat: true,  // Prevent further AI interaction
      crisisLevel: 'critical',
    };
  }

  if (crisisAssessment.level === 'high') {
    // Provide crisis resources, continue with caution
    await flagForHumanReview(conversationId, 'high_risk');

    return {
      message: crisisProtocolResponse,
      showCrisisResources: true,
      crisisLevel: 'high',
    };
  }

  // 4. For lower levels, proceed with AI but inject safety context
  const systemPrompt = getSystemPromptWithSafetyContext(crisisAssessment);

  const aiResponse = await generateAIResponse(message, systemPrompt);

  // 5. Post-process AI response for safety
  const safeResponse = await validateResponseSafety(aiResponse);

  return {
    message: safeResponse,
    crisisLevel: crisisAssessment.level,
  };
}
```

## Safety Resources Database

```typescript
// src/lib/crisis/resources.ts

export const crisisResources = {
  national: [
    {
      name: '988 Suicide & Crisis Lifeline',
      phone: '988',
      text: '988',
      url: 'https://988lifeline.org',
      available: '24/7',
      description: 'Free, confidential crisis support',
    },
    {
      name: 'Crisis Text Line',
      text: 'HOME to 741741',
      url: 'https://www.crisistextline.org',
      available: '24/7',
      description: 'Text-based crisis support',
    },
    {
      name: 'SAMHSA National Helpline',
      phone: '1-800-662-4357',
      url: 'https://www.samhsa.gov/find-help/national-helpline',
      available: '24/7',
      description: 'Substance abuse and mental health referrals',
    },
  ],

  recovery: [
    {
      name: 'AA Hotline',
      phone: '1-800-839-1686',
      url: 'https://www.aa.org',
      description: 'Alcoholics Anonymous support',
    },
    {
      name: 'NA Helpline',
      phone: '1-818-773-9999',
      url: 'https://na.org',
      description: 'Narcotics Anonymous support',
    },
  ],

  specialized: [
    {
      name: 'Veterans Crisis Line',
      phone: '988 (press 1)',
      text: '838255',
      description: 'For veterans and service members',
    },
    {
      name: 'Trevor Project',
      phone: '1-866-488-7386',
      text: 'START to 678-678',
      description: 'LGBTQ+ youth crisis support',
    },
  ],
};
```

## Emergency Contact System

```typescript
// src/lib/crisis/emergency-contacts.ts

export async function notifyEmergencyContact(userId: string): Promise<void> {
  const contacts = await getEmergencyContacts(userId);

  if (contacts.length === 0) {
    // Log that no emergency contact was available
    await logCrisisEvent(userId, 'no_emergency_contact');
    return;
  }

  const primaryContact = contacts[0];

  // Send notification (SMS, email, or push)
  await sendEmergencyNotification(primaryContact, {
    type: 'crisis_alert',
    message: `${userName} may be in crisis and could use your support. ` +
             `Please reach out to them if you can.`,
    // Never include conversation content - privacy
  });

  // Audit log
  await logCrisisEvent(userId, 'emergency_contact_notified', {
    contactId: primaryContact.id,
  });
}
```

## Safety Guardrails for AI

```typescript
// Prompt injection for safety context
const safetySystemPrompt = `
CRITICAL SAFETY INSTRUCTIONS:
1. You are NOT a therapist or crisis counselor
2. For ANY mention of self-harm, suicide, or harming others:
   - Express genuine concern
   - Provide crisis resources (988, Crisis Text Line)
   - Encourage professional help
   - Do NOT attempt to counsel through crisis
3. Never minimize feelings or use toxic positivity
4. Never promise confidentiality about safety concerns
5. Always validate emotions while encouraging professional support
6. If user mentions relapse, acknowledge and provide SAMHSA helpline
`;

// Response validation
async function validateResponseSafety(response: string): Promise<string> {
  const unsafePatterns = [
    /don't (call|reach out|get help)/i,
    /you don't need (help|therapy|a professional)/i,
    /just (think positive|be happy|get over it)/i,
    /it's not that (bad|serious)/i,
  ];

  for (const pattern of unsafePatterns) {
    if (pattern.test(response)) {
      // Flag for review and return safe fallback
      await flagForReview('unsafe_response_pattern');
      return getSafeFallbackResponse();
    }
  }

  return response;
}
```

## Audit & Compliance

```typescript
// All crisis events must be logged for review
export async function logCrisisEvent(
  userId: string,
  eventType: CrisisEventType,
  details?: Record<string, unknown>
): Promise<void> {
  await db.insert(crisisEvents).values({
    id: generateId(),
    userId,
    eventType,
    details: JSON.stringify(sanitizeDetails(details)),
    createdAt: new Date(),
    reviewed: false,  // Requires human review
  });

  // Critical events trigger immediate notification
  if (isCriticalEvent(eventType)) {
    await notifyOnCallStaff(userId, eventType);
  }
}
```

## Testing Crisis Features

```typescript
// NEVER use real crisis content in tests
describe('Crisis Detection', () => {
  it('detects high-risk indicators', () => {
    // Use clearly artificial test phrases
    const result = assessCrisisLevel(
      '[TEST_HIGH_RISK_INDICATOR]',
      [],
      []
    );
    expect(result.level).toBe('high');
  });

  it('provides appropriate resources', () => {
    const response = getCrisisResponse('high');
    expect(response).toContain('988');
    expect(response).toContain('Crisis Text Line');
  });
});
```

## References

- [988 Suicide & Crisis Lifeline](https://988lifeline.org)
- [SAMHSA Guidelines](https://www.samhsa.gov)
- [AI in Mental Health - PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC10242473/)
- [Crisis Chatbot Safety - Nature](https://www.nature.com/articles/s41598-025-17242-4)

© curiositech · MIT · curiositech/some_claude_skills

Похожие скиллы

Все скиллы по теме «ИИ и ML» →
crisis-communications jamditis Скилл crisis-communications задаёт регламенты экстренной верификации фактов и шаблоны заявлений при кризисах. CX Codex +1 232установок crisis-response-planner aaron-he-zhu Скилл crisis-response-planner собирает протокол кризисов в соцсетях: уровни серьёзности, паузу публикаций, библиотеку заявлений и порядок возврата к обычной работе. CX Codex +1 1 100установок crisis-holding elvisun Скилл crisis-holding помогает составить сдержанное заявление при сбоях или утечках данных. Скилл отсекает лишние обещания и требует опираться строго на проверенные факты. CX Codex +1 764установок gws-modelarmor-sanitize-response официальный googleworkspace Скилл gws-modelarmor-sanitize-response для Claude Code отправляет ответ модели в Google Model Armor на проверку по шаблону. Фильтрует текст перед показом пользователю. CX Codex +1 30 600установок aia-generation официальный anthropics Скилл aia-generation проводит оценку влияния ИИ-системы: разбор кейса, анализ рисков, классификация по регуляторным режимам и рекомендация с условиями. CX Codex +1 633установок nist-ai-rmf mastepanoski Проводит аудит рисков ИИ-систем по фреймворку NIST AI RMF 1.0 через четыре функции: Govern, Map, Measure и Manage. CX Codex +1 251установок

Из того же набора180

Весь набор →
adhd-design-expert Скилл adhd-design-expert помогает проектировать интерфейсы с учётом особенностей СДВГ: уменьшать когнитивную нагрузку, делать время наглядным и поддерживать пользователя без стыдящих сообщений. CX Codex +1 287установок document-generation-pdf Скилл document-generation-pdf для Claude Code создаёт, заполняет и собирает PDF-документы. Активируется для генерации PDF, заполнения форм и цифровых подписей. CX Codex +1 283установок neobrutalist-web-designer Скилл neobrutalist-web-designer для Claude Code задаёт стиль веб-интерфейсов: крупная типографика, чёрные границы и жёсткие тени. Оформляет дашборды, магазины и лендинги. CX Codex +1 279установок wisdom-accountability-coach Скилл wisdom-accountability-coach отслеживает долгосрочные цели, подмечает расхождения между словами и делами и разбирает трудности через стоицизм и буддизм. Помогает держать слово перед собой. CX Codex +1 278установок partner-text-coach Скилл partner-text-coach для Claude Code и Codex разбирает эмоциональный подтекст сообщений партнёра и предлагает варианты ответа. Помогает подобрать слова и снизить напряжение в переписке. CX Codex +1 271установок hand-drawn-infographic-creator Скилл hand-drawn-infographic-creator для Claude Code создаёт схемы и инфографику в стиле анатомического блокнота для материалов о восстановлении, нейронауке и социальных ситуациях. CX Codex +1 269установок fancy-yard-landscaper Скилл fancy-yard-landscaper для Claude Code разбирает фотографии двора, подбирает растения с учётом климата и условий и рисует план посадок. Помогает спланировать посадки на конкретном участке. CX Codex +1 268установок ux-friction-analyzer Скилл ux-friction-analyzer проверяет интерфейсы на когнитивную нагрузку, точки трения и соответствие гештальт-принципам. Пригодится при проектировании новых экранов или адаптации сценариев под СДВГ. CX Codex +1 266установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой