Logo von Ecommerce Agent Browser Skill

Ecommerce Agent Browser Skill

Community
81211860
ecommerce-agent-browser-skill

通用电商 Agent 浏览器 Skill。通过持久化浏览器、DOM/accessibility-tree 观察、短 id 页面动作、Playwright 执行、recipe、语义轨迹、可选视觉证据和网络 adapter,帮助 Agent 自主操作电商网页;PDD 商家/消费者流程是当前首个已验证平台适配层。

Übersicht

Herausgeber81211860
Repositoryecommerce-agent-browser-skill
Skill-Nameecommerce-agent-browser-skill
Sterne
35
Forks
2
Mitgelieferte Dateien
62
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • Mitgelieferte Dateien: 62

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von 81211860 auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Ecommerce Agent Browser Skill in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/81211860/ecommerce-agent-browser-skill/tree/main
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/81211860/ecommerce-agent-browser-skill.git \
  .claude/skills/ecommerce-agent-browser-skill
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Ecommerce Agent Browser Skill in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Ecommerce Agent Browser Skill automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Ecommerce Agent Browser Skill nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

电商 Agent 浏览器 Skill

Overview

Operate ecommerce web apps through real browser UI while keeping the model as the decision maker. The runtime uses Playwright with a persistent Chromium profile, not a packet-capture browser extension and not token replay. Prefer DOM/accessibility snapshots and semantic recipes; use screenshots, user clicks, or captured browser traffic only as development fallback when a component cannot be read structurally.

This skill now includes a generic Browser Intelligence layer. PDD workflows are a vertical shell on top of that layer; the browser.* commands are site-neutral and may be used on any webpage. Do not put PDD product/customer/store meaning into the generic layer. The model decides whether a browser observation, coordinate, request, or adapter candidate matches the user goal.

Generic browser commands:

bash
node scripts/pdd-operator.mjs browser.observe-light --url https://example.com --out result.json
node scripts/pdd-operator.mjs browser.tabs --include-text --out tabs.json
node scripts/pdd-operator.mjs browser.select-tab --tab-title "Dashboard" --out selected-tab.json
node scripts/pdd-operator.mjs browser.inspect-point --x 320 --y 580 --out point.json
node scripts/pdd-operator.mjs browser.inspect-region --x 240 --y 420 --w 600 --h 220 --out region.json
node scripts/pdd-operator.mjs browser.inspect-row-or-card --x 320 --y 580 --out row.json
node scripts/pdd-operator.mjs browser.zoom-crop --x 240 --y 420 --w 600 --h 220 --scale 2 --out crop.json
node scripts/pdd-operator.mjs browser.script --mode read --script "return helpers.fields()" --out script.json
node scripts/pdd-operator.mjs browser.network-record --duration 5000 --out network.json
node scripts/pdd-operator.mjs browser.adapter-save --input model-approved-adapter.json --save-as adapter.json
node scripts/pdd-operator.mjs browser.adapter-run --adapter-file adapter.json --params '{"page":1}' --out adapter-run.json
node scripts/pdd-operator.mjs browser.memory --op drop --handle page_12 --summary "short retained memory"

Inside a persistent browser session, prefer the shorter live-page aliases for real workflows:

bash
node scripts/pdd-operator.mjs session observe-light --account shop-a --url https://example.com --out page.json
node scripts/pdd-operator.mjs session inspect-region --account shop-a --x 240 --y 420 --w 600 --h 220 --out region.json
node scripts/pdd-operator.mjs session inspect-region --account shop-a --region '{"x":240,"y":420,"width":600,"height":220}' --out region.json
node scripts/pdd-operator.mjs session zoom-crop --account shop-a --x 240 --y 420 --w 600 --h 220 --scale 2 --out crop.json
node scripts/pdd-operator.mjs session script --account shop-a --mode act --model-approved-script true --script-file fallback.js --out script-act.json

browser.observe-light is handle-first: it returns URL/title, visible text, rows/cards/forms/dialogs, short-id pageView, token estimate, screenshot handle, and artifact handles. It does not inline full DOM/AX/HTML/modelEvidence, coordinates, CSS, XPath, or full action registries. Use browser.inspect-point or browser.inspect-region when screenshots are visually useful but small text, IDs, prices, long titles, or form values require precise DOM text. Use browser.tabs/browser.select-tab to enumerate and mechanically select open tabs by model-chosen index, URL, title, or visible text. Use browser.network-record to capture GET/POST/XHR/fetch traffic and produce a mechanical CLI-adapter draft; the model must decide whether to promote it. browser.adapter-save requires modelApprovedAdapter=true and explicit model-chosen operations/verification. browser.adapter-run reads current browser cookies/tokens from the active profile/CDP session, redacts auth from output, and returns response/verification evidence plus a mechanical verificationSummary; HTTP 200 alone is never task success, and the model still decides task success from business verification and page state.

