AGENT SKILL

amazon-parser

Fix or extend the Amazon product-page parser (price, title, availability, seller selectors) and add regression fixtures. Use when prices are missing/wrong on some pages, Amazon changed its layout, or a new field must be extracted.

License 许可
MIT
最近更新
2026-11-10
Stars
★ 0
Forks
0

01 前言 Front Matter

name
amazon-parser
description
Fix or extend the Amazon product-page parser (price, title, availability, seller selectors) and add regression fixtures. Use when prices are missing/wrong on some pages, Amazon changed its layout, or a new field must be extracted.

03 SKILL.md 正文

Amazon parser maintenance

Code: packages/amazon-parser/src/ — selectors.ts (selector chains + locale text), product-page.ts (extraction), price.ts, url.ts. Tests: packages/amazon-parser/test/ with HTML fixtures in test/fixtures/.

Workflow

  1. Reproduce with a fixture first. Get the page HTML:
    • Ask the user to save it (Chrome: right-click → "Save as… → Webpage, HTML only"), or
    • Use the amazon-dom-researcher agent (Claude in Chrome) to extract the relevant DOM fragment.
  2. Minimise and sanitise the fixture: keep only the elements the parser reads (#ppd, price blocks, #availability, buy box, #ASIN). Strip scripts, tracking params, session IDs, any personal data (name, address, "Deliver to …", cart). Name it <marketplace>-<scenario>.html and add a comment saying whether it's real or synthetic and the capture date.
  3. Write the failing test in test/product-page.test.ts.
  4. Fix by adding a selector to the front of the relevant chain in selectors.ts (keep old ones as fallbacks — Amazon A/B tests layouts for months). Locale-specific text (Spanish strings) goes in MARKETPLACE_TEXT.
  5. pnpm --filter @repo/amazon-parser test and typecheck.

Rules

  • Parser is read-only: no DOM mutation, no innerHTML, no network.
  • Unknown is better than wrong: return null/'unknown' instead of guessing. The API's corroboration logic handles missing data; it can't detect a silently wrong price.
  • Prices are integer cents via parsePriceToCents; never parseFloat money.
  • Keep the content-script bundle small: no new runtime dependencies here.

04 同仓库更多 Skills

mrluisfer
mrluisfer/amazon-extension

example

Example skill shipped with the plugin template. Replace with a real workflow.

★ 0
mrluisfer
mrluisfer/amazon-extension

new-marketplace

Add support for another Amazon country/marketplace (e.g. amazon.com, amazon.es). Use when the user wants the extension to work on a new Amazon domain.

★ 0
mrluisfer
mrluisfer/amazon-extension

neon

Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, and the AI Gateway. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASE_URL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.

★ 0
mrluisfer
mrluisfer/amazon-extension

neon-postgres

Guides and best practices for working with Lakebase Postgres on Neon: connections, pooled vs direct, schema migrations, branching, autoscaling, scale-to-zero, instant restore, read replicas, IP allow lists, logical replication, and Lakebase Search. Use when the work is an existing DATABASE_URL, SQL, schema, inspect, or search. New backends, Auth, files, Functions, and LLM calls go to the parent `neon` skill. Also use for "@neondatabase/serverless", "@neondatabase/neon-js", "neon inspect db", "semantic search", "vector search", "full-text search", "BM25", or "hybrid search".

★ 0
mrluisfer
mrluisfer/amazon-extension

neon-postgres-egress-optimizer

Diagnose and fix excessive Postgres egress (network data transfer) in a codebase. Use when a user mentions high database bills, unexpected data transfer costs, network transfer charges, egress spikes, "why is my Neon bill so high", "database costs jumped", SELECT * optimization, query overfetching, reduce Neon costs, optimize database usage, or wants to reduce data sent from their database to their application. Also use when reviewing query patterns for cost efficiency, even if the user doesn't explicitly mention egress or data transfer.

★ 0
mrluisfer
mrluisfer/amazon-extension

neon-postgres-branches

Choose and create the right Neon branch type for testing and development. Use when users ask about Neon branching, migration testing with real data, isolated test environments, schema-only branch workflows for sensitive data, resetting a branch from its parent, branch expiration and CI/CD branch lifecycles, or branch creation via Neon CLI or Neon MCP. Triggers include "Neon branch", "test migrations safely", "branch production data", "schema-only branch", "reset branch", "branch per PR" and "sensitive data testing".

★ 0