Emergency card

From diegosouzapw/awesome-omni-skills · View interactive version

Emergency card is an AI agent skill from the GitHub repository diegosouzapw/awesome-omni-skills. \u7d27\u6025\u533b\u7597\u4fe1\u606f\u5361\u751f\u6210\u5668 workflow skill. Use this skill when the user needs \u751f\u6210\u7d27\u6025\u60c5\u51b5\u4e0b\u5feb\u901f\u8bbf\u95ee\u7684\u533b\u7597\u4fe1\u606f\u6458\u8981\u5361\u7247\u3002\u5f53\u7528\u6237\u9700\u8981\u65c5\u884c\u3001\u5c31\u8bca\u

How to use this skill

Skill file

紧急医疗信息卡生成器

Overview

This public intake copy packages plugins/antigravity-awesome-skills-claude/skills/emergency-card from https://github.com/sickn33/antigravity-awesome-skills into the native Omni Skills editorial shape without hiding its origin.

Use it when the operator needs the upstream workflow, support files, and repository context to stay intact while the public validator and private enhancer continue their normal downstream flow.

This intake keeps the copied upstream files intact and uses the external_source block in metadata.json plus ORIGIN.md as the provenance anchor for review.

紧急医疗信息卡生成器 生成紧急情况下快速访问的医疗信息摘要,用于急救或就医。

Imported source sections that did not map cleanly to the public headings are still preserved below or in the support files. Notable imported sections: 核心功能, 使用说明, 数据源, 安全性原则, 错误处理, 示例输出.

When to Use This Skill

Use this section as the trigger filter. It should make the activation boundary explicit before the operator loads files, runs commands, or opens a pull request.

Operating Table

| Situation | Start here | Why it matters |

| --- | --- | --- |

| First-time use | metadata.json | Confirms repository, branch, commit, and imported path through the external_source block before touching the copied workflow |

| Provenance review | ORIGIN.md | Gives reviewers a plain-language audit trail for the imported source |

| Workflow execution | SKILL.md | Starts with the smallest copied file that materially changes execution |

| Supporting context | SKILL.md | Adds the next most relevant copied source file without loading the entire package |

| Handoff decision | ## Related Skills | Helps the operator switch to a stronger native skill when the task drifts |

Workflow

This workflow is intentionally editorial and operational at the same time. It keeps the imported source useful to the operator while still satisfying the public intake standards that feed the downstream enhancer flow.

  1. Confirm the user goal, the scope of the imported workflow, and whether this skill is still the right router for the task.
  2. Read the overview and provenance files before loading any copied upstream support files.
  3. Load only the references, examples, prompts, or scripts that materially change the outcome for the current request.
  4. Execute the upstream workflow while keeping provenance and source boundaries explicit in the working notes.
  5. Validate the result against the upstream expectations and the evidence you can point to in the copied files.
  6. Escalate or hand off to a related skill when the work moves out of this imported workflow's center of gravity.
  7. Before merge or closure, record what was used, what changed, and what the reviewer still needs to verify.

Imported Workflow Notes

Imported: 核心功能

1. 紧急信息提取

从用户的健康数据中提取最关键的信息:

2. 信息优先级排序

按照医疗紧急程度对信息排序:

  1. P0 - 危急信息:过敏性休克、严重药物过敏、危及生命的疾病
  2. P1 - 重要信息:当前用药、慢性病、植入物
  3. P2 - 一般信息:血型、年龄、体重、最近检查

3. 多格式输出

支持多种输出格式以适应不同场景:

HTML格式(新增)

生成独立的HTML文件,包含:

使用方式:

# 生成标准卡片
python scripts/generate_emergency_card.py

# 指定卡片类型
python scripts/generate_emergency_card.py standard
python scripts/generate_emergency_card.py child
python scripts/generate_emergency_card.py elderly
python scripts/generate_emergency_card.py severe

# 指定打印尺寸
python scripts/generate_emergency_card.py standard a4       # A4标准
python scripts/generate_emergency_card.py standard wallet   # 钱包卡
python scripts/generate_emergency_card.py standard large    # 大字版(老年)

输出文件:emergency-cards/emergency-card-{variant}-{YYYY-MM-DD}.html

4. 离线可用

Examples

Example 1: Ask for the upstream workflow directly

