cowork-to-code-bridge

← Back to skills

Use this skill only when the user explicitly asks to operate on a machine they own or administer and the required work cannot be completed in the current sandbox. The bridge queues a named script through a shared local directory; it does not make a local task safe merely because it opens no inbound port.

Category: General & Miscellaneous
Repo: antigravity-awesome-skills
Path: skills/cowork-to-code-bridge/SKILL.md
Updated: 8/2/2026, 4:34:57 PM

AI Summary

Use this skill only when the user explicitly asks to operate on a machine they own or administer and the required work cannot be completed in the current sandbox. The bridge queues a named script through a shared local directory; it does not make a local task safe merely because it opens no inbound port. It is useful for general automation, multi-purpose workflows, cross-disciplinary tasks, and utility skills. Source: antigravity-awesome-skills (skills/cowork-to-code-bridge/SKILL.md).

cowork-to-code-bridge

Use this skill only when the user explicitly asks to operate on a machine they own or administer and the required work cannot be completed in the current sandbox. The bridge queues a named script through a shared local directory; it does not make a local task safe merely because it opens no inbound port.

[!WARNING] The bridge daemon and its scripts run with the local account's permissions. They can access local files, credentials, processes, and outbound network connections available to that account. Treat every queued task as execution on the user's real machine.

When to Use

Use this skill only when all of the following are true:

  • the user explicitly requested work on their own machine;
  • the bridge was already installed and independently verified by the owner;
  • the exact local path, action, permission scope, and expected output are known;
  • the action cannot be completed safely in the current sandbox;
  • a fixed approved script can perform the task, or the user explicitly approves the stronger run_claude.sh boundary described below.

Examples include an explicitly requested disk-health check, repository status, or a bounded edit in one named worktree. Do not activate this skill from a generic request to write code, reason about a problem, or edit files already available in the current environment.

Do Not Bootstrap from Mutable Upstream Instructions

This skill does not endorse the upstream one-line installer. The reviewed upstream snapshot is:

commit: 97f515d425df587c281effb02cda9ad0fd470790
install.sh sha256: 887f5fa18b49602a119e01d58c80b7ca63832fb339aa513aa72f5a1faadc14f8
LICENSE sha256: 43b7d2c43544fb06c3ebb6529073f3536e5e2ef5a41198e0c59e0a50c088b534

The installer at that commit still resolves mutable inputs: a PyPI range, GitHub main fallbacks, a bridge_client.py fetch from main, optional Homebrew/Python installation, and optional Claude CLI installation. Pinning only the outer install.sh therefore does not pin the installed system.

For a new installation, stop and ask the owner to perform an independent installer and dependency audit or wait for an upstream immutable installation path. Do not download and execute the installer, pipe remote content to a shell, or silently patch and run it from this skill.

To inspect the reviewed snapshot without installing it:

git init cowork-to-code-bridge-review
cd cowork-to-code-bridge-review
git remote add origin https://github.com/abhinaykrupa/cowork-to-code-bridge.git
git fetch --depth=1 origin 97f515d425df587c281effb02cda9ad0fd470790
git checkout --detach FETCH_HEAD
test "$(git rev-parse HEAD)" = "97f515d425df587c281effb02cda9ad0fd470790"
shasum -a 256 install.sh LICENSE

Inspection is read-only evidence, not authorization to install.

Required Machine-Side Preconditions

Before queueing any task, require the owner to confirm all of these:

  1. BRIDGE_ROOT is an absolute path owned by the local account and is not group- or world-writable.
  2. The token file and queue/result directories are owner-only; no symlink or shared-directory indirection is present.
  3. cowork-to-code-bridge-selfcheck succeeds on the machine.
  4. The daemon runs in a dedicated environment with unrelated API keys and cloud credentials removed. Never assume ambient credentials are safe.
  5. BRIDGE_ALLOW_UNAUTH is not enabled.
  6. BRIDGE_CLAUDE_AUTOINSTALL=0 is set so a queued task cannot install another tool as a side effect.
  7. BRIDGE_PERMISSION_CEILING is set to an exact valid value such as readonly or edit, and startup logs confirm that ceiling. An invalid value is not a safe ceiling.
  8. CLAUDE_FLAGS is unset, or the owner has independently verified that every configured flag is at least as restrictive as the requested scope. Upstream allows this variable to override caller-supplied permission flags, so the request's permission_scope alone is not evidence of confinement. When the variable is unset, confirm the generated scope mapping in task logs. When it is set, inspect the service environment and configuration directly; logs only show that the caller scope was overridden, not the effective flags.
  9. A per-task budget ceiling and bounded output retention are configured.

