Agent skill
Weight Track Database
Describes the structure of the weight tracker database that allows to store and read weight records for the user
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/weight-track-database
SKILL.md
Overview
The Weight Tracker database uses a JSON file to store weight entries provided by the user.
File Location
The data file is available at {root}/db/weight-tracker.json
Writing to the db
- Before writing into the db, identify which is the best approach:
- in-memory change: load the entire file in-memory, apply the change, serialize it back
- text-based change: scan the file in text mode and apply the change as a patch
-
Isolate the atomical change you want to apply
-
Read existing data to understand which kind of operation is needed
- insert
- update
- delete
- Apply the change with the identified approach.
ALWAYS: explain the execution plan to the user as output in the chat
Reading from the DB
- Identify the best approach to the read request:
- in-memory change: load the entire file in-memory, evaluate logic to perform the read
- text-based change: scan the file in text mode and calculate the expected information as context
-
Perform the read of the pertinent information
-
Perform aggregations if needed
ALWAYS: explain the execution plan to the user as output in the chat
Data Structure
Always ensure the database keeps a data structure like this:
{
"2025": {
"11": {
"10": 99.0,
"12": 99.5
}
}
}
More info:
- the indexing of the data is: year -> month -> day
- the value of a day is a number, the database is unit agnostic
- if a new writing request targets an existing day, override the value for the day
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?