Skip to main content
ClaudeWave
Skill313 estrellas del repoactualizado 2d ago

price-watcher

Price Watcher automatically tracks product prices from natural-language requests without requiring URLs, discovering multiple retail sources and maintaining SQLite history. Use it when users ask to monitor, compare, or set price alerts for products with optional target thresholds, generating Markdown reports that flag items meeting specified price conditions.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/Prompthon-IO/agent-systems-handbook /tmp/price-watcher && cp -r /tmp/price-watcher/skills/price-watcher ~/.claude/skills/price-watcher
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# Price Watcher

Track product prices from natural-language product descriptions. Do not require the user to provide product URLs. Store the watch query, discover and refresh multiple source URLs, save price history in SQLite, and write reports to the configured report directory.

## Quick Start

Resolve paths relative to this skill directory. Use `scripts/price_watcher.py` for deterministic local state operations:

```bash
cd skills/price-watcher
python3 scripts/price_watcher.py init
python3 scripts/price_watcher.py add "Watch MacBook Pro M3 14-inch and notify me if it drops below $1200"
python3 scripts/price_watcher.py sources add --item-id 1 --site "Best Buy" --url "https://..."
python3 scripts/price_watcher.py record --item-id 1 --source-id 1 --price 1199.99 --currency USD
python3 scripts/price_watcher.py report
```

Default runtime paths:

- State root: `~/.codex/state/price-watcher/`, override with `PRICE_WATCHER_STATE`
- Database: `~/.codex/state/price-watcher/price-watcher.sqlite3`
- Reports: `~/.codex/state/price-watcher/price-reports/YYYY-MM-DD.md`

Keep runtime databases and generated reports out of git unless the user explicitly asks to commit examples.

## Workflow A: Add Watched Item

1. Parse the user's request into:
   - `query`: the product description to keep watching.
   - `target_price`: the numeric threshold if present.
   - `currency`: infer from symbols or wording; default to the user's locale when unclear.
2. Store the original product query, not a single fixed URL.
3. Search across multiple sources using web search, retailer search pages, or shopping/search APIs available in the current environment.
4. Normalize likely product matches:
   - canonical product name
   - brand/model/generation/size/storage/color or other important attributes
   - marketplace or retailer site
   - product URL
5. Deduplicate likely same-product matches by comparing normalized names and attributes. Prefer exact model/generation matches over merely similar products.
6. Add multiple source URLs for the item. Do not ask the user to manually provide URLs unless source discovery fails and the user wants to help.

Use `python3 scripts/price_watcher.py add "<request>"` after parsing to create the SQLite item, then add discovered source URLs with `sources add`.

## Workflow B: Check Prices

For each active item:

1. Load active items and known sources from SQLite.
2. Refresh source discovery when:
   - no sources exist,
   - known sources fail repeatedly,
   - the user asks for broader coverage,
   - a product appears discontinued or out of stock everywhere.
3. Query all known sources. Use direct HTTP only when normal access works. Use Playwright/browser automation for pages that need client-side rendering.
4. Respect access controls:
   - Amazon scraping is allowed only through normal browser-accessible pages.
   - Do not bypass login, bot challenges, paywalls, CAPTCHAs, or account gates.
   - Do not purchase items, add to cart, reserve inventory, or initiate checkout.
5. Extract price, currency, availability when visible, and failure/skipped notes.
6. Normalize price and currency before storage. If conversion rates are needed and unavailable, keep the observed currency and do not compare across currencies as exact values.
7. Save each successful observation to `price_checks`.
8. Compare against the previous check for the same item/source and the item target price only when currencies are comparable.
9. Generate a Markdown report with `report`.

## Report Requirements

Write reports to the configured `price-reports/YYYY-MM-DD.md` directory. Sort items lowest-price-first by the best current observed price. Include:

- item query and normalized name
- target price and whether the best price meets it
- source links
- observed prices and currencies
- lowest price across sources
- changes since the previous check
- failed or skipped source notes

Treat notifications as out of scope for v1. For a request like "notify me," store the threshold and write report status; do not send messages unless a later version adds a notification channel.

## SQLite Schema

Use this schema exactly unless the user asks for an extension:

```sql
items(id, query, normalized_name, target_price, created_at, active)
sources(id, item_id, site, url, last_checked_at)
price_checks(id, item_id, source_id, price, currency, checked_at)
```

See `references/schema.md` for column meanings and operational notes.

## Price Extraction

Prefer structured data in this order:

1. JSON-LD product offers
2. Open Graph/product meta tags
3. retailer page state JSON
4. visible DOM text near product title or buy box

Use `references/source-discovery.md` for source discovery and normalization heuristics. Use `references/price-parsing.md` for price parsing rules.

## Failure Handling

Record failed or skipped sources in the report even when no price can be stored. Common notes:

- `blocked: login required`
- `skipped: CAPTCHA or bot challenge`
- `skipped: checkout/cart-only price`
- `failed: price not visible`
- `failed: page unavailable`

Do not invent prices. If a page shows a range, store the lowest visible purchasable price only when the report clearly states it was a range.
customer-email-assistSkill

用 connector-first、最少 token 的方式审阅 Gmail 客户支持线程。适用于 Codex 需要通过 Codex Gmail connector 读取 Gmail、把清洗后的消息导入本地 SQLite 问题队列、先执行确定性的清洗和分类、只把模型调用保留给 JSON-only 的消息理解和草稿字段生成,并支持 dashboard 审阅、客户审批与排队回复处理的时候。

local-customer-email-replySkill

审阅客户来信,以本地政策或 FAQ 文档为依据起草安全的投诉和咨询回复。

agent-runtime-cache-benchmarkSkill

Compare two structured agent-run artifacts to estimate cache efficiency, explain likely cache breaks, and produce a local benchmark report. Use when a user wants to understand whether a prompt layout, tool manifest, or history shape is helping or hurting prompt-cache reuse.

daily-news-watcherSkill

Persistent daily news monitoring backed by local SQLite and Markdown reports. Use when a user asks Codex to track named publications, fetch the last N hours of news, summarize recent articles by topic, deduplicate articles across runs, or maintain a personal newsroom that survives across sessions.

garbage-collectorSkill

Scan local cleanup targets, apply readable cleanup rules, produce a preview report, and execute approved cleanup actions with logs. Use when a user asks Codex to clean up their computer, empty old Trash items, find duplicated Downloads files, review local storage clutter, or propose safe file cleanup actions before making changes.

local-document-organizerSkill

Preview-first local file organizer. Scan a user-named folder, classify files into category subfolders using readable rules, write a preview Markdown report and JSON plan, execute confirmed moves with persistent SQLite state, and reverse moves with undo. Use when a user asks Codex to organize Downloads, sort a messy folder into Invoices/Receipts/School/Images/Software/PDFs subfolders, propose a folder structure before moving anything, or undo a previous organization run.

personal-knowledge-captureSkill

Capture local or explicitly provided web knowledge sources into cited Markdown notes. Use when a user asks Codex to watch a research folder, register local folders for later scans, summarize new or modified local Markdown/TXT/PDF/DOCX files, capture a provided URL, maintain SQLite state for personal knowledge capture, or generate searchable source-grounded daily notes.

prompt-cache-agent-harnessSkill

Plan and inspect prompt-cache behavior for long-running Claude agent loops. Use when a user wants to split stable tool, system, and history context into cacheable layers, compare captured cache metadata, estimate cost impact from supplied pricing inputs, or keep durable memory outside the cached prefix.