[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6Q1SVXK08YCY32CXAGE0R1P":3,"skill-same:01M6Q1SVXK08YCY32CXAGE0R1P":87},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":26,"linkOnly":27,"markdownContent":28,"markdownBody":29,"frontMatter":30,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":6,"ownerHtmlUrl":39,"ownerBlogUrl":6,"ownerDescription":40,"updatedAt":41,"install":42,"resources":54},"01M6Q1SVXK08YCY32CXAGE0R1P","moltpho",null,"Shop autonomously on Amazon via Moltpho - search products, manage credit, and purchase items using mUSD on Base mainnet","Kernel8901\u002Fai-agent-skills-classification","Kernel8901","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F72647553?v=4","01M6KV388J2H5PNC8D8P940BJD","01M6KV38CS5B3AY63RKZB410YM",7,"MIT","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F浏览器与自动化\u002Fmoltpho\u002FSKILL.md",[],[5,18,19,20,21,22,23,24,25],"search","shop","manage","base","via","amazon","purchase","true","2026-11-10 10:12:30",false,"---\nname: moltpho\ndescription: Shop autonomously on Amazon via Moltpho - search products, manage credit, and purchase items using mUSD on Base mainnet\nmetadata: {\"requires\": {\"http\": true, \"browser\": true}}\n---\n\n# Moltpho Shopping Skill\n\nShop for items on Amazon autonomously using credit-backed mUSD tokens on Base mainnet.\n\n## Overview\n\nMoltpho is a headless shopping mall that enables AI agents to discover and purchase Amazon products using a credit system backed by mUSD (an ERC-20 token on Base mainnet). This skill handles:\n\n- Agent registration and credential management\n- Product search and discovery\n- Autonomous and proactive purchasing\n- Credit balance monitoring\n- x402 payment protocol integration\n\n## Bootstrap Flow\n\nOn first invocation, the skill MUST check for existing credentials and register if needed.\n\n### Credentials Location\n\n| Platform | Path |\n|----------|------|\n| Linux\u002FmacOS | `~\u002F.config\u002Fmoltpho\u002Fcredentials.json` |\n| Windows | `%APPDATA%\\moltpho\\credentials.json` |\n| Override | `MOLTPHO_CREDENTIALS_PATH` environment variable |\n\n### Registration Process\n\n1. **Check credentials file** at the appropriate path\n2. **If missing**, call `POST \u002Fv1\u002Fagents\u002Fregister` with:\n   - `openclaw_instance_id` (if available)\n   - `agent_display_name`\n   - `agent_description`\n   - No shipping profile required at registration\n3. **Save credentials** with `chmod 600` permissions\n4. **Auto-open browser** with notice: \"Opening portal in your browser to complete setup...\"\n5. Registration proceeds WITHOUT shipping profile - orders will fail until owner adds one via portal\n\n### Credentials File Format\n\n```json\n{\n  \"agent_id\": \"uuid\",\n  \"api_key_id\": \"moltpho_key_...\",\n  \"api_key_secret\": \"moltpho_secret_...\",\n  \"api_base_url\": \"https:\u002F\u002Fapi.moltpho.com\",\n  \"wallet_address\": \"0xabc123...\"\n}\n```\n\n## Core Functions\n\n### bootstrap()\n\nInitialize agent credentials and open portal for owner setup.\n\n```\n1. Check if credentials file exists at platform-specific path\n2. If exists and valid: load credentials, verify with GET \u002Fv1\u002Fagents\u002Fme\n3. If missing or invalid:\n   a. Call POST \u002Fv1\u002Fagents\u002Fregister (no auth required)\n   b. Receive: agent_id, api_key_id, api_key_secret, claim_url, wallet_address\n   c. Write credentials file with chmod 600\n   d. Display: \"Opening portal in your browser to complete setup...\"\n   e. Open browser to claim_url (valid for 24 hours)\n4. Return agent status (UNCLAIMED, CLAIMED, DEGRADED, SUSPENDED)\n```\n\n### collect_shipping_profile()\n\nOptionally collect shipping information from the owner.\n\n```\nNote: This is OPTIONAL. Owners can configure shipping via the portal instead.\n      Orders will fail with INVALID_SHIPPING_PROFILE until a profile exists.\n\nIf collecting in conversation:\n1. Request full name\n2. Request address (street, city, state, ZIP)\n3. Request email\n4. Request phone\n5. Validate: US addresses only (international not supported in v1)\n6. Call POST \u002Fv1\u002Fshipping_profiles (upsert_shipping_profile)\n7. Confirm profile saved\n\nThe POST endpoint upserts the default profile:\n- If no profile exists, creates one\n- If a profile exists, updates it\n```\n\n### update_shipping_profile()\n\nUpdate the shipping address for the agent.\n\n```\nParameters:\n- full_name: Recipient full name\n- address1: Street address\n- address2: Apt\u002Fsuite (optional)\n- city: City\n- state: State (2-letter code)\n- postal_code: ZIP code\n- email: Contact email\n- phone: Contact phone\n\nProcess:\n1. Validate all required fields\n2. Validate US address (only US supported in v1)\n3. Call POST \u002Fv1\u002Fshipping_profiles (upserts default profile)\n4. Return updated profile\n\nUse cases:\n- \"Update my shipping address\"\n- \"Change my delivery address to...\"\n- First-time setup during bootstrap\n```\n\n### catalog_search(query, constraints)\n\nSearch for products on Amazon via Moltpho.\n\n```\nParameters:\n- query: Search terms (string)\n- constraints: Optional filters\n  - max_price: Maximum price in USD\n  - category: Product category keyword\n  - min_rating: Minimum star rating (1-5)\n\nProcess:\n1. Call GET \u002Fv1\u002Fcatalog\u002Fsearch?query={query}&limit=20\n2. Apply local constraints if provided\n3. Present results with:\n   - Product title and brand\n   - Moltpho price (final price, includes 10% markup)\n   - Availability status\n   - Rating if available\n4. If cache expired, results include \"prices may have changed\" warning\n\nRate limit: 60 requests\u002Fminute\n```\n\n### purchase(item, qty)\n\nExecute a purchase through the x402 payment flow.\n\n```\nParameters:\n- item: ASIN or product identifier\n- qty: Quantity (default 1)\n\nProcess:\n1. BUDGET CHECK: Call GET \u002Fv1\u002Fbalance to verify available credit\n   - available_credit = balance - active_reservations\n   - Check against per_order_cap if set\n   - Check against daily_cap if set\n\n2. CREATE QUOTE: Call POST \u002Fv1\u002Fquotes\n   - Include: asin, quantity, shipping_profile_id\n   - Returns: quote_id, total_due_usd, expires_at (10 min TTL)\n   - Creates soft reservation against balance\n   - May fail with INVALID_SHIPPING_PROFILE if no profile set\n\n3. INITIATE ORDER: Call POST \u002Fv1\u002Forders with quote_id\n   - First call returns 402 Payment Required with PAYMENT-REQUIRED header\n\n4. SIGN PAYMENT: Call POST \u002Fv1\u002Fwallets\u002Fx402\u002Fsign\n   - Include: payment_required blob, idempotency_key\n   - Returns: payment_signature for x402 header\n\n5. COMPLETE ORDER: Retry POST \u002Fv1\u002Forders with PAYMENT-SIGNATURE header\n   - On success: returns order_id, status (PAID\u002FPLACED)\n   - Soft reservation converted to actual spend\n\nAuto-retry on quote expiry:\n- If quote expires during flow, automatically retry up to 3 times\n- Only retry if new price is within 5% of original quote\n- Fail after 3 retries or if price changed >5%\n\nRate limits:\n- Quotes: 20\u002Fminute\n- Orders: 5\u002Fminute\n- Signing: 10\u002Fminute\n```\n\n### proactive_monitoring()\n\nWatch conversation for purchase need signals and act when appropriate.\n\n```\nThis function runs passively during conversation to detect purchase opportunities.\n\nNEED SIGNALS (explicit):\n- \"I need\", \"we're out of\", \"buy\", \"order\", \"replace\"\n- \"running low on\", \"almost out of\"\n- Direct product mentions with urgency\n\nNEED SIGNALS (implicit):\n- Repeated complaints about missing items\n- Critical item shortages mentioned\n- Context suggesting immediate need\n\nCONFIDENCE SCORING:\n- 1.0: Explicit purchase request (\"buy me X\")\n- 0.8: Strong implied need (\"we're completely out of toilet paper\")\n- 0.5: Weak implied convenience (do NOT buy)\n- 0.0: Unknown\u002Funclear\n\nBUDGET SIGNAL HANDLING:\n- Phrases like \"money is tight\", \"on a budget\", \"can't afford\"\n- Reduce confidence by 0.3-0.5\n- Proceed cautiously if still above threshold\n\nPROACTIVE PURCHASE ALLOWED IF ALL TRUE:\n- Owner has enabled proactive purchasing (default ON)\n- Confidence >= 0.8 (threshold)\n- Item matches low-risk categories:\n  - Household essentials\n  - Office supplies\n  - Cables\u002Fadapters\n  - Basic kitchen items\n  - Toiletries\n- Price \u003C= min(per_order_cap, $75)\n- Item keywords not in denied categories\n- Item not in system blocklist\n- Shipping profile exists\n\nLOGGING:\nEvery purchase logs:\n- \"why we bought\" (decision reason)\n- Signals detected\n- Confidence tier (HIGH\u002FMEDIUM\u002FLOW)\n- Budget impact\n```\n\n### budget_check()\n\nVerify sufficient credit before any purchase.\n\n```\nProcess:\n1. Call GET \u002Fv1\u002Fbalance\n2. Response includes:\n   - available_credit_cents: Spendable amount\n   - staged_refunds: Pending refunds (shown with asterisk)\n   - target_limit: Owner's configured credit limit\n3. Compare against:\n   - Quote total\n   - per_order_cap (if set)\n   - daily_cap (if set, track daily spending)\n4. Return: can_purchase (bool), available_amount, reason_if_blocked\n```\n\n### create_support_ticket(type, description, order_id)\n\nCreate a support ticket for returns, lost packages, or other issues.\n\n```\nParameters:\n- type: Ticket type - RETURN, LOST_PACKAGE, or OTHER\n- description: Detailed description of the issue (1-2000 chars)\n- order_id: Order ID (required for RETURN and LOST_PACKAGE)\n\nProcess:\n1. Validate ticket type and description\n2. If RETURN or LOST_PACKAGE, verify order_id is provided\n3. Call POST \u002Fv1\u002Fsupport_tickets with { type, description, order_id }\n4. Return ticket ID and status\n\nUse cases:\n- \"I want to return this item\" → type=RETURN, link to order\n- \"My package never arrived\" → type=LOST_PACKAGE, link to order\n- \"I have a question about billing\" → type=OTHER, no order needed\n\nNote: Returns and lost packages require a support ticket.\n      Automated refunds only happen for order cancellations.\n```\n\n### list_support_tickets()\n\nList the agent's support tickets.\n\n```\nProcess:\n1. Call GET \u002Fv1\u002Fsupport_tickets\n2. Display tickets with: type, status, order link, creation date\n3. Status meanings:\n   - OPEN: Submitted, awaiting support review\n   - IN_PROGRESS: Being handled\n   - WAITING_CUSTOMER: Support needs more info from you\n   - RESOLVED: Issue resolved\n   - CLOSED: Ticket closed\n```\n\n### logout()\n\nDelete local credentials (agent persists server-side).\n\n```\nProcess:\n1. Delete credentials file at platform-specific path\n2. Display: \"Credentials removed. Agent still exists on Moltpho servers.\"\n3. To fully delete agent, owner must use portal\n\nNote: This only removes LOCAL credentials. The agent account, wallet, and\n      purchase history remain on Moltpho servers until owner deletes via portal.\n```\n\n## Browser Portal Usage\n\nThe skill uses the browser for owner-sensitive operations.\n\n### When to Open Browser\n\n| Action | Method |\n|--------|--------|\n| Complete setup (claim link) | Auto-open with notice |\n| Add\u002Fmanage payment cards | Direct owner to portal |\n| Set credit limits | Direct owner to portal |\n| Configure shipping profile | Direct owner to portal |\n| View order history | Direct owner to portal |\n\n### Browser Guidelines\n\n- Always display notice: \"Opening portal in your browser...\"\n- NEVER request card numbers, passwords, or sensitive credentials in chat\n- Portal handles all PCI-sensitive operations via Stripe Elements\n- Owner authenticates via magic link (email-based)\n\n## API Authentication\n\nAll API requests (except registration) require authentication.\n\n### Headers\n\n```\nAuthorization: Bearer \u003Capi_key_secret>\n```\n\nOr preferably:\n```\nX-Moltpho-Key-Id: \u003Capi_key_id>\nX-Moltpho-Signature: \u003CHMAC signature>\n```\n\n### Idempotency\n\nFor state-changing operations, always include:\n```\nIdempotency-Key: \u003Cunique-key>\n```\n\nRequired for:\n- POST \u002Fv1\u002Fquotes\n- POST \u002Fv1\u002Forders\n- POST \u002Fv1\u002Fwallets\u002Fx402\u002Fsign\n\n## Error Handling\n\n### Common Errors\n\n| Code | Error | Action |\n|------|-------|--------|\n| 401 | UNAUTHORIZED | Re-bootstrap or check credentials |\n| 402 | PAYMENT_REQUIRED | Sign and retry with x402 signature |\n| 409 | PRICE_CHANGED | Re-quote if price increased >2% |\n| 409 | INSUFFICIENT_CREDIT | Inform user, suggest adding credit |\n| 409 | QUOTE_EXPIRED | Auto-retry (up to 3x) or re-quote |\n| 422 | INVALID_SHIPPING_PROFILE | Prompt owner to add shipping via portal |\n| 422 | AGENT_SUSPENDED | Inform owner, direct to portal |\n| 429 | RATE_LIMITED | Wait per Retry-After header |\n| 503 | TOKEN_PAUSED | System halted, wait for admin |\n\n### Quote Expiry Auto-Retry\n\nWhen a quote expires during the x402 flow:\n1. Fetch new quote for same item\n2. Compare price to original quote\n3. If within 5% tolerance: continue with new quote\n4. If >5% change: fail with PRICE_CHANGED\n5. Maximum 3 retry attempts\n\n## Constraints and Limits\n\n### System Limits\n\n| Limit | Value |\n|-------|-------|\n| Maximum item price | $10,000 USD |\n| Quote TTL | 10 minutes (fixed) |\n| Price tolerance | 2% increase allowed |\n| Retry price tolerance | 5% for auto-retry |\n| Max concurrent quotes | 5 per agent |\n| Proactive purchase cap | min(per_order_cap, $75) |\n\n### Rate Limits\n\n| Endpoint | Limit |\n|----------|-------|\n| Catalog search | 60\u002Fminute |\n| Quotes | 20\u002Fminute |\n| Orders | 5\u002Fminute |\n| Signing | 10\u002Fminute |\n\n### Blocked Items (System Enforced)\n\nThe following categories CANNOT be purchased regardless of owner settings:\n- Weapons, firearms, ammunition\n- Controlled substances, prescription medications\n- Tobacco, nicotine products\n- Alcohol\n- Adult content\n- Hazardous materials\n\n## Payment System\n\n### Credit Model\n\n- Owner sets target credit limit in USD\n- Weekly automatic top-up restores credit to target\n- Credit backed by mUSD tokens on Base mainnet\n- 10% markup over Amazon prices (covers fees + gas)\n\n### x402 Flow\n\n1. POST \u002Fv1\u002Forders returns 402 with PAYMENT-REQUIRED header\n2. Call POST \u002Fv1\u002Fwallets\u002Fx402\u002Fsign with payment blob\n3. Wallet service signs EIP-3009 authorization\n4. Retry order with PAYMENT-SIGNATURE header\n5. Facilitator settles on Base mainnet\n6. Order proceeds to fulfillment\n\n### Refunds\n\n| Scenario | Refund Target |\n|----------|---------------|\n| Procurement failure | mUSD balance (auto) |\n| Order canceled (within 5 min) | mUSD balance (auto) |\n| Owner decreases credit limit | Card via Stripe |\n| Return\u002Flost package | Support ticket required (use create_support_ticket) |\n\n## Agent States\n\n| State | Meaning | Can Order? |\n|-------|---------|------------|\n| UNCLAIMED | Registered, awaiting owner claim | No |\n| CLAIMED | Owner claimed, fully operational | Yes |\n| DEGRADED | Payment methods failed, using remaining balance | Yes (if balance) |\n| SUSPENDED | Admin action, requires manual resolution | No |\n\n## Best Practices\n\n### Before Any Purchase\n\n1. Call budget_check() to verify available credit\n2. Confirm shipping profile exists\n3. Check item against category denylist\n4. Verify confidence threshold for proactive purchases\n\n### Conversation Guidelines\n\n- Always confirm purchase with total price before executing\n- Report order status and remaining credit after purchase\n- If budget signals detected, acknowledge constraints\n- Never pressure user to add more credit\n\n### Error Recovery\n\n- On INSUFFICIENT_CREDIT: suggest adding credit via portal\n- On INVALID_SHIPPING_PROFILE: collect shipping info and call upsert_shipping_profile(), or direct to portal\n- On SUSPENDED: explain owner must resolve via portal\n\n## Quick Reference\n\n### Essential Endpoints\n\n| Endpoint | Purpose |\n|----------|---------|\n| POST \u002Fv1\u002Fagents\u002Fregister | New agent registration |\n| GET \u002Fv1\u002Fagents\u002Fme | Current agent status |\n| GET \u002Fv1\u002Fbalance | Available credit |\n| GET \u002Fv1\u002Fcatalog\u002Fsearch | Search products |\n| POST \u002Fv1\u002Fquotes | Create purchase quote |\n| POST \u002Fv1\u002Forders | Place order (x402) |\n| POST \u002Fv1\u002Fwallets\u002Fx402\u002Fsign | Sign payment |\n| GET \u002Fv1\u002Fshipping_profiles | List shipping profiles |\n| POST \u002Fv1\u002Fshipping_profiles | Create\u002Fupdate shipping profile |\n| POST \u002Fv1\u002Fsupport_tickets | Create support ticket |\n| GET \u002Fv1\u002Fsupport_tickets | List support tickets |\n\n### Portal URL\n\n```\nhttps:\u002F\u002Fportal.moltpho.com\n```\n\nOwner actions:\n- \u002Fclaim\u002F{token} - Claim agent ownership\n- \u002Fagents - Manage agents\n- \u002Fcards - Payment methods\n- \u002Forders - Order history\n- \u002Fsettings - Credit limits and preferences\n","# Moltpho Shopping Skill\n\nShop for items on Amazon autonomously using credit-backed mUSD tokens on Base mainnet.\n\n## Overview\n\nMoltpho is a headless shopping mall that enables AI agents to discover and purchase Amazon products using a credit system backed by mUSD (an ERC-20 token on Base mainnet). This skill handles:\n\n- Agent registration and credential management\n- Product search and discovery\n- Autonomous and proactive purchasing\n- Credit balance monitoring\n- x402 payment protocol integration\n\n## Bootstrap Flow\n\nOn first invocation, the skill MUST check for existing credentials and register if needed.\n\n### Credentials Location\n\n| Platform | Path |\n|----------|------|\n| Linux\u002FmacOS | `~\u002F.config\u002Fmoltpho\u002Fcredentials.json` |\n| Windows | `%APPDATA%\\moltpho\\credentials.json` |\n| Override | `MOLTPHO_CREDENTIALS_PATH` environment variable |\n\n### Registration Process\n\n1. **Check credentials file** at the appropriate path\n2. **If missing**, call `POST \u002Fv1\u002Fagents\u002Fregister` with:\n   - `openclaw_instance_id` (if available)\n   - `agent_display_name`\n   - `agent_description`\n   - No shipping profile required at registration\n3. **Save credentials** with `chmod 600` permissions\n4. **Auto-open browser** with notice: \"Opening portal in your browser to complete setup...\"\n5. Registration proceeds WITHOUT shipping profile - orders will fail until owner adds one via portal\n\n### Credentials File Format\n\n```json\n{\n  \"agent_id\": \"uuid\",\n  \"api_key_id\": \"moltpho_key_...\",\n  \"api_key_secret\": \"moltpho_secret_...\",\n  \"api_base_url\": \"https:\u002F\u002Fapi.moltpho.com\",\n  \"wallet_address\": \"0xabc123...\"\n}\n```\n\n## Core Functions\n\n### bootstrap()\n\nInitialize agent credentials and open portal for owner setup.\n\n```\n1. Check if credentials file exists at platform-specific path\n2. If exists and valid: load credentials, verify with GET \u002Fv1\u002Fagents\u002Fme\n3. If missing or invalid:\n   a. Call POST \u002Fv1\u002Fagents\u002Fregister (no auth required)\n   b. Receive: agent_id, api_key_id, api_key_secret, claim_url, wallet_address\n   c. Write credentials file with chmod 600\n   d. Display: \"Opening portal in your browser to complete setup...\"\n   e. Open browser to claim_url (valid for 24 hours)\n4. Return agent status (UNCLAIMED, CLAIMED, DEGRADED, SUSPENDED)\n```\n\n### collect_shipping_profile()\n\nOptionally collect shipping information from the owner.\n\n```\nNote: This is OPTIONAL. Owners can configure shipping via the portal instead.\n      Orders will fail with INVALID_SHIPPING_PROFILE until a profile exists.\n\nIf collecting in conversation:\n1. Request full name\n2. Request address (street, city, state, ZIP)\n3. Request email\n4. Request phone\n5. Validate: US addresses only (international not supported in v1)\n6. Call POST \u002Fv1\u002Fshipping_profiles (upsert_shipping_profile)\n7. Confirm profile saved\n\nThe POST endpoint upserts the default profile:\n- If no profile exists, creates one\n- If a profile exists, updates it\n```\n\n### update_shipping_profile()\n\nUpdate the shipping address for the agent.\n\n```\nParameters:\n- full_name: Recipient full name\n- address1: Street address\n- address2: Apt\u002Fsuite (optional)\n- city: City\n- state: State (2-letter code)\n- postal_code: ZIP code\n- email: Contact email\n- phone: Contact phone\n\nProcess:\n1. Validate all required fields\n2. Validate US address (only US supported in v1)\n3. Call POST \u002Fv1\u002Fshipping_profiles (upserts default profile)\n4. Return updated profile\n\nUse cases:\n- \"Update my shipping address\"\n- \"Change my delivery address to...\"\n- First-time setup during bootstrap\n```\n\n### catalog_search(query, constraints)\n\nSearch for products on Amazon via Moltpho.\n\n```\nParameters:\n- query: Search terms (string)\n- constraints: Optional filters\n  - max_price: Maximum price in USD\n  - category: Product category keyword\n  - min_rating: Minimum star rating (1-5)\n\nProcess:\n1. Call GET \u002Fv1\u002Fcatalog\u002Fsearch?query={query}&limit=20\n2. Apply local constraints if provided\n3. Present results with:\n   - Product title and brand\n   - Moltpho price (final price, includes 10% markup)\n   - Availability status\n   - Rating if available\n4. If cache expired, results include \"prices may have changed\" warning\n\nRate limit: 60 requests\u002Fminute\n```\n\n### purchase(item, qty)\n\nExecute a purchase through the x402 payment flow.\n\n```\nParameters:\n- item: ASIN or product identifier\n- qty: Quantity (default 1)\n\nProcess:\n1. BUDGET CHECK: Call GET \u002Fv1\u002Fbalance to verify available credit\n   - available_credit = balance - active_reservations\n   - Check against per_order_cap if set\n   - Check against daily_cap if set\n\n2. CREATE QUOTE: Call POST \u002Fv1\u002Fquotes\n   - Include: asin, quantity, shipping_profile_id\n   - Returns: quote_id, total_due_usd, expires_at (10 min TTL)\n   - Creates soft reservation against balance\n   - May fail with INVALID_SHIPPING_PROFILE if no profile set\n\n3. INITIATE ORDER: Call POST \u002Fv1\u002Forders with quote_id\n   - First call returns 402 Payment Required with PAYMENT-REQUIRED header\n\n4. SIGN PAYMENT: Call POST \u002Fv1\u002Fwallets\u002Fx402\u002Fsign\n   - Include: payment_required blob, idempotency_key\n   - Returns: payment_signature for x402 header\n\n5. COMPLETE ORDER: Retry POST \u002Fv1\u002Forders with PAYMENT-SIGNATURE header\n   - On success: returns order_id, status (PAID\u002FPLACED)\n   - Soft reservation converted to actual spend\n\nAuto-retry on quote expiry:\n- If quote expires during flow, automatically retry up to 3 times\n- Only retry if new price is within 5% of original quote\n- Fail after 3 retries or if price changed >5%\n\nRate limits:\n- Quotes: 20\u002Fminute\n- Orders: 5\u002Fminute\n- Signing: 10\u002Fminute\n```\n\n### proactive_monitoring()\n\nWatch conversation for purchase need signals and act when appropriate.\n\n```\nThis function runs passively during conversation to detect purchase opportunities.\n\nNEED SIGNALS (explicit):\n- \"I need\", \"we're out of\", \"buy\", \"order\", \"replace\"\n- \"running low on\", \"almost out of\"\n- Direct product mentions with urgency\n\nNEED SIGNALS (implicit):\n- Repeated complaints about missing items\n- Critical item shortages mentioned\n- Context suggesting immediate need\n\nCONFIDENCE SCORING:\n- 1.0: Explicit purchase request (\"buy me X\")\n- 0.8: Strong implied need (\"we're completely out of toilet paper\")\n- 0.5: Weak implied convenience (do NOT buy)\n- 0.0: Unknown\u002Funclear\n\nBUDGET SIGNAL HANDLING:\n- Phrases like \"money is tight\", \"on a budget\", \"can't afford\"\n- Reduce confidence by 0.3-0.5\n- Proceed cautiously if still above threshold\n\nPROACTIVE PURCHASE ALLOWED IF ALL TRUE:\n- Owner has enabled proactive purchasing (default ON)\n- Confidence >= 0.8 (threshold)\n- Item matches low-risk categories:\n  - Household essentials\n  - Office supplies\n  - Cables\u002Fadapters\n  - Basic kitchen items\n  - Toiletries\n- Price \u003C= min(per_order_cap, $75)\n- Item keywords not in denied categories\n- Item not in system blocklist\n- Shipping profile exists\n\nLOGGING:\nEvery purchase logs:\n- \"why we bought\" (decision reason)\n- Signals detected\n- Confidence tier (HIGH\u002FMEDIUM\u002FLOW)\n- Budget impact\n```\n\n### budget_check()\n\nVerify sufficient credit before any purchase.\n\n```\nProcess:\n1. Call GET \u002Fv1\u002Fbalance\n2. Response includes:\n   - available_credit_cents: Spendable amount\n   - staged_refunds: Pending refunds (shown with asterisk)\n   - target_limit: Owner's configured credit limit\n3. Compare against:\n   - Quote total\n   - per_order_cap (if set)\n   - daily_cap (if set, track daily spending)\n4. Return: can_purchase (bool), available_amount, reason_if_blocked\n```\n\n### create_support_ticket(type, description, order_id)\n\nCreate a support ticket for returns, lost packages, or other issues.\n\n```\nParameters:\n- type: Ticket type - RETURN, LOST_PACKAGE, or OTHER\n- description: Detailed description of the issue (1-2000 chars)\n- order_id: Order ID (required for RETURN and LOST_PACKAGE)\n\nProcess:\n1. Validate ticket type and description\n2. If RETURN or LOST_PACKAGE, verify order_id is provided\n3. Call POST \u002Fv1\u002Fsupport_tickets with { type, description, order_id }\n4. Return ticket ID and status\n\nUse cases:\n- \"I want to return this item\" → type=RETURN, link to order\n- \"My package never arrived\" → type=LOST_PACKAGE, link to order\n- \"I have a question about billing\" → type=OTHER, no order needed\n\nNote: Returns and lost packages require a support ticket.\n      Automated refunds only happen for order cancellations.\n```\n\n### list_support_tickets()\n\nList the agent's support tickets.\n\n```\nProcess:\n1. Call GET \u002Fv1\u002Fsupport_tickets\n2. Display tickets with: type, status, order link, creation date\n3. Status meanings:\n   - OPEN: Submitted, awaiting support review\n   - IN_PROGRESS: Being handled\n   - WAITING_CUSTOMER: Support needs more info from you\n   - RESOLVED: Issue resolved\n   - CLOSED: Ticket closed\n```\n\n### logout()\n\nDelete local credentials (agent persists server-side).\n\n```\nProcess:\n1. Delete credentials file at platform-specific path\n2. Display: \"Credentials removed. Agent still exists on Moltpho servers.\"\n3. To fully delete agent, owner must use portal\n\nNote: This only removes LOCAL credentials. The agent account, wallet, and\n      purchase history remain on Moltpho servers until owner deletes via portal.\n```\n\n## Browser Portal Usage\n\nThe skill uses the browser for owner-sensitive operations.\n\n### When to Open Browser\n\n| Action | Method |\n|--------|--------|\n| Complete setup (claim link) | Auto-open with notice |\n| Add\u002Fmanage payment cards | Direct owner to portal |\n| Set credit limits | Direct owner to portal |\n| Configure shipping profile | Direct owner to portal |\n| View order history | Direct owner to portal |\n\n### Browser Guidelines\n\n- Always display notice: \"Opening portal in your browser...\"\n- NEVER request card numbers, passwords, or sensitive credentials in chat\n- Portal handles all PCI-sensitive operations via Stripe Elements\n- Owner authenticates via magic link (email-based)\n\n## API Authentication\n\nAll API requests (except registration) require authentication.\n\n### Headers\n\n```\nAuthorization: Bearer \u003Capi_key_secret>\n```\n\nOr preferably:\n```\nX-Moltpho-Key-Id: \u003Capi_key_id>\nX-Moltpho-Signature: \u003CHMAC signature>\n```\n\n### Idempotency\n\nFor state-changing operations, always include:\n```\nIdempotency-Key: \u003Cunique-key>\n```\n\nRequired for:\n- POST \u002Fv1\u002Fquotes\n- POST \u002Fv1\u002Forders\n- POST \u002Fv1\u002Fwallets\u002Fx402\u002Fsign\n\n## Error Handling\n\n### Common Errors\n\n| Code | Error | Action |\n|------|-------|--------|\n| 401 | UNAUTHORIZED | Re-bootstrap or check credentials |\n| 402 | PAYMENT_REQUIRED | Sign and retry with x402 signature |\n| 409 | PRICE_CHANGED | Re-quote if price increased >2% |\n| 409 | INSUFFICIENT_CREDIT | Inform user, suggest adding credit |\n| 409 | QUOTE_EXPIRED | Auto-retry (up to 3x) or re-quote |\n| 422 | INVALID_SHIPPING_PROFILE | Prompt owner to add shipping via portal |\n| 422 | AGENT_SUSPENDED | Inform owner, direct to portal |\n| 429 | RATE_LIMITED | Wait per Retry-After header |\n| 503 | TOKEN_PAUSED | System halted, wait for admin |\n\n### Quote Expiry Auto-Retry\n\nWhen a quote expires during the x402 flow:\n1. Fetch new quote for same item\n2. Compare price to original quote\n3. If within 5% tolerance: continue with new quote\n4. If >5% change: fail with PRICE_CHANGED\n5. Maximum 3 retry attempts\n\n## Constraints and Limits\n\n### System Limits\n\n| Limit | Value |\n|-------|-------|\n| Maximum item price | $10,000 USD |\n| Quote TTL | 10 minutes (fixed) |\n| Price tolerance | 2% increase allowed |\n| Retry price tolerance | 5% for auto-retry |\n| Max concurrent quotes | 5 per agent |\n| Proactive purchase cap | min(per_order_cap, $75) |\n\n### Rate Limits\n\n| Endpoint | Limit |\n|----------|-------|\n| Catalog search | 60\u002Fminute |\n| Quotes | 20\u002Fminute |\n| Orders | 5\u002Fminute |\n| Signing | 10\u002Fminute |\n\n### Blocked Items (System Enforced)\n\nThe following categories CANNOT be purchased regardless of owner settings:\n- Weapons, firearms, ammunition\n- Controlled substances, prescription medications\n- Tobacco, nicotine products\n- Alcohol\n- Adult content\n- Hazardous materials\n\n## Payment System\n\n### Credit Model\n\n- Owner sets target credit limit in USD\n- Weekly automatic top-up restores credit to target\n- Credit backed by mUSD tokens on Base mainnet\n- 10% markup over Amazon prices (covers fees + gas)\n\n### x402 Flow\n\n1. POST \u002Fv1\u002Forders returns 402 with PAYMENT-REQUIRED header\n2. Call POST \u002Fv1\u002Fwallets\u002Fx402\u002Fsign with payment blob\n3. Wallet service signs EIP-3009 authorization\n4. Retry order with PAYMENT-SIGNATURE header\n5. Facilitator settles on Base mainnet\n6. Order proceeds to fulfillment\n\n### Refunds\n\n| Scenario | Refund Target |\n|----------|---------------|\n| Procurement failure | mUSD balance (auto) |\n| Order canceled (within 5 min) | mUSD balance (auto) |\n| Owner decreases credit limit | Card via Stripe |\n| Return\u002Flost package | Support ticket required (use create_support_ticket) |\n\n## Agent States\n\n| State | Meaning | Can Order? |\n|-------|---------|------------|\n| UNCLAIMED | Registered, awaiting owner claim | No |\n| CLAIMED | Owner claimed, fully operational | Yes |\n| DEGRADED | Payment methods failed, using remaining balance | Yes (if balance) |\n| SUSPENDED | Admin action, requires manual resolution | No |\n\n## Best Practices\n\n### Before Any Purchase\n\n1. Call budget_check() to verify available credit\n2. Confirm shipping profile exists\n3. Check item against category denylist\n4. Verify confidence threshold for proactive purchases\n\n### Conversation Guidelines\n\n- Always confirm purchase with total price before executing\n- Report order status and remaining credit after purchase\n- If budget signals detected, acknowledge constraints\n- Never pressure user to add more credit\n\n### Error Recovery\n\n- On INSUFFICIENT_CREDIT: suggest adding credit via portal\n- On INVALID_SHIPPING_PROFILE: collect shipping info and call upsert_shipping_profile(), or direct to portal\n- On SUSPENDED: explain owner must resolve via portal\n\n## Quick Reference\n\n### Essential Endpoints\n\n| Endpoint | Purpose |\n|----------|---------|\n| POST \u002Fv1\u002Fagents\u002Fregister | New agent registration |\n| GET \u002Fv1\u002Fagents\u002Fme | Current agent status |\n| GET \u002Fv1\u002Fbalance | Available credit |\n| GET \u002Fv1\u002Fcatalog\u002Fsearch | Search products |\n| POST \u002Fv1\u002Fquotes | Create purchase quote |\n| POST \u002Fv1\u002Forders | Place order (x402) |\n| POST \u002Fv1\u002Fwallets\u002Fx402\u002Fsign | Sign payment |\n| GET \u002Fv1\u002Fshipping_profiles | List shipping profiles |\n| POST \u002Fv1\u002Fshipping_profiles | Create\u002Fupdate shipping profile |\n| POST \u002Fv1\u002Fsupport_tickets | Create support ticket |\n| GET \u002Fv1\u002Fsupport_tickets | List support tickets |\n\n### Portal URL\n\n```\nhttps:\u002F\u002Fportal.moltpho.com\n```\n\nOwner actions:\n- \u002Fclaim\u002F{token} - Claim agent ownership\n- \u002Fagents - Manage agents\n- \u002Fcards - Payment methods\n- \u002Forders - Order history\n- \u002Fsettings - Credit limits and preferences\n",{"name":5,"metadata":31,"description":7},{"requires":32},{"http":33,"browser":33},true,"main","f4cb2d49f7667e79ef7804f50396d5aaffdf1f56","浏览器与自动化\u002Fmoltpho",1,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification","https:\u002F\u002Fgithub.com\u002FKernel8901","a little little little dobe in life but science geek","2026-04-05 16:43:56",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":33},[44,47,50],{"tool":45,"command":46},"npx","npx skills add Kernel8901\u002Fai-agent-skills-classification --skill moltpho",{"tool":48,"command":49},"bunx","bunx skills add Kernel8901\u002Fai-agent-skills-classification --skill moltpho",{"tool":51,"command":52},"pnpm","pnpm dlx skills add Kernel8901\u002Fai-agent-skills-classification --skill moltpho","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F浏览器与自动化\u002Fmoltpho\u002FSKILL.md",[55,61,67,71,75,79,83],{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"_meta.json","REFERENCE","参考文档",268,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F浏览器与自动化\u002Fmoltpho\u002F_meta.json",{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"lib\u002F__init__.py","SCRIPT","脚本",2377,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F浏览器与自动化\u002Fmoltpho\u002Flib\u002F__init__.py",{"path":68,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":69,"sourceHtmlUrl":70},"lib\u002Fmoltpho.py",45512,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F浏览器与自动化\u002Fmoltpho\u002Flib\u002Fmoltpho.py",{"path":72,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":73,"sourceHtmlUrl":74},"lib\u002Fproactive.py",23429,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F浏览器与自动化\u002Fmoltpho\u002Flib\u002Fproactive.py",{"path":76,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002FAPI.md",21182,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F浏览器与自动化\u002Fmoltpho\u002Freferences\u002FAPI.md",{"path":80,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002FPOLICIES.md",11826,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F浏览器与自动化\u002Fmoltpho\u002Freferences\u002FPOLICIES.md",{"path":84,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":85,"sourceHtmlUrl":86},"requirements.txt",55,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F浏览器与自动化\u002Fmoltpho\u002Frequirements.txt",[88,111,134,142,149,176],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":26},"01M6Q5R6WZ06RRB9RQTW54B34B","zyfai","Earn yield on any Ethereum wallet on Base, Arbitrum, and Plasma. Use when a user wants passive DeFi yield on their funds. Deploys a non-custodial subaccount (Safe) linked to their EOA, enables automated yield optimization, and lets them deposit\u002Fwithdraw anytime.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzyfai-sdk\u002FSKILL.md",[],[90,95,96,97,98,99,100,101,21,102,103,104,105,106,107,108,109,110],"safe","ethereum","defi","Optimization","user","use","Wallet","deposit","withdraw","yield","arbitrum","non-custodial","passive","defi yield","earn","yield optimization",{"skillNo":112,"name":113,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":26},"01M6Q5R337B5JSNER4P4YS03TN","zerion-api","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api\u002FSKILL.md",[],[117,118,119,120,121,122,123,97,124,101,125,126,127,128,129,130,131,132,133],"api","zerion api","zerion","MCP","mcp server","server","blockchain","transactions","crypto wallet","crypto","evm","solana","query","across","positions","token","prices",{"skillNo":135,"name":136,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":26},"01M6Q5QZFYTDAZMZ27BN5VZXAR","zerion-api-skill","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-skill\u002FSKILL.md",[],[117,140,141,118,119,120,121,122,123,97,124,101,126,127,128,129,130,131,132,133],"api skill","zerion api skill",{"skillNo":143,"name":144,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":145,"categories":146,"keywords":147,"publishedAt":26},"01M6Q5QW17QW98RA3FE45E4RD8","zerion-api-mcp","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-mcp\u002FSKILL.md",[],[120,117,148,118,119,121,122,97,124,101,125,126,127,128,129,130,131,132,133],"zerion api mcp",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":26},"01M6Q5QQYZB7A501BDEQWKGSJT","yahoo-finance-forex","Fetches real-time FOREX news and market data from Yahoo Finance for major currency pairs (EUR\u002FUSD, GBP\u002FUSD, USD\u002FJPY, etc.). Analyzes sentiment and provides trading context.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-forex\u002FSKILL.md",[],[156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175],"finance","yahoo finance","forex","yahoo","yahoo finance forex","github","https","sentiment","real-time","python3","install","Market","usd","news","time","currency","gbp","pip","market data","for",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":182,"publishedAt":26},"01M6Q5QM6VS84WZVM7BKXXPF32","yahoo-finance","This skill should be used when the user asks to \"get stock prices\", \"check stock quotes\", \"look up earnings\", \"get financial data\", \"find trending stocks\", or needs stock market data from Yahoo Finance.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-cli\u002FSKILL.md",[],[156,157,159,183,184,185,186,187,188,167,189,190,191,192,193,194,195,196,133,174],"cli","homebrew","find","check","brew","up","local","get","stock","link","trending","sf","quotes","ln"]