browser.script is the harness-style escape hatch. Use mode=read for DOM/text extraction and diagnosis; it blocks obvious clicks, form submits, DOM mutation, direct network APIs, cookies, and storage access. Use mode=act after the model has chosen the exact low-risk page-native fallback and passes modelApprovedScript=true; it returns pageChange and blocks direct fetch/XHR/cookie/storage access. Use mode=raw when the user has authorized broad testing and the model needs harness-like direct page JavaScript, including page-local fetch; output is still redacted and pageChange must be reviewed.

browser.observe-light.page exposes task-friendly structural evidence: dialogs include text plus visible clickable short ids, tables include headers/row counts/sample rows, rows include row text plus row-scoped action ids, and formControls include labels/placeholders/current values/short ids. These fields are still evidence only; the model decides target identity, form meaning, platform validation, and final success.

For VLM-capable runs, treat screenshot handles as optional visual evidence for layout, occlusion, modals, canvas, icon-only controls, and coordinate planning. Do not use screenshots as the source of truth for small text or business fields; verify IDs, prices, inventory, sales counts, long titles, and form values with browser.inspect-point, browser.inspect-region, or browser.inspect-row-or-card.

For already-open browser windows, set --cdp-url <http://host:port> or PDD_OPERATOR_CONNECT_CDP_URL to attach through Chrome DevTools Protocol. CDP attach mode is generic, keeps the user-owned browser alive, and can prefer a tab via --tab-url <text>, --tab-title <text>, or --tab-text <text>.

Runtime Dependencies

  • Standalone development mode needs Node.js 18+, npm dependencies from package.json, and Playwright's Chromium browser binary.
  • Productized PDD Agent app mode does not require system Node.js. Use the pdd-operator command on PATH, or the absolute command in PDD_OPERATOR_CLI; the app injects a bundled Node shim and PLAYWRIGHT_BROWSERS_PATH.
  • Network access is only needed for first-time standalone npm install and playwright install chromium. The packaged app should already include its dependencies.

Before operating a store in standalone mode, run:

bash
npm run setup
npm run doctor

If a dependency is missing in standalone mode, the agent should fix it directly by running npm run setup from this skill directory. In packaged app mode, do not assume npm or system node exists; use the app's environment self-check and the pdd-operator command. Browser commands also auto-attempt dependency repair once when the Playwright package or Chromium binary is missing.

Set PDD_OPERATOR_HEADLESS=1 for silent default browser operation. Login and risk verification flows still need a visible browser; override with --headless false for those runs.

