Skip to content
Back to skills

Delegate

ASecurity

Delegate a sub-task to OpenAI Codex CLI. Use when a task is better handled by Codex (e.g. complex file editing, multi-step coding tasks, automated code generation).

  • 22 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 26, 2026
ai-agentsgobashapi

Works with

  • cli
  • api
  • mcp

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned May 27, 2026

npx -y skills add Brainrot-Creations/claude-plugins --skill delegate --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Delegate?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Delegate
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/brainrot-creations-delegate/badge)](https://www.skillsdirectory.com/skills/brainrot-creations-delegate)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: delegate
description: Delegate a sub-task to OpenAI Codex CLI. Use when a task is better handled by Codex (e.g. complex file editing, multi-step coding tasks, automated code generation).
---

Use the `codex` MCP tools to delegate tasks to OpenAI Codex CLI.

## Prerequisites

Codex must be installed and signed in:
```bash
npm i -g @openai/codex
# sign in via the Codex app — no API key needed
```

## Synchronous delegation (need result now)

Use `codex_run` when you need the output before continuing:

```
codex_run(
  prompt="<full task description with all context Codex needs>",
  cwd="/path/to/project"   # optional, defaults to current directory
)
```

Returns the final Codex message as a string.

## Background delegation (parallel work)

Use `codex_task_submit` to fire off tasks and continue working:

1. Submit one or more tasks:
   ```
   codex_task_submit(name="Refactor auth module", prompt="...", cwd="...")
   codex_task_submit(name="Write tests for API", prompt="...", cwd="...")
   ```

2. Check status:
   ```
   codex_task_status(task_id="<id>")
   ```

3. Fetch result when completed:
   ```
   codex_task_result(task_id="<id>")
   ```

4. See all tasks:
   ```
   codex_tasks_list()
   ```

## Environment variables

| Variable | Purpose |
|----------|---------|
| `CODEX_PATH` | Override path to the `codex` binary |
| `CODEX_SANDBOX` | `read-only`, `workspace-write`, or `danger-full-access` — if unset, uses `--dangerously-bypass-approvals-and-sandbox` for headless operation |

## Writing good prompts for Codex

- Include full context — Codex starts fresh with no knowledge of prior work
- Specify the working directory if the task involves files
- Be explicit about what "done" looks like (files to edit, tests to pass, output expected)
- If the task spans multiple files, list the key ones

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.