weight-tracking
Skill1 starsChanged 9 months agoMITView on GitHub
Track body weight with full CRUD operations, unit conversion, and trend analysis. Trigger when user reports weight, asks about weight trend, wants to correct a weight entry, or change their unit preference. Trigger phrases: 'I weigh...', '体重...', '称了一下...', 'my weight is...', 'change to pounds', '改成斤', 'weight trend', '体重趋势'.
In this repository16 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- daily-notificationSkill
- diet-tracking-analysisSkill
- emotional-supportSkill
- exercise-tracking-planningSkill
- habit-builderSkill
- jdcloud-oss-uploadSkill
- meal-plannerSkill
- memory-consolidationSkill
- notification-composerSkill
- notification-managerSkill
- plan-exportSkill
- restaurant-meal-finderSkill
- user-onboarding-profileSkill
- weekly-reportSkill
- weight-loss-plannerSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 2 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 48
All display/output uses this preference, with values rounded to 1 decimal place
- Distinctive: line 65
Auto-detect new vs correction: if the last entry is ≤ 30 minutes ago, overwrite it (treat as correction).
- Very specific: line 122
Read timezone.json to get tz_offset (seconds)
- Very specific: line 130
Read health-profile.md > Body > Unit Preference for display unit
- Very specific: line 131
Call save with the reported value, unit, and timezone offset
- Very specific: line 132
Check the response action field:
- Very specific: line 140
Call load with appropriate filters and --display-unit
- Very specific: line 145
If user says "that was wrong" / "刚才称错了" after a recent save → call save with --correct and the new value
- Very specific: line 146
If user references a specific date → call update with the matching --key
- Very specific: line 150
Call set-unit with the new unit
- Very specific: line 158
Fasting tag: if the user mentions they haven't eaten yet, or it's a morning weigh-in before breakfast, note fasting: true in the response …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Weight Tracking
⚠️ SILENT OPERATION: Never narrate internal actions, skill transitions, or tool calls to the user. No "Let me check...", "Now I'll transition to...", "Reading your profile...". Just do it silently and respond with the result.
Manage body weight records with full CRUD operations. All data lives in a single JSON file; display always uses the user's preferred unit.
Data Storage
File: {workspaceDir}/data/weight.json
Format: JSON object keyed by ISO-8601 datetime (with timezone offset):
{
"2026-03-01T08:30:00+08:00": { "value": 80, "unit": "kg" },
"2026-03-04T07:45:00+08:00": { "value": 79.5, "unit": "kg" },
"2026-03-04T21:00:00+08:00": { "value": 79.8, "unit": "kg" }
}- Each entry stores the original value and original unit as reported by the user
- Multiple entries per day are supported (e.g., morning and evening weigh-ins)
- Keys are sorted chronologically
Unit Preference
Stored in: health-profile.md > Body > Unit Preference
## Body
- **Unit Preference:** kg- Set during onboarding (inferred from user input: "80kg" →
kg, "165 lbs" →lb, "130斤" →kg) - User can change at any time via
set-unitcommand - All display/output uses this preference, with values rounded to 1 decimal place
Scripts
Script path: python3 {baseDir}/scripts/weight-tracker.py
1. Save — save
python3 {baseDir}/scripts/weight-tracker.py save \
--data-dir {workspaceDir}/data \
--value 79.5 --unit kg \
--tz-offset 28800 \
[--correct]- Reads
timezone.jsonoffset to generate local datetime key - Auto-detect new vs correction: if the last entry is ≤ 30 minutes ago, overwrite it (treat as correction). Otherwise, create a new entry.
--correctflag: force overwrite the most recent entry regardless of time gap (for when user explicitly says "that was wrong" / "刚才称错了")- Returns:
{ "action": "created" | "updated", "key": "<datetime>", "value": <n>, "unit": "<u>" }
2. Load — load
python3 {baseDir}/scripts/weight-tracker.py load \
--data-dir {workspaceDir}/data \
--display-unit kg \
[--last 7] \
[--from 2026-02-01 --to 2026-03-06]- Returns all matching entries converted to
--display-unit, rounded to 1 decimal place --last N: return the N most recent entries--from/--to: filter by date range (inclusive)- Without filters: returns all entries
3. Delete — delete
python3 {baseDir}/scripts/weight-tracker.py delete \
--data-dir {workspaceDir}/data \
--key "2026-03-06T08:30:00+08:00"- Removes the entry with the exact datetime key
- Returns confirmation or error if key not found
4. Update — update
python3 {baseDir}/scripts/weight-tracker.py update \
--data-dir {workspaceDir}/data \
--key "2026-03-06T08:30:00+08:00" \
--value 75.0 --unit kg- Updates the value and unit for an existing entry
- Returns confirmation or error if key not found
5. Set Unit Preference — set-unit
python3 {baseDir}/scripts/weight-tracker.py set-unit \
--health-profile {workspaceDir}/health-profile.md \
--unit lb- Updates
health-profile.md > Body > Unit Preference - Returns confirmation with the new unit
Timezone Handling
The server runs in UTC. To record the correct local datetime:
- Read
timezone.jsonto gettz_offset(seconds) - Pass
--tz-offset <seconds>to thesavecommand - The script calculates the user's local time and formats the key as ISO-8601 with offset (e.g.,
2026-03-06T08:30:00+08:00)
Workflow
User Reports Weight
- Read
health-profile.md > Body > Unit Preferencefor display unit - Call
savewith the reported value, unit, and timezone offset - Check the response
actionfield:"created"→ confirm: "Logged ✓""updated"→ confirm: "Updated ✓"
- Display the saved value in the user's preferred unit
User Asks for Trend / History
- Read
health-profile.md > Body > Unit Preference - Call
loadwith appropriate filters and--display-unit - Present the data (table, summary, or trend description depending on context)
User Wants to Correct an Entry
- If user says "that was wrong" / "刚才称错了" after a recent save → call
savewith--correctand the new value - If user references a specific date → call
updatewith the matching--key
User Changes Unit Preference
- Call
set-unitwith the new unit - Confirm the change to the user
Interaction Guidelines
- Never comment on weight changes unprompted. Just log and confirm. Emotional reactions to weight (positive or negative) are handled by the
emotional-supportskill. - Always display in preferred unit, rounded to 1 decimal place.
- Accept any common unit in user input: kg, lb, lbs, 斤 (catty = 0.5 kg), 公斤. Convert to standard kg or lb for storage.
- Fasting tag: if the user mentions they haven't eaten yet, or it's a morning weigh-in before breakfast, note
fasting: truein the response context (for notification-composer to use). If they've already eaten, notefasting: false.
Used By Other Skills
This skill's script is called by other skills for weight data access:
| Skill | Usage |
notification-composer | save when user replies to weight reminder; load --last 1 to check if already weighed today |
weekly-report | load --from --to for weekly weight trend |
emotional-support | load --last N for recent weight context |
habit-builder | load for weight trend analysis |
user-onboarding-profile | save to record initial weight during onboarding |
weight-loss-planner | load --last 1 to get current weight for calculations |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