Operating Rules

  • Scripts are tools, not judges. Treat monitor/product/material candidates from CLI output as evidence for the model to review, not as final business truth. The model must decide whether a candidate is a real product, header, ad, notice, empty state, or aggregate counter before recording it or acting on it.
  • The generic Browser Intelligence layer is also tools-only. It may capture screenshots, DOM text, element chains, region evidence, coordinates, network requests, handles, and adapter drafts, but it must not decide what object is the target, whether a workflow should use CLI, or whether the task succeeded.
  • Do not ask a script to make semantic decisions that depend on page meaning. Use scripts to gather rich DOM/accessibility/text/row/card evidence and to execute confirmed actions; use the model to choose the path, classify candidates, decide whether experience applies, and explain why.
  • When a command returns modelReviewRequired, read productCandidates, pageEvidence, and modelReview; reject false positives such as table headers (30日销量), navigation, notices, and ads. Do not use products unless they are reviewedProducts from model review or the user explicitly requested a low-level debug run.
  • Product material inputCandidates, productUnderstanding, productUnderstandingGate, and experienceStrategy are evidence only. Candidate price/stock values are not publish inputs until the model or user explicitly confirms them. The script must not classify the product, choose category meaning, infer SKU type, decide which experience applies, or decide experience reuse. The model must review the material evidence and explicitly decide category and experience reuse; set productUnderstandingReviewedByModel / modelApprovedCategory only after choosing the category, and set experienceReviewedByModel / modelApprovedExperienceReuse only together with an explicit modelApprovedExperienceId / experienceReuseId and explicit modelApprovedExperienceReuseParts / experienceReuseParts.
  • Product material publish inputs must use the exact product.publish-material contract: title, categoryPath as an array of category levels, categorySearchText, categoryExpectedText, price.groupPrice, price.singlePrice, price.referencePrice, stock, mainImages, detailImages, video, skuSpecs, skuRows, skuImages/skuPreviewImages, productUnderstandingReviewedByModel, and modelApprovedCategory or categoryUserConfirmed when appropriate. skuImages are raw SKU/spec material; row preview upload needs explicit skuRows[].image/previewImage/skuImage or model-chosen row-order skuPreviewImages. If a SKU spec value input is duplicated/equally matching, retry with skuSpecs[].skuSpecValueInputIndex / modelSelectedSkuSpecValueInputIndex or value-specific skuSpecValueInputIndexes. If a SKU table row or cell control is duplicated/equally matching, the tool returns SKU_TABLE_CONTROL_MODEL_REVIEW_REQUIRED; inspect full evidence and retry with skuRows[].skuTableRowIndex / modelSelectedSkuTableRowIndex or skuRows[].skuTableControlIndex / modelSelectedSkuTableControlIndex. Do not invent aliases such as categoryKeywords, skuPlan, or price.marketPrice; convert those model decisions into the standard fields before running the command.
  • If productUnderstandingGate.modelReviewRequired=true, CATEGORY_SELECTION_UNRESOLVED returns only broad/recent/mismatched visible categories, CATEGORY_CANDIDATE_MODEL_REVIEW_REQUIRED returns multiple matching category candidates, or category evidence is insufficient, treat that as evidence for the model, not a script verdict. The model decides whether to keep searching, retry with categoryCandidateIndex / modelSelectedCategoryCandidateIndex, use a visible category it can justify, adjust the publish input, or ask the user for an external business decision. Set modelApprovedCategory=true only after the model has made that current-category decision; set categoryUserConfirmed=true only when the model actually asked and the user answered in this conversation.
  • Default page evidence belongs to the model, not to scripts. observe and explore expose a light model-facing pageView made of visible text lines plus bracket ids; full modelEvidence with raw visible body text, raw DOM HTML, controls, rows, tables, dialogs, visible text elements, open shadow-root HTML/text, accessibility names, and visual evidence paths stays lossless in evidenceRef/sidecar when --out --evidence-sidecar or the desktop app runtime is used. It is marked redaction: none, truncation: none, and semanticFiltering: none; do not hide evidence from Flash, but do not keep large registry/coordinate/control tables in the main context.
  • Use pageView as the primary DOM action view. Plain text is normal page text; bracket ids such as [a] 批量下架 mark the exact visible element the model can operate. To click it, run session act --target-id a or action JSON { "kind": "click", "target": { "shortId": "a" } }. The tool maps the short id to the live DOM and clicks internally; viewport x/y, actionRegistry, coordinates, and controls are not part of the model-facing default protocol. Ids are shortest-first: one character while possible, then two, then three.
  • Read pageView.scrollState before deciding a target is absent. hasMoreBelow / hasMoreAbove / document height / visible range are mechanical page facts; if the goal might be below, above, or lazy-loaded, the model should run a model-chosen scroll, observe again, then interpret the new evidence.
  • Evidence IDs are mechanical selectors, not business decisions. shortId / actionId / id values like a or a0 come from current pageView; unchanged clickable elements keep their short ids within the same persistent browser session when their mechanical fingerprint is stable. If an action returns ACTION_ID_NOT_FOUND_NEED_OBSERVE or ACTION_ID_AMBIGUOUS_NEED_OBSERVE, observe/explore again and choose a current bracket id. Legacy coordinateId remains a fallback for visual/canvas diagnostics only.
  • Treat large browser evidence as temporary memory. Keep the latest necessary observation and pageChange in active reasoning; drop or summarize stale screenshot/DOM/network handles after comparing them. If an app runner controls the model context, it should inject only active evidence, summaries for dropped/summarized handles, and recoverable handle indexes. If the SDK cannot prune old messages, keep using handle-first commands so large details do not enter the history by default.
  • For CLI adapters, always store at least one model-defined business verification rule when the response body has a success/error code or expected result shape. A status rule such as {type:"status",status:200} proves only transport success; pair it with jsonPathEquals, bodyIncludes, or another explicit rule so browser.adapter-run can surface business failures without deciding the user goal.
  • Use browser.script only after the normal observe/inspect/act path is insufficient, unless the user explicitly asks for harness-like direct testing. Start with mode=read to extract DOM evidence; use mode=act with modelApprovedScript=true for controlled operations; use mode=raw for authorized harness-like direct page JS/fetch. Always review post-script pageChange before declaring success.
  • In Windows Bash, do not use cmd-style %USERPROFILE% or %APPDATA% paths for artifacts; use $PWD, $HOME, $APPDATA, or the injected absolute workspace/material paths.
  • Always inspect the current page before acting. For real task flows, start with scripts/pdd-operator.mjs session observe-light and use session inspect-region / session inspect-point / session zoom-crop for targeted progressive disclosure. Escalate to full session observe or session explore only when light pageView and targeted evidence are insufficient. Use session act so the browser window, page state, focus, and transient confirmation UI stay alive across CLI calls. Use plain observe/act only for short diagnostics, dry isolated tests, or when intentionally closing the browser after the command.
  • Fast-path state-changing flow: session observe-light -> model chooses current short ids/regions -> session act sequence when trigger and confirmation can share one live page -> read pageChange.afterSnapshot.pageView -> targeted inspect/zoom only if uncertain -> one terminal business verification. Do not run heavy scans after every small click unless pageChange is ambiguous or the final business state must be proven.
  • Treat operation as observe/explore -> one action -> read pageChange -> interpret -> next action. act and recipe action steps return pageChange, a generic structural diff across URL, dialogs, controls, visible text, rows, page regions, counters/status text, feedbackSignals, fieldSignals, focus, and scroll. A short-id click uses the previous snapshot as the before baseline instead of re-observing before the click, then captures a fresh afterSnapshot.pageView after the click. pageChange.beforeModelEvidence and pageChange.afterSnapshot.modelEvidence are the full before/after evidence for the model, including screenshot/canvas visual evidence when enabled by the CLI; use them instead of relying on script summaries. After comparing, treat old pageView blocks as stale and keep only the latest pageView plus evidence refs in active reasoning unless you intentionally reread a sidecar. actionSignals and scriptBlockingCandidates are hints only, not final decisions.
  • Transient confirmation UI must stay in the same live browser session. Prefer one session act sequence when the model can choose the trigger and confirmation together. If the first session act already opened a modal/popover/confirm box, read that action's pageChange.afterSnapshot.pageView and click the model-selected fresh confirmation short id because the persistent session keeps the same page alive. Do not use a second plain standalone act command for transient UI; plain act closes the browser context after the command and can lose the dialog.
  • Do not narrow feedback detection to red validation text, toast messages, or known upload counters. Any visible structural change can be the feedback: new text, removed text, disabled/enabled controls, a dialog/drawer/popover, a tab/route change, row changes, counter changes, feedbackSignals, fieldSignals, focus/scroll changes, or a changed page region. If pageChange is empty or ambiguous, run observe or explore again before continuing.
  • When explore returns openIssues, treat each suggestedAction as script-candidate evidence only. The model must choose the repair path from full evidence before changing strategy: upload missing media, fill required text fields with model/user-approved values, use choose for custom dropdowns/comboboxes with exact visible options, or click the page's own "去处理" control. After each repair, observe the returned pageChange before the next action.
  • If visible empty fields are already reported by openIssues/fieldSignals, repairOpenIssues first returns repair candidates for model review. Re-run it with modelApprovedRepair=true only after the model has decided that generic repair is appropriate and supplied exact repairLabels/modelApprovedRepairLabels or values keys for the fields to repair; scripts must not choose repair targets, even when there is only one candidate, and must not choose dropdown options or business values by themselves.
  • Prefer current evidence over stale memory. Role/name/label/placeholder/text selectors remain useful, but for visible DOM controls prefer current pageView bracket ids because they avoid ambiguity without exposing coordinates. Use legacy coordinateClick / clickAt only when the target is genuinely visual/canvas/hotspot and no DOM short id exists. Scripts execute only the model-supplied id or coordinates and must not infer the target meaning.
  • If the model only needs to reveal lower page content, use a scroll action such as session act --account default --action scroll --out scroll.json or {kind:"scroll",deltaY:800}. Do not click arbitrary bracket ids as a substitute for scrolling.
  • For forms, pageView may expose fields as [id] <label> value=<current> placeholder=<hint>. Choose fill targets by the explicit label and current value, not by generic placeholders such as 请输入. If several fields share the same placeholder, use their labels, row text, or targeted inspect evidence before filling.
  • If LOCATOR_MODEL_REVIEW_REQUIRED is returned, inspect returned samples and current pageView / modelEvidence; retry with a unique current short id, row scope, css/xpath+index, or explicit model-selected index. Do not repeat the same ambiguous text/label/placeholder selector.
  • For text entry after a model-selected focus/click, type or fill may use the currently focused editable element when no target is supplied, or when duplicate matching placeholders/labels prevent a unique locator but the focused element matches the model-supplied target constraints. Focus is only reliable inside the same live CLI action/sequence; across separate CLI commands, include target.shortId, target.actionId, target.id, or another exact current selector. Put the intended text in value; text, input, and content are accepted as mechanical aliases for brittle model outputs. If the model supplies exact coordinates on type/fill as a visual fallback, the tool mechanically clicks that point and then types/fills the editable focused by that click in the same live action. This is a coordinate/focus-preserving fallback, not permission for scripts to pick among candidates.
  • Upload targets must be model-scoped. If multiple file inputs match the same section and accept type, upload returns UPLOAD_INPUT_MODEL_REVIEW_REQUIRED; inspect full evidence and retry with target.index or a more specific section/target. If a filechooser route exposes multiple matching upload buttons, it returns UPLOAD_BUTTON_MODEL_REVIEW_REQUIRED; retry with fileChooserButtonIndex/uploadButtonIndex or a more specific section/target. Scripts must not rank-pick a matching upload input or button.
  • Do not pipe JSON command output through head, grep, or other truncating filters when deciding state. Use --out <file>, then read the saved JSON fields such as ok, code, message, goodsId, foundState, failedStep, results, and pageChange.
  • Do not Read very large result JSON files wholesale. Use a JSON parser or node -e to extract the specific non-semantic evidence fields you need, such as ok, code, message, failedStep, availableCategorySamples, suggestedRetry, and modelEvidence. Extraction may reduce transport size, but it must not make the business decision for the model.
  • For product state changes, work from the user's goal first. Recipe aliases and saved experience are accelerators, not rails. Inspect the current page and prefer any semantically correct page-native control whose scope matches the requested records; verify the final state. Use first-class single-record aliases such as product.scan-state, product.down-shelf, product.delete-downshelved, product.delete-draft, product.delete-rejected, and product.resubmit-draft as fallbacks or when the target is one record. If an alias or page-native action fails after a possible state-changing click, scan the affected goods IDs or list state before retrying.
  • Do not stop on ordinary recoverable failures. If login/risk verification is not blocking and the user's intent is clear, diagnose, retry with a safer semantic path, scan final state, and continue until the task is done or a real stop condition below is reached.
  • Treat PDD login, SMS, CAPTCHA, face verification, and other risk controls as handoff points. Do not bypass them.
  • State-changing actions need explicit authorization, but the user's current request counts as that authorization when it clearly names the target and action. Do not ask for a second confirmation in that case; pass the required --confirm <token> and complete the task. Ask only when the target, action, scope, or buyer/store impact is ambiguous.
  • Keep each store account in a separate browser profile. Do not copy cookies or tokens between accounts.
  • Prefer --account <alias> over raw --profile in productized flows. Every command that opens or operates PDD pages (login-check, observe, explore, act, recipes, and product/customer tools) should explicitly include the intended --account <alias>. --account shop-a maps to ~/.pdd-operator/profiles/shop-a by default.
  • In app/productized flows, respect PDD_OPERATOR_HEADLESS=1 and stay silent/headless unless the user explicitly asks to see the browser or PDD requires login/risk verification.
  • Never run two concurrent jobs with the same --account or --profile; the runtime uses an application-level profile lease plus Chromium's own lock as a second guard. Use a distinct account alias for each parallel store.
  • Write artifacts under artifacts/ or a caller-provided output directory. Never log cookies, tokens, SMS codes, passwords, buyer personal data, or payment data.

