用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/DotHarness/dotcraft --skill dotcraft-desktop-debugging命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | dotcraft-desktop-debugging |
| description | Use Playwright CLI to inspect and interact with a running CDP-enabled DotCraft Desktop. |
Attach the official Playwright CLI to an existing DotCraft Desktop process without owning its lifecycle. Reuse one named session throughout the investigation; do not generate a TypeScript script for routine interaction.
Prefer an already running debug-enabled Desktop. The default endpoint is http://127.0.0.1:9222; accept a different loopback endpoint when the caller provides one.
For source development, start Desktop from desktop/ in a long-lived terminal:
npm run dev:debug
To select a workspace explicitly, forward Electron arguments after an additional --:
npm run dev:debug -- -- --workspace <workspace-path>
For a packaged build, start it explicitly with:
DotCraft.exe --remote-debugging-port=9222
CDP is a startup capability: restart an instance that was opened without the flag. A debug-enabled window shows the CDP status indicator in its lower-right corner; if the indicator is absent, do not try to attach. Do not start Electron from Playwright CLI. dev:debug intentionally fails when port 9222 is already in use instead of choosing another instance or port.
From a DotCraft source checkout, use the repository-local playwright-cli binary. Run it with the stable session name dotcraft and the explicit loopback endpoint:
cd desktop
npx --no-install playwright-cli -s=dotcraft attach --cdp=http://127.0.0.1:9222
If the endpoint is not ready, stop and report it rather than starting another Desktop or scanning ports. Development builds may initially select their DevTools page. List tabs, then select the entry titled DotCraft before waiting for readiness:
npx --no-install playwright-cli -s=dotcraft tab-list
npx --no-install playwright-cli -s=dotcraft tab-select <dotcraft-tab-index>
npx --no-install playwright-cli -s=dotcraft run-code "async page => page.evaluate(async () => { const driver = globalThis.driver; if (typeof driver?.whenWorkbenchRestored !== 'function') throw new Error('DotCraft Desktop driver is unavailable'); await driver.whenWorkbenchRestored(); })"
snapshot or find, then use returned element refs or accessible Playwright locators. Do not invent selectors without inspecting current state.-s=dotcraft for every command. snapshot, click, fill, type, press, console, requests, and screenshot all operate on the same attached page.run-code command instead of creating a file. Keep inline code short and limited to the requested UI flow..craft/attachments/. Remove incidental CLI output after the investigation.The named session owns only its attached Playwright connection. End the investigation with:
npx --no-install playwright-cli -s=dotcraft detach
Never use close, close-all, kill-all, tab-close, ElectronApplication.close(), or Browser.close. Do not terminate Desktop or AppServer processes, take ownership of Desktop stdout, or restart the user's instance without explicit authorization.
When interrupted, detach the named session if it remains available and leave Desktop, its tray process, plugin generations, and AppServer running. Remove only investigation artifacts that are no longer needed.
Do not create a scenario file merely to click, type, inspect, or take a screenshot. A Playwright file is appropriate only when the user asks for a repeatable test or the observed failure should become a maintained regression case. That is a separate implementation task with its own ownership and test review.
To verify the workflow itself, start one debug-enabled Desktop, attach once, run multiple CLI interactions, and detach. Reattach to the same instance to prove reuse. Each detach must leave the same Desktop and AppServer alive without an EPIPE error. Keep scenario-specific smoke scripts out of the repository.