Add agent

From diegosouzapw/awesome-omni-skill · View interactive version

Add agent is an AI agent skill from the GitHub repository diegosouzapw/awesome-omni-skill. Add a new AI coding agent to Agent Sandbox. Creates all required files (Dockerfile, templates, CI, docs) and wires the agent into the CLI, proxy, and build system.

How to use this skill

Skill file

Scaffold Agent Support

This skill generates all the files needed to add a new AI coding agent to Agent Sandbox. It follows the established patterns from Claude, Copilot, and Codex implementations.

Arguments

The skill takes a single argument: the agent name (lowercase, no spaces). Example: gemini, opencode, factory.

Process

Step 1: Gather Information

Ask the user for the following (skip any already provided):

  1. Agent name (from argument)
  2. Display name - human-readable name for comments and labels (e.g., "Google Gemini CLI")
  3. Project URL - link to the agent's GitHub repo or website (for README table)
  4. Installation method - how to install the agent binary/CLI
  1. Package identifier - npm package name, GitHub releases URL pattern, pip package, go module, or download URL
  2. Version detection source - how CI detects new releases
  1. Version variable name - env var for build.sh (e.g., GEMINI_VERSION)
  2. Config directory - where the agent stores its config in the container (e.g., /home/dev/.gemini)
  3. Default config files - any config files to bake into the image (e.g., Codex bakes config.toml to disable its internal sandbox)
  4. Internal sandbox - does the agent have its own sandboxing (Landlock, seccomp, etc.) that should be disabled inside our container? If so, how to disable it.
  5. Required API domains - domains the agent needs to reach (API, auth/OAuth, CDN)
  6. Authentication method - how users authenticate (API key env var, OAuth flow, device code, etc.)
  7. Auto-approve flag - the CLI flag for unattended/yolo mode (e.g., --dangerously-skip-permissions, --yolo, --full-auto)
  8. VS Code extension ID - if one exists (e.g., github.copilot-chat), or "none" for CLI-only agents
  9. Agent-specific environment variables - any env vars the agent needs at runtime
  10. Does the agent need Node.js? - whether to install Node.js in the Dockerfile (only if the base image doesn't include it and the agent needs it)

Step 2: Create Files

Generate all files listed below. Read the reference files first to match the exact format and structure.

2.1: Dockerfile

Create images/agents/{agent}/Dockerfile.

Pattern:

If the agent needs default config files, create them alongside the Dockerfile (e.g., images/agents/{agent}/config.toml).

2.2: CLI Compose Template

Create cli/templates/{agent}/cli/docker-compose.yml.

Copy from an existing CLI template (Copilot is simplest) and modify:

2.3: Devcontainer Compose Template

Create cli/templates/{agent}/devcontainer/docker-compose.yml.

Same as CLI template but add the devcontainer directory mount:

- .:/workspace/.devcontainer:ro
2.4: devcontainer.json

Create cli/templates/{agent}/devcontainer/devcontainer.json.

Copy from existing and modify:

2.5: Update CLI Agent List

Edit cli/libexec/init/init: add the new agent name to the available_agents array.

2.6: Update BATS Test

Edit cli/test/init/init.bats: update the "rejects invalid --agent value" test assertion to include the new agent name in the expected agent list string (e.g., "claude copilot codex gemini").

2.7: Update Proxy Service Domains

Edit images/proxy/addons/enforcer.py: add a new entry to SERVICE_DOMAINS dict.

Guidelines:

2.8: Update composefile.bash (if needed)

If the agent has host-side config that users might want to mount into the container (like Claude's ~/.claude/CLAUDE.md and settings.json), add a conditional block in cli/lib/composefile.bash following the pattern of add_claude_config_volumes. This involves:

Skip this for agents that don't have meaningful host-side config to mount.

2.9: Update build.sh

Edit images/build.sh to add:

2.10: Agent Documentation

Create docs/{agent}/README.md following this structure (see docs/copilot/README.md or docs/codex/README.md for exact format):

  1. Header: # {Display Name} Sandbox Template
  2. One-liner: "Run {display name} in a network-locked container..."
  3. Link: "See the main README for installation, architecture overview, and configuration options."
  4. Setup section: Auth instructions covering all supported auth methods. Note any gotchas (e.g., account-level settings that must be enabled).
  5. Usage section: How to start the agent, including the auto-approve flag. Include agentbox compose down for stopping.
  6. Required Network Policy section: Show the services: YAML snippet with the agent's service name.
2.11: Update Project README

Edit README.md:

Step 3: CI/CD Workflows

Create the CI files directly in .github/workflows/. They follow a clear pattern and can be written without drafting.

3.1: Build Job

Edit .github/workflows/build-images.yml:

3.2: Version Check Workflow

Create .github/workflows/check-{agent}-version.yml following the pattern of existing version check workflows.

Step 4: Verify

After creating all files:

  1. List all files created/modified
  2. Note any manual steps needed
  3. Remind user to:

Reference Files

When generating files, read these for the exact patterns:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.