Quick Start

From the skill directory in standalone mode:

bash
npm run setup
node scripts/pdd-operator.mjs accounts init --account shop-a
node scripts/pdd-operator.mjs accounts status --account shop-a
node scripts/pdd-operator.mjs login-check --account shop-a --wait
node scripts/pdd-operator.mjs session start --account shop-a
node scripts/pdd-operator.mjs session observe-light --account shop-a --url https://mms.pinduoduo.com/goods/goods_list
node scripts/pdd-operator.mjs session menus --account shop-a
node scripts/pdd-operator.mjs session stop --account shop-a

When running from another desktop agent with a workspace outside this skill directory, avoid cd ... && ... command chains. In productized PDD Agent app mode, prefer pdd-operator so the bundled runtime works on machines without Node.js. In Windows Bash, use pdd-operator first, then "$PDD_OPERATOR_POSIX_CLI" if the PATH command is unavailable; reserve "$PDD_OPERATOR_CLI" for PowerShell/cmd. Do not paste literal C:\...\pdd-operator.cmd or C:\...\PDD Agent.exe paths; the POSIX shim handles path conversion. In standalone mode, prefer npm --prefix "$PDD_OPERATOR_HOME" or the absolute script path supplied by the calling app so permission allowlists can match stable command prefixes without hard-coding a machine-specific path:

bash
PDD_OPERATOR_HOME="/absolute/path/to/pdd-merchant-operator"
pdd-operator menus --account shop-a
"$PDD_OPERATOR_POSIX_CLI" menus --account shop-a
npm --prefix "$PDD_OPERATOR_HOME" run doctor
npm --prefix "$PDD_OPERATOR_HOME" run setup
node "$PDD_OPERATOR_HOME/scripts/pdd-operator.mjs" menus --account shop-a

If Reasonix also has a global copy under ~/.reasonix/skills/pdd-merchant-operator, make sure it is synchronized with this source-of-truth directory or configured as a thin pointer to it; stale global copies are a common cause of missing recipes. When validating with Reasonix, require a transcript that contains real tool_start and tool entries with command output. Plain reasonix run without tool execution can emit command-looking text that was not actually run; do not treat that as proof.

For a known workflow, run a recipe:

bash
node scripts/pdd-operator.mjs run-recipe \
  --account shop-a \
  --recipe recipes/product.create-basic.recipe.json \
  --input /absolute/path/product.json

Add --confirm publish when the user's current request explicitly asks to publish/list the item. Use --dry-run to validate recipe structure, input, and confirmation gates without opening the browser or changing store state.

Common recipe aliases are also exposed as first-class CLI commands so external agents can use intuitive names without remembering run-recipe paths:

bash
node scripts/pdd-operator.mjs product.scan-state --account shop-a --goodsId 123 --soft-fail
node scripts/pdd-operator.mjs product.resubmit-draft --account shop-a --goodsId 123 --confirm publish
node scripts/pdd-operator.mjs product.publish-material --account shop-a --input /absolute/path/product.json --confirm publish
node scripts/pdd-operator.mjs product.delete-draft --account shop-a --goodsId 123 --confirm deleteDraft
node scripts/pdd-operator.mjs product.delete-rejected --account shop-a --goodsId 123 --confirm deleteDraft
node scripts/pdd-operator.mjs customer-service.reply --account shop-a --conversationText "买家原话" --message "回复内容" --confirm sendMessage