Use @emergency-card to handle <task>. Start from the copied upstream workflow, load only the files that change the outcome, and keep provenance visible in the answer.

Explanation: This is the safest starting point when the operator needs the imported workflow, but not the entire repository.

Example 2: Ask for a provenance-grounded review

Review @emergency-card against metadata.json and ORIGIN.md, then explain which copied upstream files you would load first and why.

Explanation: Use this before review or troubleshooting when you need a precise, auditable explanation of origin and file selection.

Example 3: Narrow the copied support files before execution

Use @emergency-card for <task>. Load only the copied references, examples, or scripts that change the outcome, and name the files explicitly before proceeding.

Explanation: This keeps the skill aligned with progressive disclosure instead of loading the whole copied package by default.

Example 4: Build a reviewer packet

Review @emergency-card using the copied upstream files plus provenance, then summarize any gaps before merge.

Explanation: This is useful when the PR is waiting for human review and you want a repeatable audit packet.

Best Practices

Treat the generated public skill as a reviewable packaging layer around the upstream repository. The goal is to keep provenance explicit and load only the copied source material that materially improves execution.

Troubleshooting

Problem: The operator skipped the imported context and answered too generically

Symptoms: The result ignores the upstream workflow in plugins/antigravity-awesome-skills-claude/skills/emergency-card, fails to mention provenance, or does not use any copied source files at all.

Solution: Re-open metadata.json, ORIGIN.md, and the most relevant copied upstream files. Check the external_source block first, then restate the provenance before continuing.

Problem: The imported workflow feels incomplete during review

Symptoms: Reviewers can see the generated SKILL.md, but they cannot quickly tell which references, examples, or scripts matter for the current task.

Solution: Point at the exact copied references, examples, scripts, or assets that justify the path you took. If the gap is still real, record it in the PR instead of hiding it.

Problem: The task drifted into a different specialization

Symptoms: The imported skill starts in the right place, but the work turns into debugging, architecture, design, security, or release orchestration that a native skill handles better.

Solution: Use the related skills section to hand off deliberately. Keep the imported provenance visible so the next skill inherits the right context instead of starting blind.

Related Skills

Additional Resources

Use this support matrix and the linked files below as the operator packet for this imported skill. They should reflect real copied source material, not generic scaffolding.

| Resource family | What it gives the reviewer | Example path |

| --- | --- | --- |

| references | copied reference notes, guides, or background material from upstream | references/n/a |

| examples | worked examples or reusable prompts copied from upstream | examples/n/a |

| scripts | upstream helper scripts that change execution or validation | scripts/n/a |

| agents | routing or delegation notes that are genuinely part of the imported package | agents/n/a |

| assets | supporting assets or schemas copied from the source package | assets/n/a |

Imported Reference Notes

Imported: 使用说明

触发条件

当用户提到以下场景时,使用此技能:

执行步骤

步骤 1: 读取用户基础数据

从以下数据源读取信息:

// 1. 用户档案
const profile = readFile('data/profile.json');

// 2. 过敏史
const allergies = readFile('data/allergies.json');

// 3. 当前用药
const medications = readFile('data/medications/medications.json');

// 4. 辐射记录
const radiation = readFile('data/radiation-records.json');

// 5. 手术记录(查找植入物)
const surgeries = glob('data/手术记录/**/*.json');

// 6. 出院小结(查找急症)
const dischargeSummaries = glob('data/出院小结/**/*.json');
步骤 2: 提取关键信息
2.1 基础信息
const basicInfo = {
  name: profile.basic_info?.name || "未设置",
  age: calculateAge(profile.basic_info?.birth_date),
  gender: profile.basic_info?.gender || "未设置",
  blood_type: profile.basic_info?.blood_type || "未知",
  weight: `${profile.basic_info?.weight} ${profile.basic_info?.weight_unit}`,
  height: `${profile.basic_info?.height} ${profile.basic_info?.height_unit}`,
  bmi: profile.calculated?.bmi,
  emergency_contacts: profile.emergency_contacts || []
};
2.2 严重过敏
// 过滤出3-4级严重过敏
const criticalAllergies = allergies.allergies
  .filter(a => a.severity_level >= 3 && a.current_status.status === 'active')
  .map(a => ({
    allergen: a.allergen.name,
    severity: `过敏${getSeverityLabel(a.severity_level)}(${a.severity_level}级)`,
    reaction: a.reaction_description,
    diagnosed_date: a.diagnosis_date
  }));
