Skip to main content

dify-playwright

Inspect, patch, publish, run, and diagnose workflows on a user-configured Dify deployment through Playwright and Dify APIs. Use for authenticated console operations, workflow run inspection, batch execution, and vision-input debugging.

Informações da origem

Repositório
JuneQQQ/dify-playwright
Última atividade na origem
22 de julho de 2026 às 08:51
Idioma detectado do SKILL.md
inglês
Estrelas
2
Forks
0

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
dify-playwright
description
Inspect, patch, publish, run, and diagnose workflows on a user-configured Dify deployment through Playwright and Dify APIs. Use for authenticated console operations, workflow run inspection, batch execution, and vision-input debugging.
# Dify Playwright Use this skill when a task requires access to a Dify workflow draft, console-only execution logs, or repeatable workflow runs. ## Choose The Correct API | Path | Authentication | Best for | | --- | --- | --- | | Console API | Dify email/password through Playwright | Read/write drafts, publish, inspect node executions | | Service API | Dify app API key | Run an already published workflow | Prefer the Service API when no draft or console-only data is needed. ## Setup ```bash cd /path/to/dify-playwright npm install npx playwright install chromium cp .env.example .env set -a; source .env; set +a ``` The console path requires `DIFY_BASE_URL`, `DIFY_EMAIL`, and `DIFY_PASSWORD`. App-specific operations also require `DIFY_APP_ID`. Never print or commit these values. ## Console Workflow Procedure 1. Read the current draft with `npm run dify -- get-draft output/draft.json`. 2. Inspect node IDs, edges, node types, and the current workflow hash. 3. Patch a local copy while preserving unrelated graph data. 4. Save with `npm run dify -- save-draft input/save-payload.json`. 5. If Dify rejects a stale hash, fetch the draft again and reapply the patch. 6. Publish only after validating graph structure and required node references. 7. Run representative inputs and fetch node executions instead of trusting final text alone. ## Published Runs ```bash export DIFY_APP_API_KEY='<app-api-key>' npm run dify -- run-formal input/run.json output/result.json ``` The command forces streaming mode and extracts the final workflow event. ## Batch Runs And Logs - Use `scripts/run_workflow_batch.mjs` for generic parallel draft or installed-app runs. - Use `scripts/fetch_batch_node_usage.mjs` to collect LLM node model, token, latency, loop, and status fields. - Keep input and output files out of Git when they contain private workflow data. ## Vision Workflows Read [references/dify-vision-files.md](references/dify-vision-files.md). Verify actual LLM prompt file counts from node executions; plausible output text does not prove that an image reached the model. ## Completion Checklist - Confirm the chosen API path matches the task. - Confirm the intended draft hash changed before reporting a saved edit. - Confirm publish completed when the user requested a published change. - Fetch node executions for representative runs. - Check image file counts for vision workflows. - Separate HTTP/file preparation time from LLM time when diagnosing latency. - Do not expose credentials, cookies, private URLs, or workflow payloads in logs or commits.
Ver no GitHub