WellAlly-health: Command for Claude Code

.claude/commands/surgery.md

surgery is a command for Claude Code from huifer/WellAlly-health. It costs 5 tokens per session (2,261 once invoked), scanned A, original, MIT.

A command for recording a person's surgical history from a plain-language description, including the operation, date, reason, body part, and related details.

In plain words
What is it for?
Use it to record past operations, capture details such as anesthesia or hospital when available, confirm whether implants were used, and save the record as JSON.
Why use it?
It turns scattered surgery information into a structured record and prompts for important implant information.

Command for Claude Code

Written for Claude Code: arguments in frontmatter.

This is huifer/WellAlly-health's own configuration. It tells Claude Code how to work on WellAlly-health itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything WellAlly-health configures →

Reuse

Borrowing it

Nothing to install: this file belongs to huifer/WellAlly-health. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/huifer/WellAlly-health/main/.claude/commands/surgery.md
Clone the repo
git clone --depth 1 https://github.com/huifer/WellAlly-health

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for surgery

README.md
[![agentmods](https://agentmods.dev/badge/commands/huifer/wellally-health/surgery/github.svg)](https://agentmods.dev/commands/huifer/wellally-health/surgery)
Your own site
<a href="https://agentmods.dev/commands/huifer/wellally-health/surgery"><img src="https://agentmods.dev/badge/commands/huifer/wellally-health/surgery/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for surgery

Your own site · 80×15
<a href="https://agentmods.dev/commands/huifer/wellally-health/surgery"><img src="https://agentmods.dev/badge/commands/huifer/wellally-health/surgery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,261 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00005 $0.02261
Opus 5 $0.00003 $0.01130
Sonnet 5 $0.00001 $0.00452
Haiku 4.5 $0.00001 $0.00226

Measured 10d ago against content hash 20d07ebba768, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

surgery scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/surgery.md · 264 lines

How it starts

The opening of the file, as written. The whole thing — 264 lines — stays where its author put it; the contents beside it link to each section on GitHub.

个人手术历史记录

用于记录个人的手术历史,从自然语言描述中提取结构化手术信息。

参数说明

  • description(必填):一句话描述手术信息,可以包含:
    • 手术名称(医学术语或通俗名称)
    • 手术日期
    • 手术原因/诊断
    • 手术部位
    • 其他相关信息

执行步骤

1. 解析用户输入

从用户的自然语言描述中提取以下信息:

必需字段:

  • 手术全称(医学术语):如"腹腔镜下胆囊切除术"
  • 手术别称(通俗描述):如"胆囊微创手术"
  • 手术原因/术前诊断:如"慢性结石性胆囊炎"
  • 手术日期(年月日):如"2024-08-15"
  • 手术身体部位:如"腹部"

可选字段(从描述中提取或询问):

  • 手术类型: elective(择期手术)/ emergency(急诊手术)/ day_surgery(日间手术)
  • 麻醉方式:全身麻醉/局部麻醉/椎管内麻醉/神经阻滞麻醉
  • 手术时长:分钟数
  • 术中出血量:毫升数
  • 主刀医生:医生姓名
  • 手术医院:医院名称
  • 住院天数:天数

2. 询问植入物信息

必须询问用户:

📋 植入物信息确认

本次手术中是否有植入以下任何医疗材料?
- 人工关节/植入物
- 支架/导管
- 金属内固定物(钢板、螺钉、钢针等)
- 人工瓣膜/起搏器
- 疝修补片/补片
- 其他植入物

A. 有植入物
B. 无植入物

如果选择"有植入物",则询问详细信息:

请提供植入物信息:
1. 植入物名称:如"钛钢板"、"冠状动脉支架"
2. 植入物型号/规格:如"××品牌×型号"
3. 植入部位:具体位置
4. 植入物数量:数量
5. 预计取出时间:如有(如"3个月后取出"、"终身保留")

3. 生成数据文件

文件路径格式: data/手术记录/YYYY-MM/YYYY-MM-DD_手术名称.json

JSON 数据结构:

{
  "id": "{{生成唯一ID,使用日期+时间戳}}",
  "basic_info": {
    "surgery_name": "腹腔镜下胆囊切除术",
    "surgery_alias": "胆囊微创手术",
    "surgery_date": "2024-08-15",
    "preoperative_diagnosis": "慢性结石性胆囊炎",
    "body_part": "腹部",
    "surgery_type": "elective",
    "anesthesia_type": "全身麻醉",
    "duration_minutes": 90,
    "blood_loss_ml": 50,
    "surgeon": "张医生",
    "hospital": "某某医院",
    "hospitalization_days": 3
  },
  "implants": {
    "has_implants": false,
    "implants_list": []
  },
  "postoperative_info": {
    "complications": null,
    "recovery_status": "良好",
    "follow_up_plan": null
  },
  "notes": "用户补充说明或其他重要信息",
  "created_at": "2024-08-15",
  "original_input": "用户原始输入描述"
}

如果包含植入物,implants 结构示例:

{
  "has_implants": true,
  "implants_list": [
    {
      "implant_name": "钛合金钢板",
      "model": "××品牌×型号",
      "location": "右胫骨中段",
      "quantity": 1,
      "removal_plan": "12个月后取出",
      "implant_date": "2024-08-15"
    }
  ]
}

4. 保存数据

  • 创建月份目录(如不存在)
  • 保存 JSON 数据文件
  • 更新全局索引 data/index.json

5. 更新索引

data/index.json 中添加新记录:

{
  "records": [
    {
      "id": "记录ID",
      "type": "手术记录",
      "date": "YYYY-MM-DD",
      "file_path": "手术记录/YYYY-MM/YYYY-MM-DD_手术名称.json"
    }
  ]
}

Read the full file on GitHub · 264 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 264 lines · 5 tokens per session scan A 20d07ebba768

Subscribe to this mod's changes

surgery is a command published in the GitHub repository huifer/WellAlly-health (943 stars, last pushed 1mo ago), licensed MIT. It adds 5 tokens to every session and 2,261 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.