2.3 慢性疾病诊断(新增)
// 从慢性病管理数据中提取诊断信息
const chronicConditions = [];

// 高血压
try {
  const hypertensionData = readFile('data/hypertension-tracker.json');
  if (hypertensionData.hypertension_management?.diagnosis_date) {
    chronicConditions.push({
      condition: '高血压',
      diagnosis_date: hypertensionData.hypertension_management.diagnosis_date,
      classification: hypertensionData.hypertension_management.classification,
      current_bp: hypertensionData.hypertension_management.average_bp,
      risk_level: hypertensionData.hypertension_management.cardiovascular_risk?.risk_level
    });
  }
} catch (e) {
  // 文件不存在或读取失败,跳过
}

// 糖尿病
try {
  const diabetesData = readFile('data/diabetes-tracker.json');
  if (diabetesData.diabetes_management?.diagnosis_date) {
    chronicConditions.push({
      condition: diabetesData.diabetes_management.type === 'type_1' ? '1型糖尿病' : '2型糖尿病',
      diagnosis_date: diabetesData.diabetes_management.diagnosis_date,
      duration_years: diabetesData.diabetes_management.duration_years,
      hba1c: diabetesData.diabetes_management.hba1c?.history?.[0]?.value,
      control_status: diabetesData.diabetes_management.hba1c?.achievement ? '控制良好' : '需改善'
    });
  }
} catch (e) {
  // 文件不存在或读取失败,跳过
}

// COPD
try {
  const copdData = readFile('data/copd-tracker.json');
  if (copdData.copd_management?.diagnosis_date) {
    chronicConditions.push({
      condition: '慢阻肺(COPD)',
      diagnosis_date: copdData.copd_management.diagnosis_date,
      gold_grade: `GOLD ${copdData.copd_management.gold_grade}级`,
      cat_score: copdData.copd_management.symptom_assessment?.cat_score?.total_score,
      exacerbations_last_year: copdData.copd_management.exacerbations?.last_year
    });
  }
} catch (e) {
  // 文件不存在或读取失败,跳过
}
2.4 当前用药
// 只包含活跃的药物
const currentMedications = medications.medications
  .filter(m => m.active === true)
  .map(m => ({
    name: m.name,
    dosage: `${m.dosage.value}${m.dosage.unit}`,
    frequency: getFrequencyLabel(m.frequency),
    instructions: m.instructions,
    warnings: m.warnings || []
  }));
2.4 医疗状况

从出院小结中提取诊断信息:

const medicalConditions = dischargeSummaries
  .flatMap(ds => {
    const data = readFile(ds.file_path);
    return data.diagnoses || [];
  })
  .map(d => ({
    condition: d.condition,
    diagnosis_date: d.date,
    status: d.status || "随访中"
  }));
2.5 植入物

从手术记录中提取植入物信息:

const implants = surgeries
  .flatMap(s => {
    const data = readFile(s.file_path);
    return data.procedure?.implants || [];
  })
  .map(i => ({
    type: i.type,
    implant_date: i.date,
    hospital: i.hospital,
    notes: i.notes
  }));
2.6 近期辐射暴露
const recentRadiation = {
  total_dose_last_year: calculateTotalDose(radiation.records, 'last_year'),
  last_exam: radiation.records[radiation.records.length - 1]
};
步骤 3: 生成信息卡片

按照优先级组织信息:

const emergencyCard = {
  version: "1.0",
  generated_at: new Date().toISOString(),
  basic_info: basicInfo,
  critical_allergies: criticalAllergies.sort(bySeverityDesc),
  current_medications: currentMedications,
  medical_conditions: [...medicalConditions, ...chronicConditions], // 合并急症和慢性病
  implants: implants,
  recent_radiation_exposure: recentRadiation,
  disclaimer: "此信息卡仅供参考,不替代专业医疗诊断",
  data_source: "my-his个人健康信息系统",
  chronic_conditions: chronicConditions // 单独字段便于访问
};
步骤 4: 格式化输出
JSON格式

直接输出结构化JSON数据。

文本格式

生成易读的文本卡片:

