Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

crisis-response-protocol危机应对协议

Agent Skill

crisis-response-protocol 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,301

周安装

94

GitHub Stars

98

下载量

737
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:crisis-response-protocol(危机应对协议)
来源仓库:https://github.com/erichowens/some_claude_skills
仓库路径:skills/crisis-response-protocol
安装命令:
npx skills add https://github.com/erichowens/some_claude_skills --skill crisis-response-protocol
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/erichowens/some_claude_skills --skill crisis-response-protocol

简介

crisis-response-protocol 为 AI 系统设计安全的危机干预功能,遵循心理健康最佳实践。

  • 适用于在 Codex、Claude、Cursor、Gemini CLI 中集成风险检测、资源展示与升级流程。
  • 可嵌入 hotline 显示、风险评估界面与安全计划生成模块,支持 chatbot 场景扩展。
  • 严禁用于直接响应真实危机,所有功能需配合人工监督与应急预案使用。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

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

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

// 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)

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)

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)

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)

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

// 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

// 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

// 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

// 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

// 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

// 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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.35%
按下载量换算216

windsurf

21.58%
按下载量换算159

Antigravity

17.17%
按下载量换算127

OpenCode

13.35%
按下载量换算98

Gemini CLI

6.62%
按下载量换算49

Codex

3.41%
按下载量换算25

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills