# skill: /distill-best-practices **Location:** `custom-claude-skills/skills/distill-best-practices/SKILL.md` ## Purpose Cross-project best practices distillation. Reads changed memory files from all tracked projects and proposes additions, updates, or removals to `claude-foundations/best-practices/`. Always targets claude-foundations as output regardless of which project it's run from. ## Usage ``` /distill-best-practices ``` No arguments. Interactive — presents proposals for approval before applying. ## How it works 1. Reads `settings.yaml` for tracked projects and `best-practices/.distill-state.json` for last-processed SHAs 2. For each project with changes since last SHA: finds changed `memory/*.md` files via `git diff` 3. Maps memory files to best-practices topics (e.g., `gotchas-k8s.md` → `kubernetes.md`) 4. Classifies each potential change as ADD, UPDATE, or REMOVE 5. Presents numbered proposals — waits for user approval 6. Applies approved changes, updates `BESTPRACTICES.md` index if new files created 7. Updates `.distill-state.json` with current HEADs ## Part of the knowledge pipeline `/log` → `/reflect-logs` → `/distill-best-practices` ## Gotchas - Generalises project-specific details: strips IPs, namespace names, hostnames — keeps principles and reasoning - Only promotes lessons that would apply to at least one other project type - Never auto-applies — always interactive