╔═══════════════════════════════════════════════════════════╗
║                  紧急医疗信息卡                          ║
╠═══════════════════════════════════════════════════════════╣
║ 姓名:张三                      年龄:35岁               ║
║ 血型:A+                       体重:70kg                ║
╠═══════════════════════════════════════════════════════════╣
║ 🆘 严重过敏                                              ║
║ ─────────────────────────────────────────────────────── ║
║ • 青霉素 - 过敏性休克(4级)🆘                          ║
║   反应:呼吸困难、喉头水肿、意识丧失                     ║
╠═══════════════════════════════════════════════════════════╣
║ 💊 当前用药                                              ║
║ ─────────────────────────────────────────────────────── ║
║ • 氨氯地平 5mg - 每日1次(高血压)                      ║
║ • 二甲双胍 1000mg - 每日2次(糖尿病)                    ║
╠═══════════════════════════════════════════════════════════╣
║ 🏥 慢性疾病                                              ║
║ ─────────────────────────────────────────────────────── ║
║ • 高血压(2023-01-01诊断,1级,控制中)                 ║
║   平均血压:132/82 mmHg                                 ║
║ • 2型糖尿病(2022-05-10诊断,HbA1c 6.8%)              ║
║   控制状态:良好                                        ║
║ • 慢阻肺(2020-03-15诊断,GOLD 2级)                    ║
║   CAT评分:18分                                        ║
╠═══════════════════════════════════════════════════════════╣
║ 🏥 其他疾病                                              ║
║ ─────────────────────────────────────────────────────── ║
║ (其他急症或手术诊断,如有)                            ║
╠═══════════════════════════════════════════════════════════╣
║ 📿 植入物                                                ║
║ ─────────────────────────────────────────────────────── ║
║ • 心脏起搏器(2022-06-10植入)                           ║
║   医院:XX医院                                           ║
║   注意:定期复查,避免MRI检查                            ║
╠═══════════════════════════════════════════════════════════╣
║ 📞 紧急联系人                                            ║
║ ─────────────────────────────────────────────────────── ║
║ • 李四(配偶)- 138****1234                              ║
╠═══════════════════════════════════════════════════════════╣
║ ⚠️  免责声明                                            ║
║ 此信息卡仅供参考,不替代专业医疗诊断                     ║
║ 生成时间:2025-12-31 12:34:56                            ║
╚═══════════════════════════════════════════════════════════╝
二维码格式

将JSON数据转换为二维码图片:

const qrCode = generateQRCode(JSON.stringify(emergencyCard));
emergencyCard.qr_code = qrCode;
步骤 5: 保存文件

根据用户选择的格式保存文件:

// JSON格式
saveFile('emergency-card.json', JSON.stringify(emergencyCard, null, 2));

// 文本格式
saveFile('emergency-card.txt', generateTextCard(emergencyCard));

// 二维码格式
saveFile('emergency-card-qr.png', emergencyCard.qr_code);
步骤 6: 输出确认信息
✅ 紧急医疗信息卡已生成

文件位置:data/emergency-cards/emergency-card-2025-12-31.json
生成时间:2025-12-31 12:34:56

包含信息:
━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ 基础信息(姓名、年龄、血型)
✓ 严重过敏(1项4级过敏)
✓ 当前用药(2种药物)
✓ 医疗状况(2种疾病)
✓ 植入物(1项)
✓ 紧急联系人(1人)

💡 使用建议:
━━━━━━━━━━━━━━━━━━━━━━━━━━
• 将JSON文件保存到手机云盘
• 将二维码保存到手机相册
• 打印文本版随身携带
• 旅行前更新信息

⚠️  注意事项:
━━━━━━━━━━━━━━━━━━━━━━━━━━
• 此信息卡仅供参考,不替代专业医疗诊断
• 定期更新(建议每3个月或健康信息变化后)
• 如有严重过敏,请随身携带过敏急救卡
Imported: 数据源

主要数据源

慢性病数据源(新增)

辅助数据源

可选数据源

Imported: 安全性原则

必须遵循

信息准确度

隐私保护

Imported: 错误处理

数据缺失

文件读取失败

二维码生成失败

Imported: 示例输出

完整示例请参考相关文档。

Imported: 测试数据

测试数据请参考相关文档。

Imported: 格式说明

详细格式请参考相关文档。

Imported: Limitations
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.