Medication Manager
by @liucunguang
Family medication management skill using file-based storage (no database required). Supports medication entry via photo/image (prescription, medicine box), t...
Step 1: Set Up Family Member Profiles
This is always the first step. Before recording any medications, create profiles for each family member.
See references/member-profile.md for the complete template, role-specific fields, and data collection guide.
Setup flow (follow this every time):
1. Ask about family members: "ๅฎถ้ๆๅ ไฝๆๅ๏ผๅๅซๆฏ่ฐ๏ผ๏ผๅคงไบบ/ๅฐๅญฉ/่ไบบ๏ผ"
2. For each member, collect minimum info:
- ๅงๅ โ who is this person?
- ่ง่ฒ โ ๆไบบ / ๅฟ็ซฅ / ่ไบบ
- ๅบ็ๆฅๆ โ for age calculation (ๅฟ็ซฅ: calculate exact months)
- ไฝ้ (kg) โ โ ๏ธ ๅฟ็ซฅๅฟ
ๅกซ๏ผ็จ่ฏๅ้ๆไฝ้่ฎก็ฎ
- ่ฟๆๅฒ โ โ ๏ธ ๆ้่ฆ็ๅฎๅ
จ้ฎ้ข โ "ๆๆฒกๆไปไน่ฏ็ฉ่ฟๆ๏ผ"
3. For children, additionally ask:
- ็ซ่ๆฅ็งๆ
ๅต
- ่ฟๆๆฏๅฆ็็
/็จ่ฏ
4. For adults/elderly, additionally ask:
- ๆ
ขๆง็
๏ผ้ซ่กๅใ็ณๅฐฟ็
็ญ๏ผ
- ้ฟๆๆ็จ็่ฏ็ฉ
5. Create data/members/{name}.md for each member
6. Confirm the profiles with the user before proceeding
Minimal profile (user can fill in details later):
# {ๅงๅ}| Field | Value |
|-------|-------|
| Name | {ๅงๅ} |
| Role | ๆไบบ / ๅฟ็ซฅ / ่ไบบ |
| Birth Date | YYYY-MM-DD |
| Weight | {kg} |
| Allergies | {list or "ๆ ๅทฒ็ฅ่ฟๆ"} |
Step 2: Configure Notifications
Before setting reminders, configure how the user wants to be notified.
This skill does not hardcode any notification channel. The user chooses their own method.
#### Option A: OpenClaw Built-in Cron (Recommended for OpenClaw users)
If running on OpenClaw, the cron system supports all configured channels automatically.
# Example: daily 8am reminder via current channel
openclaw cron add \
--name "med-{member}-{drug}" \
--schedule "0 8 * * *" \
--agent-id your-agent \
--message "โฐ ็จ่ฏๆ้\n\n๐ {่ฏๅๅ}\nๅ้๏ผ{ๅ้}\n\n่ฏทๆๆถๆ่ฏ๏ผ"
Supported channels (via --target):
| Channel | Target Format | Example |
|---------|--------------|---------|
| Feishu | feishu:{open_id} | feishu:ou_xxxxx |
| Telegram | telegram:{chat_id} | telegram:-1001234567 |
| QQ Bot | qqbot:c2c:{openid} | qqbot:c2c:xxxxx |
| Discord | discord:{channel_id} | discord:123456789 |
| Signal | signal:{phone} | signal:+86138xxxx |
> Tip: Omit --target to send to the current conversation (auto-detected).
#### Option B: Webhook (DingTalk, WeChat Work, Slack, etc.)
If the user has a webhook URL, send a POST request with the reminder message. See references/notifications.md for full templates.
See references/notifications.md for:
What the agent should do: 1. Detect the user's current channel from conversation context 2. Ask: "ไฝ ๅธๆ้่ฟไปไนๆนๅผๆฅๆถ็จ่ฏๆ้๏ผ" and offer options 3. If OpenClaw โ use cron with auto-detected target 4. If webhook โ ask for the webhook URL 5. Store the notification config in the member profile 6. Always test โ send one test notification to confirm it works
Step 3: Set Up Data Directory
Create the storage structure:
data/
โโโ medications/ # One .md per medication
โโโ members/ # One .md per family member (created in Step 1)
โโโ prescriptions/ # Prescription records (optional)
โโโ logs/ # Medication intake logs (YYYY-MM-DD.md)
โโโ config/ # Optional: notification config
โ โโโ notifications.yaml
โโโ media/ # Photos of prescriptions/boxes
โโโ YYYY-MM-DD/
Step 4: Add Medications
When a user describes or sends a photo of a medication:
1. Analyze with vision model (if photo)
2. Extract: generic name, brand name, spec, manufacturer, batch no, expiry, dosage
3. Confirm details with user
4. Create a markdown file: data/medications/{generic_name}.md
5. Set up reminders if requested (using configured notification method)
clawhub install medication-manager