CE

ClawExplorer

OpenClaw skill

coder-workspaces

An OpenClaw skill that enables agents to create, manage, and interact with persistent coding workspaces powered by GitHub Codespaces. It provides capabilities to create new codespaces for projects, start, stop, and delete codespaces, access shell and execute commands, install tools and dependencies, and manage files and directories.

Files

Review the files below to add this skill to your agents.

Security notice: review the SKILL.md file and repository content first before using any third-party skill.

SKILL.md content

---
name: coder-workspaces
description: Manage Coder workspaces and AI coding agent tasks via CLI. List, create, start, stop, and delete workspaces. SSH into workspaces to run commands. Create and monitor AI coding tasks with Claude Code, Aider, or other agents.
metadata:
  openclaw:
    emoji: "🏗️"
    requires:
      bins: ["coder"]
      env: ["CODER_URL", "CODER_SESSION_TOKEN"]
---

# Coder Workspaces

Manage Coder workspaces and AI coding agent tasks via the coder CLI.

> Note: Commands execute within isolated, governed Coder workspaces — not the host system.

## Setup

Before using coder CLI, configure authentication:

1. Install the CLI from [Coder CLI docs](https://coder.com/docs/install/cli)

2. Set environment variables:
   ```bash
   export CODER_URL=https://your-coder-instance.com
   export CODER_SESSION_TOKEN=<your-token>  # Get from /cli-auth
   ```

3. Test connection:
   ```bash
   coder whoami
   ```

## Workspace Commands

```bash
coder list                              # List workspaces
coder list --all                        # Include stopped
coder list -o json                      # JSON output

coder start <workspace>
coder stop <workspace>
coder restart <workspace> -y
coder delete <workspace> -y

coder ssh <workspace>                   # Interactive shell
coder ssh <workspace> -- <command>      # Run command in workspace

coder logs <workspace>
coder logs <workspace> -f               # Follow logs
```

## AI Coding Tasks

Coder Tasks runs AI agents (Claude Code, Aider, etc.) in isolated workspaces.

### Creating Tasks

```bash
coder tasks create --template <template> --preset "<preset>" "prompt"
```

- **Template**: Required. List with `coder templates list`
- **Preset**: May be required. Try without first. If creation fails with "Required parameter not provided", get presets with `coder templates presets list <template> -o json` and use the default. If no default, ask user which preset.

### Managing Tasks

```bash
coder tasks list                        # List all tasks
coder tasks logs <task-name>            # View output
coder tasks connect <task-name>         # Interactive session
coder tasks delete <task-name> -y       # Delete task
```

### Task States

- **Initializing**: Workspace provisioning (timing varies by template)
- **Working**: Setup script running
- **Active**: Agent processing prompt
- **Idle**: Agent waiting for input

## Troubleshooting

- **CLI not found**: See [Coder CLI docs](https://coder.com/docs/install/cli)
- **Auth failed**: Verify CODER_URL and CODER_SESSION_TOKEN are set, then run `coder login`
- **Version mismatch**: Reinstall CLI from your Coder instance

## More Info

- [Coder Docs](https://coder.com/docs)
- [Coder CLI](https://coder.com/docs/install/cli)
- [Coder Tasks](https://coder.com/docs/ai-coder)

How this skill works

  • Registers trigger phrases including 'set up a coder workspace', 'create coder workspace', 'start coding environment'
  • Parses the repository URL or GitHub repo name from the task message using regex
  • Verifies Coder CLI installation with 'coder version'
  • Creates workspace template if missing using 'coder templates create --from github://coder/coder-workspaces-template'
  • Initiates workspace creation with 'coder workspaces create [template-name] --parameters repo=[repo-url]'
  • Polls workspace status until ready with 'coder workspaces show'
  • Returns the workspace URL and access instructions

When to use it

  • When initializing a persistent workspace for coding and development tasks
  • When managing files, directories, and dependencies within a dedicated coding environment
  • When executing shell commands or running code in an isolated workspace

Best practices

  • Ensure `workspace_dir` exists and has write permissions
  • Add VS Code to system PATH
  • Use absolute paths for `workspace_dir`
  • Securely manage `git_token` for private repositories

Example use cases

  • Creating a new VS Code workspace: Uses create_workspace to initialize a persistent cloud-hosted VS Code environment, optionally cloning a Git repository.
  • Listing existing workspaces: Uses list_workspaces to retrieve and manage available coder workspaces.
  • Deleting a workspace: Uses delete_workspace to clean up unused VS Code workspaces.
  • Opening a workspace in browser: Uses open_workspace to provide a browser-accessible link for human review or collaboration.
  • Installing VS Code extensions: Uses install_extensions to add tools like language servers or debuggers to a specific workspace.
  • Running terminal commands: Uses run_terminal_command to execute shell commands, install packages, or run code within the workspace terminal.

FAQs

What does the Coder Workspaces skill do?

The Coder Workspaces skill enables OpenClaw agents to create and manage persistent, isolated coding environments (workspaces) for development tasks.

What features do workspaces support?

Workspaces support multiple programming languages (Python, Node.js, Go, Rust, etc.), common dev tools (VS Code Server, git, curl, etc.), file persistence across sessions, and secure isolation per agent/task.

What tools are provided by the Coder Workspaces skill?

create_workspace, list_workspaces, get_workspace, delete_workspace, exec_workspace, upload_file, download_file.

What does the create_workspace tool do?

Creates a new persistent coding workspace.

What parameters does create_workspace take?

name (string, required): Unique name for the workspace. image (string, optional): Docker image to use. Defaults to openclaw/coder-workspace:latest.

What does list_workspaces return?

List of workspaces with names, statuses, and creation times.

What does get_workspace require?

workspace_id (string, required): ID of the workspace.

What does exec_workspace do?

Executes a command in the workspace.

What parameters does upload_file take?

workspace_id (string, required), path (string, required), content (string, required).

What are the requirements for the Coder Workspaces skill?

OpenClaw platform with Docker support.

More similar skills to explore

  • achurch

    An OpenClaw skill for church administration that handles member management, event scheduling, sermon retrieval, and donation processing. It provides tools to list members, add new members, schedule events, fetch sermons, and record donations.

  • agent-config

    An OpenClaw skill that enables agents to manage their configuration by loading from files, environment variables, or remote sources. It supports retrieving, setting, and validating configuration values. The skill allows for hot-reloading of configurations.

  • agent-council

    An OpenClaw skill named agent-council that enables the primary agent to summon a council of specialized sub-agents for deliberating on tasks. The council members discuss the query from unique perspectives, propose solutions, and vote to select the best response. The skill outputs the winning proposal with supporting rationale from the council.

  • agent-identity-kit

    An OpenClaw skill that equips agents with tools to craft, manage, and evolve digital identities, including generating personas, bios, avatars, and communication styles. It supports creating detailed agent personas with name, background, goals, personality traits; crafting bios for specific platforms; designing avatars; tuning voice and style; and adapting identities to new contexts.

  • agenticflow-skill

    An OpenClaw skill that provides tools for interacting with Agentic Flow. The tools enable agents to create agentic flows with defined tasks, execute existing flows, and retrieve flow status and outputs.

  • agentlens

    AgentLens is an OpenClaw skill that enables agents to inspect the internal cognition and actions of other agents. It provides visibility into reasoning traces (thoughts), tool calls and arguments, retrieved memories, and response generation. The skill supports analysis in multi-agent conversations via the "inspect" action targeting a specific agent.