Install
$ agentstack add skill-nanorhino-weight-loss-skill-weight-tracking ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Weight Tracking
> ⚠️ SILENT OPERATION: Never narrate internal actions, skill transitions, or tool calls to the user. Just do it silently and respond with the result. > > Do NOT re-read this SKILL.md if it's already in context from a prior turn.
Data Storage
File: {workspaceDir}/data/weight.json — a JSON object keyed by ISO-8601 datetime with timezone offset. Each entry: { "value": 80, "unit": "kg" }, plus optional "fasting": true and "note": "...". Only the save scripts write this file — never hand-edit it or write it with python/exec.
Hard Rules — Weight Storage (MANDATORY)
Non-negotiable. Agents have historically stashed weight in ad-hoc files (weight-log.md) or as a dated ledger inside PLAN.md, leaving data/weight.json incomplete and breaking badges and dashboards. Don't repeat that.
- Always record, never just talk. Any time the user mentions a weight figure or a change in weight — "72.5 this morning", "down 2 jin", "I weigh 79", "just weighed 80", "现在132.1", "刚才厕所称了下130" — save it to
data/weight.jsonviasave-and-check.py(orweight-tracker.py save). A spoken reply alone never counts as recording. This is not limited to scheduled weigh-in days.
Non-fasting / off-hour weigh-ins still get recorded. Post-meal / evening / bathroom-scale / clothed / etc. weigh-ins are ALL saved to data/weight.json — attach --note "post-meal" / --note "evening" / --note "clothed" so downstream code can down-weight them from trend calculations. DO NOT skip the save just because the reading is "not standard". Never-recording a value the user explicitly reported is a data-integrity bug: the value only lives in chat history and everything downstream (weekly report, diagnosis, trend chart, dashboard) misses it. If the reading is unusual, still save + explain in the reply why the number may look off ("饭后+水肿,不代表真实体重"), don't refuse to record.
Exception: past or hypothetical mentions ("I used to be 80kg", "上个月还60呢", "目标55") are not current readings — don't save those.
- Single source of truth.
data/weight.jsonis the one authoritative record of body weight.
- No alternative weight files. Never create
weight-log.mdor any other file to hold weight data.
- Never write weight into
PLAN.md.PLAN.mdcarries only static plan parameters — start weight, target weight, calorie target, macro ranges — fixed at onboarding or recalculation. It is never updated per weigh-in.
- Read forward, never write back. To show the current weight, read the latest value from
data/weight.json. Never copy it back intoPLAN.md.
- Only the scripts write weight.json. Always save through
save-and-check.py/weight-tracker.py. Never writedata/weight.jsondirectly withpython/exec/file edits — doing so has produced off-schema entries ({"morning": 60.45}instead of{"value": 60.45, "unit": "kg"}) that break dashboards, weekly reports, and diagnostics. If you need to attach fasting/note context, use--fasting/--note, not a hand-built shape.
Scripts
Script path: python3 {baseDir}/scripts/weight-tracker.py
- Accept any common unit: kg, lb, lbs, 斤 (=0.5 kg), 公斤. Pass what the user said as
--unit; the script normalizes it. - Fasting tag: if the user mentions an empty stomach / morning weigh-in, pass
--fastingto record it on the entry. - Note: pass
--note "..."to attach free-text context (e.g. "post-workout", "clothed").
Save + Context — save-and-check.py (preferred)
Use this for all weight saves. Saves weight + returns recent history and plan context.
python3 {baseDir}/scripts/save-and-check.py \
--data-dir {workspaceDir}/data \
--value 79.5 --unit kg \
--tz-offset 28800 \
--plan-file {workspaceDir}/PLAN.md \
--health-profile {workspaceDir}/health-profile.md \
--user-file {workspaceDir}/USER.md \
[--correct] [--fasting] [--note "..."]
Returns:
{
"save": { "action": "created"|"updated", "key": "", "value": 79.5, "unit": "kg" },
"context": {
"recent_weights": [...],
"plan": { "target_weight": 55.0, "tdee": 1916, "calorie_target": 1800 },
"active_strategy": { "active": false },
"last_intervention_date": null
}
}
Save only — weight-tracker.py save
Use only when deviation-check is not needed (e.g., onboarding initial weight).
python3 {baseDir}/scripts/weight-tracker.py save \
--data-dir {workspaceDir}/data \
--value 79.5 --unit kg \
--tz-offset 28800 \
[--correct] [--fasting] [--note "..."]
- Auto-detects new vs correction: if last entry ≤ 30 min ago, overwrites. Otherwise creates new.
--correct: force overwrite most recent entry (when user explicitly says "that was wrong")--fasting: record the reading as a fasting/morning weigh-in.--note "...": attach free-text context.
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]
Always show weight in the user's preferred unit (pass it as --display-unit), rounded to 1 decimal.
Correct / Delete / Change Unit
See references/crud-operations.md for delete, update, and set-unit.
Workflow
User Reports Weight
- Get
tz_offsetand Unit Preference. Prefer the auto-injected TOOLS.md Quick Reference (tz_offset,unit_preference,daily_cal_target) — use those values directly. Only if Quick Reference is missing or outdated, fall back to readingtimezone.jsonandhealth-profile.md(in parallel, first session only). - Call
save-and-check.pywith the user's--value/--unit/--tz-offset(full command under [Scripts](#scripts) above). Add--correctif the user is fixing a mistaken reading,--fastingfor an empty-stomach/morning weigh-in,--note "..."for any extra context. - Read the response:
save.action:"created"→ "Logged ✓";"updated"→ "Updated ✓". Show the value in the user's preferred unit.context.recent_weights: recent weight entriescontext.plan: plan targets (TDEE, target weight, etc.)context.active_strategy: whether an intervention strategy is currently runningcontext.last_intervention_date: date of the last intervention
- Decide for yourself whether the weight trend deserves attention. Default to just logging and confirming — never comment on a weight change unprompted; if the user is emotional about it, hand off to the
emotional-supportskill. Only speak up about the trend itself when it genuinely warrants it. The core test: is the change moving in the same direction as the user's goal, and is any deviation a genuine trend rather than day-to-day noise?
- Weight swings ±0.5–1kg naturally every day (water, sodium, bowel movements). A single day inside that band is almost certainly noise and needs no reaction — it takes several days of data to confirm a trend is real.
- On track with the goal (e.g. losing weight when the goal is to lose) → encourage, offer positive reinforcement.
- Everyday noise (1–2 days of minor movement within the normal band) → acknowledge normally, don't probe.
- Likely a real deviation (several consecutive days against the goal, or a clear rebound off a low that exceeds the normal swing) → reassure first, then gently offer to look into it together. Don't decide "it's nothing" for the user — hand them the choice.
- Plateau (over a 14-day view, weight drifts within a narrow band with no progress toward the goal) → you must gently ask, "Your weight seems to have stalled lately — want to look into why together?" Don't diagnose the cause or hand out advice yourself; ask first whether they want to. If they say yes → go to cause-check-flow.
- Bar for raising it: only speak up when you're at least 80% confident the deviation or plateau is real. An unnecessary question is also an intrusion.
- If
active_strategy.active: true(a strategy is already running), don't intervene again, but you may useconsensusto remind them the strategy is still in motion. You can also look at the last few days of meal logs ({workspaceDir}/data/meals/YYYY-MM-DD.json) and give concrete feedback in light of that consensus. - If
last_intervention_dateis within the past 7 days, don't intervene again (covers both plateau and deviation prompts). - Mark before you ask. Whenever you decide to raise a question with the user — plateau or deviation alike — you must call mark-intervention first, then output the question text. Order: tool call → text output. This ensures the intervention is recorded even if the user never replies, so it won't fire again at the next weigh-in.
``bash python3 {baseDir}/scripts/save-and-check.py --data-dir {workspaceDir}/data --tz-offset --mark-intervention `` Once it succeeds, output the question text (e.g. "Want to look into why together?").
- User's perspective first. Don't just read the scientific trend — think about how the user will feel seeing the number. A half-kilo gain makes people anxious, a week-long plateau breeds frustration, a hard-won drop that bounces back stings. Respond to the feeling, not to a cold number.
User Asks for Trend / History
- Call
loadwith appropriate filters and--display-unit. - Present the data (table, summary, or trend description).
References
| File | Contents | |------|----------| | references/crud-operations.md | Delete, update, set-unit commands + correction workflow | | references/deviation-workflow.md | Deviation-check severity table, response guide, command | | references/integrations.md | Which other skills use this skill's scripts |
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: NanoRhino
- Source: NanoRhino/weight-loss-skill
- License: MIT
- Homepage: https://nanorhino.com/
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.