Analyze fit files
Cross-platform Agent Skill and Python CLI for decoding, deduplicating, and reconciling Garmin FIT workout files
npx -y skills add BigBigBigLeo/analyze-fit-filesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when reading or analyzing FIT files, Garmin FIT, Zepp exports, workout records, duplicate or overlapping phone/watch activities, cross-midnight sessions, corrupt FIT data, cloud-only FIT placeholders, or multi-file fitness summaries.
SKILL.md
2.6 KB, as published. Nobody here has run it
Analyze FIT Files
Overview
Run the bundled analyzer before inspecting FIT messages manually. It uses Garmin's official Python SDK and emits compact normalized JSON with file types, sessions, duplicates, overlaps, merged activities, warnings, provenance, and totals.
Workflow
- Install the complete runtime requirements, then confirm the FIT SDK is available:
python -m pip install -r requirements.txt
python -c "import garmin_fit_sdk"
- Run the analyzer on files, directories, or glob patterns:
python scripts/analyze_fit_files.py <inputs...> --timezone Europe/Berlin --pretty --output fit-report.json --markdown fit-summary.md
- Read the compact report, especially:
files: FIT type, device, message inventory, parse status.sessions: source sessions before reconciliation.duplicate_groups: byte-identical or semantic duplicates.overlap_groups: compatible multi-device recordings merged once.activities: canonical activities with field-levelmetric_sources.warnings: offline placeholders, decode errors, and suspicious durations.totals: deduplicated timer duration grouped by local start date.
- Use
--expandedonly when the user requests raw or developer fields. It can produce very large output.
Interpretation Rules
- Assign cross-midnight activity to its local start date.
- Keep elapsed, timer, and moving durations distinct; use timer duration for ordinary workout totals.
- Do not infer duplicates from filenames or equal sizes.
- Merge only high-overlap, sport-compatible recordings. Preserve both sources and per-metric provenance.
- Prefer wearable heart-rate coverage and GPS-capable distance/route coverage.
- Keep non-overlapping same-day sessions separate.
- Exclude likely unclosed recordings from totals until reviewed; never silently trim ambiguous endurance sessions.
- Never rename, delete, repair, or overwrite source FIT files.
Cloud Files
On Windows, offline OneDrive placeholders return offline_placeholder without opening the data stream. Pin or hydrate the file, then rerun. Do not repeatedly attempt blocking reads.
References
- Garmin FIT documentation: https://developer.garmin.com/fit/
- Garmin official Python SDK: https://github.com/garmin/fit-python-sdk
- Microsoft placeholder hydration: https://learn.microsoft.com/windows/win32/api/cfapi/nf-cfapi-cfhydrateplaceholder