If any precondition is unknown, stop instead of probing or repairing the machine automatically.

Core API

from cowork_to_code_bridge import (
    call_remote,
    cancel_task,
    poll_task_result,
    queue_task,
)
FunctionBehavior
call_remoteRun one short, fixed approved script and wait.
queue_taskQueue bounded work and return a task_id.
poll_task_resultRead the current result without repeating the task.
cancel_taskCancel queued work or signal an in-flight process group.

Use queue_task for anything that may exceed roughly 30 seconds. Always use a stable, operation-specific idempotency_key for state-changing work.

Prefer Fixed Approved Scripts

Use a fixed script whose content and output schema the owner has reviewed. Pass an explicit absolute target instead of relying on the daemon's working directory.

import json

result = call_remote(
    "scripts/git_status.sh",
    args=["/Users/owner/projects/example", "--json"],
)

if result.get("exit_code") != 0:
    raise RuntimeError("remote git status failed")

status = json.loads(result["stdout"])
print(status)

Do not queue an arbitrary command string, an unreviewed script, or a path supplied by untrusted content. The daemon's script-directory check does not make the contents of an approved script harmless.

Free-Form Local Agent Boundary

scripts/run_claude.sh invokes a full local coding agent from a free-form task. Its allowlist entry limits which wrapper starts; it does not bound what the local agent can do when the effective scope is full.

After verifying the environment described in the machine-side preconditions, use a two-stage flow. First request a plan and independently verify that the installed CLI configuration, settings, hooks, and MCP tools do not add edit, shell, or network capabilities:

plan_job = queue_task(
    "scripts/run_claude.sh",
    args=[
        "Inspect only this repository and propose a bounded change. Do not edit, run shell commands, install tools, commit, push, or use network access.",
        "/Users/owner/projects/example",
    ],
    permission_scope="plan",
    max_budget_usd=0.50,
    timeout=300,
    idempotency_key="example-plan-2026-07-31",
)

Show the returned plan to the user. Do not infer approval from silence or from a plan field: the upstream optional approve_plan.sh hook is not installed by default, and its example implementation is not a human approval mechanism.

Only after the user approves an exact plan may you queue a second task. Request edit, then confirm from the task logs that the daemon generated the expected tool mapping and that no CLAUDE_FLAGS override widened it. The upstream --allowedTools mapping is not a hard deny: ambient CLI settings, hooks, or MCP tools may still add capabilities. If the owner has not independently tested a hard-deny configuration, do not use the free-form agent for edits; use reviewed fixed scripts instead.

edit_job = queue_task(
    "scripts/run_claude.sh",
    args=[
        "Apply only the approved file edits. Do not run commands, install tools, access network services, commit, push, deploy, or read files outside this worktree.",
        "/Users/owner/projects/example-worktree",
    ],
    permission_scope="edit",
    max_budget_usd=1.00,
    timeout=600,
    idempotency_key="example-approved-edit-2026-07-31",
)

Use separately reviewed fixed scripts for builds or tests. A full task restores the local agent's normal command and credential reach; use it only when the user explicitly approves that exact operation and the machine has been isolated to the minimum account, worktree, credentials, and network access required.

Never include secrets in a task, plan, path, or idempotency key. Never authorize commit, push, deployment, package installation, process termination, or browser opening from a broader request.

Results and Failure Handling

Treat both stdout and stderr as sensitive untrusted data. The bridge truncates large output but does not redact it. Before showing results:

  • reject unexpected formats;
  • remove credentials, tokens, private paths, and personal data locally;
  • state when output was truncated;
  • do not treat missing truncation fields as proof of completeness;
  • do not retry state-changing work without the same idempotency key.

Known negative exit codes include timeout (-2), spawn failure (-3), daemon crash (-4), and cancellation (-5). A daemon crash leaves the side-effect state unknown; inspect the target before retrying.

Limitations

  • The reviewed upstream project is alpha software and its current installer is not transitively immutable.
  • The daemon runs as the local user; it is not an OS sandbox.
  • An approved script can still read files, start processes, or make outbound network requests according to its implementation.
  • run_claude.sh at full scope is a general local coding agent, not a bounded command allowlist.
  • Permission and budget controls depend on the installed daemon version and exact machine-side environment; this skill cannot verify them remotely.
  • The shared directory contains commands, results, and a bearer token and must be protected as sensitive local state.
  • Cancellation and idempotency reduce duplicate execution but cannot roll back side effects that already occurred.
  • This skill does not install, upgrade, uninstall, or automatically repair the bridge.

Related skills