価格履歴CSVの分析(最安値・値下がり・セール傾向・買い時メモ)
Price history analyzer: lows, drops, sale patterns and a buy-or-wait note
日付・商品・価格・ショップの価格記録CSVから、最安値・中央値・現在価格、値下がり、曜日別・月別のセール傾向をまとめ、前提を明記した「今買うか待つか」のメモを作ります。
できること
自分で記録した価格や、価格トラッカーから書き出した CSV をもとに、「今の値段は安いのか」を数字で確認できます。計算はすべて同梱の Python スクリプトが行い、エージェントは結果を説明するだけなので、存在しない価格を作ることはありません。
- 商品ごとに最安値・最高値・中央値・平均・現在価格(最安値比・中央値比、何%の日が今より安かったか)を集計
- ショップが複数あれば、日ごとの最安値と各ショップの最新価格を表示
- 前回の記録からの値下がり(しきい値は変更可、初期値5%)とセール期間を一覧化
- 曜日別・月別の表と、毎年同じ月に年間最安値が出ているかを確認
- 「今買ってよさそう/待つ価値あり/どちらとも言えない」の目安と、その根拠・前提・注意(記録が少ない、間が空いている、最新の記録が古い など)を出力
使い方
python scripts/price_history.py prices.csv --json report.json --md report.md
python scripts/price_history.py prices.csv --item "コーヒーミル" --drop-pct 10
列名は date / item / price / shop(in_stock は任意)。1,980 や ¥1,980、2026/3/1 のような表記も読めます。見本は examples/prices.csv にあります。
必要な環境
- Python 3(標準ライブラリのみ)
- Claude、Codex、Hermes Agent、Cursor などのエージェント
注意点
- 過去の記録を整理するもので、将来の価格を予測するものではありません。
- 送料・ポイント・クーポンは、価格列に含まれていない限り考慮されません。
- 記録の間隔が空いていると、セールを見逃している可能性があります。
- ネットから価格を取得する機能はありません(手元の CSV だけを読みます)。
English description
Turn a CSV price log (date, item, price, shop) into lowest, median and current prices, drops, weekday and month sale patterns, and a buy-or-wait note with stated assumptions.
What it does
Answers "is this price actually good?" from a CSV the user already has: a hand-kept log or a price tracker export. The bundled Python script does every calculation; the agent only explains the result, so no prices are invented.
- Per item: lowest, highest, median, mean and current price (vs lowest, vs median, share of days that were cheaper)
- With several shops: daily minimum across shops and the latest price at each shop
- Day-to-day price drops (threshold configurable, default 5%) and merged sale episodes
- Weekday and month tables, plus whether the yearly low fell in the same month in two or more years
- A buy-now / consider-waiting / neutral signal with the reasons, assumptions and warnings (few observations, gaps, stale latest price)
How to use
python scripts/price_history.py prices.csv --json report.json --md report.md
python scripts/price_history.py prices.csv --item "Coffee Mill" --drop-pct 10
Columns: date, item, price, shop (in_stock optional). Formats like 1,980, JPY 1,980, $19.99 and 2026/3/1 are accepted. A sample is in examples/prices.csv.
Requirements
- Python 3 (standard library only)
- An agent such as Claude, Codex, Hermes Agent or Cursor
Caveats
- It describes past prices; it does not predict future ones.
- Shipping, points and coupons are ignored unless already in the price column.
- Gaps between observations can hide sales.
- No network access: it only reads the local CSV.
インストール方法
- ダウンロードしたZIPを展開します(中に
price-history-analyzer/フォルダとSKILL.mdがあります)。 - フォルダごと、使うエージェントのスキル置き場にコピーします。
- Claude:
~/.claude/skills/(プロジェクト単位なら.claude/skills/) - Hermes Agent:
~/.hermes/skills/ - Codex:
~/.agents/skills//Cursor:~/.cursor/skills/ - Claude アプリ(claude.ai):「カスタマイズ → スキル」からZIPをアップロード
- Claude:
- エージェントを再起動し、スキル一覧に表示されることを確認します。
出品者
出品スキル 44 件