Workflow

  1. Check login with login-check. If login is required, open the headed browser and ask the user to finish login.
  2. Read guides/index.md, then load only the one module guide matching the requested operation.
  3. Observe the page with observe or menus; read the returned JSON, not the screenshot, when deciding next action.
  4. Use an existing recipe if available. For new features, use act steps against observed component IDs or semantic targets, then interpret the returned pageChange before the next action.
  5. For record pages, scope actions to a stable row identifier such as goodsId, orderId, aftersaleId, or visible conversation text using target.rowText before clicking row actions.
  6. If a component cannot be found structurally, use visual/manual assistance once with record-trace, then normalize the raw trace into a recipe.
  7. Verify the final state with a recipe assertion/extract step. For product publishing, first interpret the submit action's pageChange on the current page, then verify the product list state (在售中, 发布中, 已驳回) rather than trusting the success page.
  8. After a previously unknown path succeeds, update the matching guide and add a recipe so future runs can load it progressively instead of rediscovering it.

Autonomy And Learning Contract

When a recipe fails, a selector is missing, or a page differs from the guide, the agent must keep working without asking the user to say "continue" again. Follow references/failure-recovery.md, then guides/path-capture.md: observe/explore, try one low-risk semantic action, observe again, and loop until the path is proven or a real stop condition is reached. Preserve any created record IDs for resume or cleanup.

Stop and ask the user only for: login/SMS/CAPTCHA/face/risk verification, genuinely ambiguous target/action/scope, missing business facts that cannot be inferred safely such as real price or stock, legal/qualification decisions, or an operation whose buyer/store impact is unclear. Do not treat selector drift, hidden file inputs, failed first scans, slow page loads, or unreadable widgets as user blockers. For authorized MVP/test operations, use the required --confirm token and proceed.

Whenever a new workaround or route succeeds, save the reusable notes or draft recipe under artifacts/candidates/, promote stable steps to recipes/ when replayed, and update exactly one relevant guide under guides/. A successful one-off fix that is not written back into the skill is incomplete.

Progressive Guides

Start with guides/index.md. It maps business modules to focused guides:

  • guides/product-management.md
  • guides/shipping-management.md
  • guides/aftersales-management.md
  • guides/customer-service.md
  • guides/shop-management.md
  • guides/marketing-promotion.md
  • guides/data-center.md
  • guides/finance-risk.md
  • guides/auxiliary-modules.md
  • guides/account-session.md
  • guides/navigation-and-coverage.md
  • guides/path-capture.md
  • guides/product-material-package.md

Keep SKILL.md as the thin entrypoint. Put durable selectors, routes, blockers, and proven recipes in the relevant guide. Do not bulk-load every guide for a single task.

Account Switching and Parallel Work

Login state is stored locally in the browser profile directory for each account alias:

text
~/.pdd-operator/profiles/<account-alias>

This profile directory contains browser cookies/localStorage/session state and is not part of the skill. Keep it outside the skill so the skill can be copied safely without copying credentials. Set PDD_OPERATOR_PROFILE_ROOT=/some/path to choose another portable per-machine location.

Use separate aliases for separate stores:

bash
node scripts/pdd-operator.mjs accounts init --account store-a
node scripts/pdd-operator.mjs accounts init --account store-b
node scripts/pdd-operator.mjs login-check --account store-a --wait
node scripts/pdd-operator.mjs login-check --account store-b --wait

After both accounts are logged in, switching is just choosing the alias:

bash
node scripts/pdd-operator.mjs menus --account store-a
node scripts/pdd-operator.mjs menus --account store-b

Parallel jobs are allowed only when each job uses a different alias/profile and separate artifact paths. The runtime does not copy cookies, tokens, or profile files between accounts.

accounts status --account <alias> shows the local profile path, operator lock state, last login-check result, and any visible store identity captured from the merchant page. This metadata is for operator safety only; it must not include cookies, tokens, passwords, SMS codes, buyer personal data, or payment data.

