DeepSeek Collaboration
The user wants Codex to coordinate and verify, DeepSeek Harness to implement, and no manual copying between applications. A request to collaborate authorizes task handoff within the requested scope. Do not ask the user to relay prompts or results.
Local Interface
Automatic Dashboard on Skill Invocation
Whenever this skill is invoked explicitly or selected for a collaboration request, automatically start/reuse and visibly open the dashboard as the first operational step, before planning or dispatching work. Do not wait for the first task dispatch and do not ask whether to open it: this user has explicitly requested automatic opening. If no project has been selected yet, use the current workspace so invoking the skill alone still opens a dashboard; switch to the actual project dashboard once that workspace is established.
Start or reuse the local live dashboard:
python '<skill-directory>/scripts/dashboard.py' --workspace '<absolute-project-directory>' --start
After --start succeeds on EVERY invocation, proactively send a commentary message with the exact returned URL as a clickable Markdown link, labeled "本次协作板". Do this BEFORE attempting browser opening or dispatching any task, even if a dashboard was reused or a tab is already open. Use the URL returned for the current project's workspace; never reuse a remembered link from another project. Do not omit the link because the browser is blocked. Providing a link enables manual access but does not remove firewall or browser restrictions. If startup fails, report that failure instead of giving a stale URL. Immediately show the returned loopback URL in Codex's browser with open_in_codex or the browser tool. Reuse an already open tab for this dashboard; with the browser tool mark the user-facing tab as a deliverable so it stays open after the turn. Verify the page is visible and connected, then continue the task and share the link. A link alone does not satisfy automatic opening. If opening fails, report the specific blocker and provide the URL without claiming the board opened. The page refreshes every second and shows task text, public responses, tool calls/results, and run status. It provides stop and revise controls. Revisions first stop the old task and then resume its exact session in the same workspace. Never promise token-by-token text: Harness may emit complete messages. If a dashboard exists, reuse its URL instead of opening duplicate tabs.
Each project now has a persistent loopback port and access token in <workspace>/work/deepseek-collab/dashboard-config.json. Preserve this file; restarting must keep the same complete URL. --start checks a minimal /health endpoint, reuses a healthy instance, or starts an independent hidden background process. On a port conflict, inspect the listener; do not switch to a random port or terminate unrelated processes. This is recovery when invoked, not an OS startup service or a continuous watchdog.
If the browser explicitly denies access under its URL/security policy, do not try alternate ports, hostnames, browser surfaces, or OS launch commands to evade it. You may repair an independently stopped service and check minimal service health, then give the user the stable URL for manual opening. State that browser viewing remains unverified in that case. The local server stays available while its process is alive. UI-submitted revisions can execute independently of the current chat turn, but the dashboard cannot wake Codex for review. Review them in the active turn or when the user returns. Do not promise unattended Codex acceptance. The tokenized loopback URL is private; do not publish it.
Use scripts/dispatch.py next to this skill with the available Python executable:
python '<skill-directory>/scripts/dispatch.py' --workspace '<absolute-project-directory>' --task-file '<absolute-UTF8-task-file>' --timeout 1200
Write the task file with a file tool or literal here-string, never shell interpolation of user text. Include the goal, relevant context, allowed working directory/files, acceptance criteria, and expected report (changes, checks, unresolved issues). Exclude secrets and unrelated chat history. Tell DeepSeek not to spawn other agents unless the user requests it, and not to publish, message people, alter credentials, or modify outside the task's workspace. These prompt boundaries are instructions, not an OS sandbox; the harness retains its own tool/approval settings. Never weaken those settings.
The helper invokes the installed Electron CLI directly without a shell and reuses its local credential service through the bundled patch. Never print, copy, or export credentials. The patch fixes the headless preset's default credentials.disabled: true; it does not change the desktop profile. Existing model defaults are deepseek-official / deepseek-flash; do not substitute another provider silently.
Use a tool timeout/yield that returns control for progress updates, and poll the returned execution session until completion. The helper enforces a per-run timeout (default 20 minutes). If sandbox permissions prevent DeepSeek from writing its own profiles/session store or connecting, request the normal narrowly scoped execution escalation; do not work around the sandbox with another agent or executable.
Coordinate and Verify
- Establish the project and its instructions. Keep a baseline of existing changes. For code repositories use an isolated checkout when appropriate; both agents must not edit the same files concurrently.
- Dispatch a concrete implementation task. Work on independent review/preparation while it runs, or wait with concise progress updates. Never let two live calls own the same DeepSeek session.
- Read the returned
result.json,answer.md, and relevant events under<workspace>/work/deepseek-collab/runs/<run-id>/. A successful run requires exit code zero, a final event, and terminal kindcompleted; the helper checks these. A successful run alone does not establish implementation correctness. - Inspect the actual files/diff and run appropriate checks yourself. To request corrections use the exact returned session ID and the SAME workspace:
python '<skill-directory>/scripts/dispatch.py' --workspace '<same-workspace>' --task-file '<followup-file>' --session-id 'session-...' --timeout 1200
- Default to at most two correction rounds after the initial task. If still unresolved, finish the issue yourself when feasible or report the concrete blocker. Do not loop on auth/network errors or retry a timeout blindly: inspect whether work is still active and what files changed first.
- Report the outcome, your verification, and material limitations in Chinese unless the user prefers another language. Clearly identify DeepSeek's contribution. Do not claim a durable background monitor; collaboration runs while the coordinating Codex turn is active.
Failures and Recovery
The helper emits a started record with session ID and run directory, then a final result. Events and task text are saved as they arrive; private reasoning events are discarded. On failed/timeout, inspect the terminal reason and stderr.log. Do not show raw sensitive logs indiscriminately. If no result file exists after interruption, inspect the saved events and files before any resume. Headless can resume its own sessions; do not adopt an active desktop conversation. A newly installed skill may need a fresh Codex chat to appear in discovery, but the helper can be invoked directly in the current chat.