Install
openclaw skills install @voronindenis5/repair-or-replaceDecide whether to fix, replace, or recycle a broken item. Takes item type, age, symptoms, and repair estimate, then produces a scored recommendation across cost, lifespan, sentimental value, and environmental impact.
openclaw skills install @voronindenis5/repair-or-replaceDon't guess. Score it.
Repair or Replace is a skill that helps you decide whether to fix a broken
item, buy a replacement, or recycle it. It builds a weighted decision matrix
across five factors — repair cost, replacement cost, remaining lifespan,
sentimental value, and environmental impact — then outputs a clear,
score-backed recommendation with reasoning.
Activate this skill when:
The script takes structured input about the item and its condition:
| Parameter | Description | Example |
|---|---|---|
--item | What the item is | "washing machine" |
--age | How old it is (years) | 8 |
--repair-cost | Estimated repair cost | 250 |
--replacement-cost | Cost of a new equivalent | 800 |
--expected-lifespan | Expected total lifespan of this item type (years) | 12 |
--symptoms | What's wrong (free text) | "won't spin" |
--sentimental | Sentimental value (1-10) | 3 |
--condition | Overall condition aside from the fault (1-10) | 6 |
It then scores the decision across five dimensions, applies weights, and produces a recommendation: Repair, Replace, or Recycle/Donate.
| Factor | Weight | Repair Favors | Replace Favors |
|---|---|---|---|
| Cost Ratio | 30% | Repair < 50% of replacement | Repair > 50% of replacement |
| Remaining Life | 25% | <50% of expected lifespan used | >50% of expected lifespan used |
| Condition | 15% | Good condition otherwise | Multiple issues, poor condition |
| Sentimental | 10% | High sentimental value | Low sentimental value |
| Environmental | 20% | Repair avoids e-waste | New item is more efficient |
See references/decision-matrix.md for the full scoring algorithm.
| Need | Command |
|---|---|
| Basic decision | python3 scripts/repair_or_replace.py --item "laptop" --age 5 --repair-cost 300 --replacement-cost 1000 |
| With symptoms and condition | python3 scripts/repair_or_replace.py --item "fridge" --age 10 --repair-cost 200 --replacement-cost 900 --symptoms "not cooling" --condition 4 |
| Factor in sentiment | python3 scripts/repair_or_replace.py --item "watch" --age 20 --repair-cost 150 --replacement-cost 500 --sentimental 9 |
| JSON output | python3 scripts/repair_or_replace.py ... --format json |
| Interactive mode | python3 scripts/repair_or_replace.py --interactive |
The script outputs one of three recommendations:
Each recommendation includes a confidence score (0-100) and itemized reasoning.
references/decision-matrix.md — full scoring algorithm and weight rationalereferences/item-lifespans.md — expected lifespan data for common itemsreferences/environmental-impact.md — e-waste and sustainability considerationsscripts/repair_or_replace.py — the main decision enginescripts/sample_run.sh — example invocations for different item typesIgnoring hidden repair costs. The repair estimate often excludes diagnosis fees, shipping, or secondary issues discovered during repair. Add 15-20% to the estimate for a realistic comparison.
Overestimating remaining lifespan. An 8-year-old washing machine with a 12-year expected lifespan doesn't have 4 "good" years left — the last quarter of lifespan tends to have escalating failure rates.
Forgetting energy efficiency. A new appliance may be significantly more
energy-efficient, saving money over time. Factor this into the replacement
cost (see references/environmental-impact.md).
Sentimental bias. It's easy to over-value items with emotional
attachment. Be honest with the --sentimental score.
Not considering safety. Some failures (gas appliances, electrical) carry safety risks if repaired poorly. If in doubt, replace.
references/item-lifespans.md)MIT © Denis Voronin