delegate

delegate is a command for Claude Code from pwdev-solucoes/pwdev-claude-marketplace. It costs 32 tokens per session (844 once invoked), scanned A, original, Apache-2.0.

A command that chooses an external coding assistant for a task and delegates the work using a standard safety and review process. It supports Codex, OpenCode, Kimi, Gemini, and Kiro.

In plain words
What is it for?
Use it to delegate implementation, large refactors, architecture analysis, documentation, reviews, or AWS-related work to the selected external assistant.
Why use it?
It removes the need to choose a separate tool for every task and adds confirmation, change tracking, and review around delegated work.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Codex; mentions Gemini CLI; mentions OpenCode.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the pwdev-code plugin — 2 skills, 22 commands, 8 agents, 6 hooks shipped together

Good fit Use it to delegate implementation, large refactors, architecture analysis, documentation, reviews, or AWS-related work to the selected external assistant.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add pwdev-solucoes/pwdev-claude-marketplace
Claude Code
/plugin install pwdev-code

Made for: Claude Code.

Or install pwdev-code, the plugin that ships this one along with the rest of its 2 skills, 22 commands, 8 agents, 6 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for delegate

README.md
[![agentmods](https://agentmods.dev/badge/commands/pwdev-solucoes/pwdev-claude-marketplace/delegate.svg)](https://agentmods.dev/commands/pwdev-solucoes/pwdev-claude-marketplace/delegate)
Your own site
<a href="https://agentmods.dev/commands/pwdev-solucoes/pwdev-claude-marketplace/delegate"><img src="https://agentmods.dev/badge/commands/pwdev-solucoes/pwdev-claude-marketplace/delegate.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 844 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.00844
Opus 5 $0.00016 $0.00422
Sonnet 5 $0.00006 $0.00169
Haiku 4.5 $0.00003 $0.00084

Measured 7d ago against content hash 3376fcaab614, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

delegate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/pwdev-code/commands/delegate.md · 77 lines

How it starts

The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/pwdev-code:delegate — Smart External Delegation

Role

Orchestrator: analyzes the task, selects ONE external agent by the selection matrix, announces the choice, and then follows the standard delegation flow (confirmation → run-agent.sh → mandatory review). Protocol details: ${CLAUDE_PLUGIN_ROOT}/references/delegation.md

Input

$ARGUMENTS: the task description. Empty → show usage and STOP.

Flow

STEP 0 — Language

Follow ${CLAUDE_PLUGIN_ROOT}/references/language.md (resolve lang from .planning/config.json; ask only if unset).

STEP 1 — Classify the Task & Select the Agent

Selection matrix (canonical copy: references/delegation.md §6):

Task nature Agent Default mode
Objective implementation, bugfix, well-scoped tests codex write
A specific model/provider was requested, or provider flexibility matters opencode write
Large repo, extensive refactor, many files kimi write
Agentic/spec-driven implementation, AWS-stack tasks kiro write
Analysis, architecture, documentation, review, second opinion gemini read

Tie-breakers: analysis-only → always gemini (read). Implementation with a model explicitly named by the user → opencode. Otherwise prefer codex for small scope, kimi for wide scope.

STEP 2 — Announce the Choice ({{LANG}})

Before executing, state in 1–2 sentences WHICH agent was selected and WHY (reference the matrix row). Check availability with command -v <binary> (kirokiro-cli):

  • Chosen CLI missing → announce and fall back to the next reasonable candidate; if none is installed, say so and offer to do the task yourself (Claude-only).

STEP 3 — Delegate (standard flow)

Follow the selected agent's command flow exactly (commands/codex.md / opencode.md / kimi.md / gemini.md / kiro.md):

  1. Preflight (dirty-tree warning in write mode; record baseline).
  2. Human confirmation showing the EXACT command: "${CLAUDE_PLUGIN_ROOT}/scripts/run-agent.sh" <agent> <mode> "<task>" (mandatory on the first external run of the session).
  3. Run via Bash (tool timeout ≥ script timeout + 60s); handle exit codes 127 / 124 / 4 / 3 as in the agent's command.
  4. MANDATORY review protocol (references/delegation.md §7): full diff, scope check, run tests yourself, own critical verdict, never commit/push.
  5. Report ({{LANG}}) with files changed, tests, out-of-scope findings, verdict, and the output copy path.

Read the full file on GitHub · 77 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 77 lines · 32 tokens per session scan A 3376fcaab614

Subscribe to this mod's changes

delegate is a command published in the GitHub repository pwdev-solucoes/pwdev-claude-marketplace (2 stars, last pushed yesterday), licensed Apache-2.0. It adds 32 tokens to every session and 844 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.