Core Commands

  • login-check: open the merchant backend and report whether the account is logged in.
  • accounts: list, initialize, inspect status, or print the local profile path for account aliases.
  • session: start/reuse/stop a persistent browser daemon and proxy page commands through it. Use session observe-light, targeted session inspect-*/session zoom-crop, session act, session run-recipe, and recipe aliases for real workflows so one browser page survives until session stop, task completion, or user stop. Use full session observe/session explore only when light evidence is insufficient. The proxy does not make business decisions; it only keeps the live page and executes the same model-selected commands. session navigate --url / session goto --url are mechanical navigation aliases for model-selected URLs.
  • observe: emit structured page JSON plus pageView and full modelEvidence: raw visible body text, raw DOM HTML, controls, rows, tables, dialogs, visible text elements, open shadow-root HTML/text, screenshot/canvas visual evidence paths, and optional raw accessibility-tree nodes with no redaction, truncation, or semantic filtering. Use --wait-text or --settle-ms when the main content loads after the shell.
  • explore: emit a structured unknown-path exploration pack plus model-facing pageView, lossless modelEvidence/evidenceRef, recordListAffordances, action templates, and a candidate recipe skeleton. It does not expose model-facing actionRegistry, coordinates, controls, or suggestedTargets; choose visible controls from pageView ids. recordListAffordances, goalActionHints, and batch actionTemplates are evidence/templates only and require model review of row scope and toolbar semantics before acting. Use --wait-text <record id/text> on list pages so visible lines are captured after data loads. Only use explicit --limit, --row-limit, or --issue-limit for human-requested small diagnostics.
  • If observe or explore lands on a login or verification page, the command returns LOGIN_REQUIRED / CAPTCHA_REQUIRED and still includes the full snapshot.modelEvidence or exploration modelEvidence. Treat that as a page-state signal, not a business decision; ask the user to complete login in a visible browser before retrying the current goal.
  • menus: discover visible sidebar/top navigation links and produce candidate feature IDs.
  • act: run one semantic or coordinate action such as click, coordinateClick, clickAt, doubleClick, rightClick, check, focus, blur, clear, hover, press, scroll, drag, mouse, selectRows, sequence, fill, type, setValue, select, choose, repairOpenIssues, upload, waitFor, assert, openMenu, or goto. Prefer current pageView short ids for DOM controls: session act --target-id a or { "kind": "click", "target": { "shortId": "a" } }. Use coordinateClick / clickAt only when the model has chosen exact viewport x/y for a visual/canvas fallback; coordinate aliases on click such as target.position, target.center, or target.action are accepted only as mechanical x/y normalization. session act --target <json>, --target-id <id>, --action-id <id>, --short-id <id>, --coordinate-id <id>, and action files shaped as {actions:[...]} are also mechanically normalized into the same model-selected click/coordinateClick/sequence protocol. Use setValue when the model has chosen one exact target component and one exact value for native inputs, range/color/date/time fields, selects, multi-selects, contenteditable fields, or value-like custom elements; it sets only the supplied value and returns an error instead of inventing missing values or choosing fallback options. Native select uses the same model-reviewed exact option semantics as setValue; duplicate exact options return SET_VALUE_OPTION_AMBIGUOUS until the model supplies optionIndex, modelSelectedOptionIndex, or optionCandidateNumber. For choose, if the same exact visible option appears more than once, the tool returns CHOICE_OPTION_MODEL_REVIEW_REQUIRED; the model must retry with optionTarget, zero-based optionIndex/modelSelectedOptionIndex, one-based optionCandidateNumber, or a more specific exact option. Use sequence when multiple page-native steps must share one live page state, such as select rows -> click toolbar action -> confirm. An action-file whose top-level JSON is an array is treated as that same sequence shape. Real child action steps return pageChange with full before/after modelEvidence, including visual evidence paths by default in CLI mode, so the model can understand what changed after each action. The sequence container itself does not duplicate a full extra pageChange unless traceChange:true is set on the sequence. In a sequence, later child steps may use beforeModelEvidenceRef pointing to the previous child afterSnapshot.modelEvidence; this is a lossless in-result reference, not truncation or filtering.
  • For long real flows, pass --evidence-sidecar together with --out. In the desktop App, PDD_OPERATOR_AUTO_EVIDENCE_SIDECAR=1 enables the same lossless sidecar behavior automatically for --out results. Large modelEvidence blocks are then written as complete JSON files beside the result and replaced by evidenceRef objects containing path, SHA256, byte count, and source pointer. This is a lossless storage optimization only; before making semantic or business decisions, read the referenced evidence file and use its modelEvidence.
  • evidence.read: read and verify a complete modelEvidence sidecar without opening a browser. Use evidence.read --path <evidenceRef.path> --sha256 <evidenceRef.sha256> when the next decision depends on the full page evidence. You can also resolve from the main result with evidence.read --result <result.json> --source-pointer <evidenceRef.sourcePointer>. Use --metadata-only only for integrity checks; semantic decisions require the full returned modelEvidence.
  • Ambiguous targets such as repeated text: "删除", role: "button", name: "删除", broad css, or broad xpath return LOCATOR_MODEL_REVIEW_REQUIRED instead of clicking the first match. If rowText/withinText itself matches multiple rows, the command returns ROW_SCOPE_MODEL_REVIEW_REQUIRED. Inspect full modelEvidence and retry with unique rowText, withinText, id, css, xpath, model-selected index, or model-selected rowIndex.
  • run-recipe: execute a JSON recipe with templated input. Each action-like step includes pageChange; inspect failed and post-submit step changes before routing recovery.
  • run-recipe --dry-run: validate a recipe/input and print planned steps without opening the browser.
  • Product material publishing: product.publish-material uses only the current input JSON as authoritative data; it does not read sibling recipe-input.json, draft-input.json, or create-input.json files to fill missing fields. It defaults to the create-basic flow for normal material folders, treats sourceGoodsId as a template route only when explicitly requested by publishStrategy/useSourceGoodsId, searches/selects the model-approved leaf category instead of broad recent categories, returns CATEGORY_SELECTION_UNRESOLVED with visible alternatives and attempts when the leaf is unavailable, uploads section-scoped main/detail media, keeps loose specImages/skuImages as raw material evidence unless the model maps them to SKU rows or explicitly approves detail-image merge, verifies submit feedback, scans the final list state, records successful category/upload/repair experience under the operator experience store, and offers same-leaf experience evidence on later product.publish-material runs without letting it decide the current category. It uses product.publish-similar only as an optional template route.
  • Recipe commands: product.scan-state, product.publish-similar, product.resubmit-draft, product.down-shelf, product.delete-draft, product.delete-rejected, product.delete-downshelved, and customer-service.reply dispatch to matching single-record recipes and accept either --input <json> or direct flags such as --goodsId. For multi-record goals, discover and execute page-native batch controls through observe/explore/act instead of relying on a synthetic all-items shortcut.
  • record-trace: let a human or visual agent operate once while the runtime records semantic click/fill events.
  • normalize-trace: convert a raw trace into reusable semantic recipe steps.
  • diagnose: capture URL, DOM summary, accessibility snapshot, screenshot, and recent console errors for debugging.

