D3k

vercel-labs/dev3000/skills/d3k

作者 vercel-labs3b945d7c5ce2794b374b79607b8ba1ef9bb15693無授權條款收錄於 2026年10月9日更新於 2026年10月9日

Use when the user asks to use d3k, run/dev/test/debug a web project with d3k, or reproduce a browser issue. Own the runtime: reuse or background-start d3k non-interactively, wait for readiness, use its project-stable managed Chrome profile, and inspect unified browser/server evidence.

AI 產生的概覽

操作 d3k 本機 Web 執行環境,用來執行、測試與偵錯 Web 專案,並統一收集瀏覽器與伺服器證據。

功能
此技能指示代理啟動或重用 d3k 本機 Web 執行環境,該環境會在穩定的 Portless URL 後方執行專案的開發伺服器,並管理專案專屬的 Chrome 設定檔。內容涵蓋檢查就緒狀態、以非互動方式在背景啟動 d3k、驅動受管理的瀏覽器進行測試,以及收集統一證據,例如伺服器日誌、瀏覽器主控台輸出、網路活動、互動與螢幕擷取畫面。它也訂定了瀏覽器擁有權與驗證敏感流程的安全規則。
適用情境
當使用者要求使用 d3k 執行、開發、測試或偵錯 Web 專案,或重現瀏覽器問題時使用。它適用於使用者驅動的測試(使用者在可見的瀏覽器中重現問題),以及代理驅動的測試(代理自主驅動受管理的瀏覽器)。
執行需求
需要 d3k CLI,透過 bun(bun install -g dev3000)全域安裝,或在 Bun 無法使用時透過 npm(npm install -g dev3000)安裝。需要一個專案根目錄,其中包含可偵測的套件管理員、開發命令與連接埠,以及可能需要 macOS 管理員授權的 Portless 設定。它不隨附指令碼,僅為指示文件。

d3k Agent Runtime

d3k is the local web runtime for this task. It starts the dev server behind a stable Portless URL, owns a project-stable Chrome profile, and records server logs, browser console output, network activity, interactions, and screenshots in one timeline.

When this skill triggers, operate d3k. Do not merely tell the user how to run it.

Interpret the Request

  • "Let me test/dev my project with d3k": prepare the runtime and headed browser, confirm it is ready, then hand control to the user. Wait for them to reproduce the issue before inspecting evidence.
  • "Test/debug/fix this with d3k": prepare the runtime, then drive the managed browser and investigate autonomously.
  • If ambiguous, start the runtime and browser first. That action is safe and useful for either path.

Start or Reuse d3k

Run from the project root.

  1. Check canonical Portless readiness before starting any app process:
bash
d3k portless status --json

If "setupRequired": true, run:

bash
d3k portless setup

On macOS this opens the system administrator authorization dialog. Wait for the user to approve it, then rerun d3k portless status --json. Do not start d3k until "canonical": true, "serviceInstalled": true, and "setupRequired": false. If authorization is declined or unavailable, stop and explain the blocker. Never silently substitute direct localhost.

  1. Check for an existing project runtime:
bash
d3k status --json

Reuse it only if it reports "running": true, "ready": true, "routing": "portless", "browserConnected": true, and a genuinely port-free https://...localhost appUrl. If an active session reports "routing": "direct", stop that retained d3k session and restart after Portless is ready. Do not start a second dev server or browser.

  1. If d3k is not installed, install it:
bash
bun install -g dev3000

Use npm install -g dev3000 only when Bun is unavailable.

  1. Start d3k with the agent's shell/process tool as a retained background or yielded session (non-TUI by default):
bash
d3k -t

Do not wait for this long-running command to exit. Keep its process/session handle so you can monitor or stop it later. Prefer the execution tool's background/session support over shelling with &.

If the target URL is already known, pass it so the managed browser opens there:

bash
d3k -t --app-url "<url>"

Let d3k auto-detect the package manager, dev command, and port. Add --command, --script, or --port only when detection is wrong or the user specified them.

  1. Poll until the runtime is ready:
bash
d3k status --json

A successful status response is the readiness boundary only when it reports "ready": true, "routing": "portless", "browserConnected": true, and a port-free https://...localhost appUrl. The underlying app port may change between runs. If startup fails, inspect the retained process output and d3k logs --type server; do not launch a separate dev server.

User-Driven Testing

When the user says "let me test":

  1. Confirm the status response includes the app URL and "browserConnected": true.
  2. Tell the user the monitored browser is ready.
  3. Keep the d3k process running and wait for the user to reproduce the behavior.
  4. When they report that it happened, begin with:
bash
d3k errors --contextd3k logs -n 200

Do not replace the headed browser with automation while the user is testing.

Agent-Driven Testing

Drive the exact browser d3k is monitoring:

bash
d3k agent-browser snapshot -id3k agent-browser click @e2d3k agent-browser fill @e3 "text"d3k errors --context

Use --require-d3k-browser when opening a URL so failure cannot silently create another browser:

bash
d3k agent-browser --require-d3k-browser open "<url>"

After every reproduction or code change, replay the relevant interaction and check d3k errors --context again.

Evidence Commands

Prefer these over ad-hoc log scraping:

bash
d3k status --jsond3k errors --contextd3k logs -n 200d3k logs --type browserd3k logs --type server

Artifacts live under ~/.d3k/<project>/, including session.json, logs, screenshots, and the Chrome profile.

Browser and Auth Safety

d3k must own browser startup by default. Its per-project Chrome profile preserves login state, cookies, and local storage.

For Google OAuth, Supabase auth, and other auth-sensitive flows, never substitute raw Chrome, Playwright, a browser MCP session, manual CDP attachment, or agent-browser --profile. Those paths use a different browser/profile and can trigger "This browser or app may not be secure."

If the managed browser is unavailable, stop or interrupt the retained d3k process and restart d3k cleanly. Do not work around it by creating another browser.

Use --headless only for CI or when explicitly requested. Use --servers-only only when browser monitoring is intentionally unwanted.

Operating Rules

  • Do not run npm run dev, bun run dev, or another dev server alongside d3k.
  • Do not start a second d3k when d3k status --json reports an active one.
  • Keep d3k alive across edits and retests.
  • Preserve the project-stable Chrome profile unless the user explicitly asks for a fresh profile.
  • Leave the runtime running when handing a headed browser to the user; stop it only when asked or when the task requires a clean restart.
  • Canonical Portless HTTPS routing is required by default. Never add --no-portless or set PORTLESS=0 unless the user explicitly requests direct localhost routing.

來源與署名

來源:vercel-labs/dev3000位於skills/d3k提交3b945d7

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架