Family medication management with file-based storage. No database required — works anywhere.
FeatureHowMedication catalogMarkdown files in data/medications/Member profilesMarkdown files in data/members/Batch trackingEmbedded in medication filesExpiry alertsscripts/check_expiry.py or manual scanRemindersYour platform's cron/reminder system (configurable)NotificationsOpenClaw cron, webhooks, email, local OS — you chooseMedia archivedata/media/ with date-based folders
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):
Ask about family members: "家里有几位成员?分别是谁?(大人/小孩/老人)"
For each member, collect minimum info:
For children, additionally ask:
For adults/elderly, additionally ask:
Create data/members/{name}.md for each member
Confirm the profiles with the user before proceeding
Minimal profile (user can fill in details later):
markdown
# {姓名}
| Field | Value |
|-------|-------|
| Name | {姓名} |
| Role | 成人 / 儿童 / 老人 |
| Birth Date | YYYY-MM-DD |
| Weight | {kg} |
| Allergies | {list or "无已知过敏"} |
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.
If running on OpenClaw, the cron system supports all configured channels automatically.
bash
# 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):
ChannelTarget FormatExampleFeishufeishu:{open_id}``feishu:ou_xxxxxTelegramtelegram:{chat_id}``telegram:-1001234567QQ Botqqbot:c2c:{openid}``qqbot:c2c:xxxxxDiscorddiscord:{channel_id}``discord:123456789Signalsignal:{phone}``signal:+86138xxxx
Tip: Omit
--targetto send to the current conversation (auto-detected).
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:
Create the storage structure:
text
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/
When a user describes or sends a photo of a medication:
data/medications/{generic_name}.mdmarkdown
# {Generic Name} ({Brand Name})
## Basic Info
| Field | Value |
|-------|-------|
| Generic Name | {name} |
| Brand Name | {name} |
| Specification | {spec} |
| Manufacturer | {manufacturer} |
| Approval No | {批准文号} |
| Drug Type | 处方药 / OTC / 外用药 |
| Category | 抗生素 / 感冒药 / 退烧药 / etc. |
| Indications | {适应症} |
| Contraindications | {禁忌} |
| Storage | {储存条件} |
## Batches
| Batch No | Mfg Date | Expiry | Qty | Unit | Location | Status |
|----------|----------|--------|-----|------|----------|--------|
| {batch} | {date} | {date} | {n} | 盒/支/瓶 | {location} | active |
## Usage Notes
- Adult dose: {dosage}
- Child dose: {dosage by weight}
- Food: before/after meals
- Special notes: {warnings}
## History
| Date | Member | Action | Notes |
|------|--------|--------|-------|
| YYYY-MM-DD | {name} | added/prescribed | {source} |
text
User sends image → Analyze with vision model → Extract medication info
→ Confirm with user → Create/update medication .md file → Set reminders if requested
Steps:
data/media/YYYY-MM-DD/text
User describes medication → Parse → Confirm → Create .md file
Use structured extraction from user's text description. Always confirm before creating.
text
Get member + medication + schedule → Check notification config
→ Create platform-specific reminder → Record in member file → Test it
openclaw cron add --name "..." --schedule "..." --message "..."bash
python3 /path/to/medication-manager/scripts/check_expiry.py /path/to/data/medications/
Or manually scan medication files for expiry dates. Alert levels:
LevelThresholdAction🔴 ExpiredPast dateNotify immediately, mark as expired⚠️ 7 daysWithin 7 daysDaily reminder to use or dispose🟡 30 daysWithin 30 daysWeekly reminder🔶 90 daysWithin 90 daysMonthly review
Scan all files in data/medications/ for:
When a family member takes a medication:
Append entry to data/logs/YYYY-MM-DD.md:
markdown
| Time | Member | Medication | Dose | Status | Notes |
|------|--------|-----------|------|--------|-------|
| 08:15 | 张三 | 氨氯地平 | 5mg | ✅ taken | 饭后 |
Update batch quantity in the medication file (decrement)
Flag if dose was missed or skipped
ReferencePathPurposeMember profilesreferences/member-profile.mdTemplate & collection guideNotificationsreferences/notifications.mdAll notification options & templatesStorage layoutreferences/storage-layout.mdFile organization & namingDrug interactionsreferences/drug-interactions.mdCheck when multiple drugs prescribedPediatric dosagereferences/pediatric-dosage.mdCalculate child doses by weightSetup guidereferences/setup.mdInstallation & first use
This skill is platform-agnostic. The notification layer adapts to whatever the user has:
PlatformMethodSetupOpenClaw (any channel)Built-in cronAuto-detected, no config neededFeishumessage tool or cronSet --target "feishu:{open_id}"TelegramBot API or cronSet --target "telegram:{chat_id}"QQ Botqqbot_remind / qqbot_cronSet target via cronWebhookPOST JSONProvide webhook URL
Full details: references/notifications.md
If you have existing medication data (e.g., from a spreadsheet or another system):
data/medications/