sync-depslisted
Install: claude install-skill laceto/financialtools
# Sync Dependencies
Derives the project's dependency list from **actual imports in source files** — one
scan, one canonical list, propagated to every dep file. No manual bookkeeping;
no drift between `requirements.txt` and `pyproject.toml`.
## When to Use This Skill
- User says "update requirements.txt", "sync deps", "fix requirements", "update deps"
- User says "update pyproject.toml dependencies", "sync dependency files"
- After adding or removing a package to the project
- Before a release or a code review
---
## Single Source of Truth
```
source files (.py, .ipynb)
│
▼
sync_deps.py ← ONE scan, ONE canonical list
│
├──▶ requirements.txt
├──▶ pyproject.toml [project.dependencies]
├──▶ environment.yml (if present)
└──▶ setup.cfg (if present)
```
Everything is derived; never edit dep files by hand.
---
## Step 1 — Run the scanner
Run the bundled script from the **repo root** (not from inside the skill folder):
```bash
python .claude/skills/sync-deps/scripts/sync_deps.py
```
The script outputs one `package>=X.Y` line per third-party dependency, sorted
alphabetically, to **stdout**. Capture it:
```bash
python .claude/skills/sync-deps/scripts/sync_deps.py > /tmp/deps_raw.txt
```
Inspect the output before writing anything. If a package is missing or wrong,
update `IMPORT_TO_PACKAGE` in the script — that is the only place to change.
---
## Step 2 — Write `requirements.txt`
Replace the full con