Unknown Path Protocol

When no recipe exists, a recipe is narrower than the user's goal, or the page exposes a better matching control, do not guess from memory and do not stop at the first failure. Start with session observe-light, read the compact pageView first, and use session inspect-region / session inspect-point / session zoom-crop when the model needs more detail. Escalate to session explore --goal "<operation>" only when the light view and targeted inspections are insufficient. Execute one low-risk session act step or a model-approved sequence using the selected current short id/selector, interpret its pageChange, and keep looping in that same persistent session until the path is proven or a stop condition is reached. Scripts are eyes and hands only: they may collect DOM/accessibility/action evidence, but the model decides what the page means, which controls match the user's intent, and whether a candidate is real data or just a label such as 30日销量. Prefer page-native bulk controls for multi-record goals when their text and selected scope match the request; otherwise use single-record recipe aliases in a serialized fallback. If pageChange is empty, too broad, ambiguous, or returns ACTION_ID_NOT_FOUND_NEED_OBSERVE, run session observe-light first and only escalate to full session observe/session explore if needed. If structural data is insufficient, use visual/manual trace as a learning tool for selectors, not as a reason to wait for user permission. Use rowText for record actions and assertValue after critical fills. For product flows, reserve product.scan-state or a scanProductState step for precondition checks that affect the route, possible state-changing failures, or terminal verification instead of running it after every small click. If product.publish-similar returns PRODUCT_STATE_MISMATCH with foundState: "草稿箱" and row text 编辑中, use product.resubmit-draft --goodsId <id> --confirm publish instead of rerunning publish from the source product. For product deletions, trust only the post-delete scanProductState "absent": true result; raw notText can pass while a table is still loading. If a write recipe fails after creating a record, inspect returned vars such as goodsId, run login-check --wait if needed, then resume with a scan/cleanup recipe instead of restarting. When the path succeeds, save a candidate recipe under artifacts/candidates/, replay it, then promote it to recipes/ and update the module guide.

References

  • Read references/architecture.md before changing the runtime design.
  • Read guides/index.md before choosing module-specific instructions.
  • Read references/coverage-plan.md before expanding module coverage.
  • Read references/recipe-authoring.md before adding or editing recipes.
  • Read references/trace-format.md when converting visual/manual operations into reusable steps.
  • Read references/failure-recovery.md when handling login expiry, CAPTCHA, page changes, or missing selectors.

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Weitere Dateien: 2.

Häufig gestellte Fragen

Was macht der KI-Skill Ecommerce Agent Browser Skill?

通用电商 Agent 浏览器 Skill。通过持久化浏览器、DOM/accessibility-tree 观察、短 id 页面动作、Playwright 执行、recipe、语义轨迹、可选视觉证据和网络 adapter,帮助 Agent 自主操作电商网页;PDD 商家/消费者流程是当前首个已验证平台适配层。

Warum Ecommerce Agent Browser Skill in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Ecommerce Agent Browser Skill besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Ecommerce Agent Browser Skill in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/81211860/ecommerce-agent-browser-skill/tree/main ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Ecommerce Agent Browser Skill nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Ecommerce Agent Browser Skill verwenden?

So viele Sie möchten. In TypingMind können Sie Ecommerce Agent Browser Skill mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Ecommerce Agent Browser Skill kostenlos?

Der Skill wird von 81211860 auf GitHub veröffentlicht. Prüfen Sie im Repository, ob dort Lizenzbedingungen angegeben sind. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