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.
소스 정보
- 저장소
- JuneQQQ/dify-playwright
- 최근 소스 활동
- 2026년 7월 22일 08:51
- 감지된 SKILL.md 언어
- 영어
- 스타
- 2
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
SKILL.md 표시 중
SKILL.md
소스 지침 · 읽기 전용 미리보기- 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.
GitHub에서 보기