Claude Delegate logo

Claude Delegate

CommunityPopular
amElnagdy
claude-delegate

Delegate a coding task to a separate Claude Code CLI process or another Claude session as an implementer, then review its diff and land it yourself. Use only when the user explicitly asks to delegate implementation to Claude Code, another Claude session, or the `claude` CLI — for example, "have another Claude implement this", "delegate this to Claude Code", or "run this queue through a separate Claude session." Do not trigger merely because the current orchestrator is Claude, and do not use when the user asks the current Claude to implement directly without delegation.

Overview

PublisheramElnagdy
Repositorydelegate-skills
Skill nameclaude-delegate
Stars
2.1K
Forks
167
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by amElnagdy on GitHub. Read the source before you install it.

Installation

Install the Claude Delegate AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/amElnagdy/delegate-skills.git /tmp/delegate-skills
mkdir -p .claude/skills
cp -r /tmp/delegate-skills/skills/claude-delegate .claude/skills/claude-delegate
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Claude Delegate in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Claude Delegate on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Claude Delegate is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Claude Delegate

You are the orchestrator. Delegate one bounded coding task to a separate implementer — a Claude Code CLI session — then review what it produced and land it yourself. You write the brief and own the judgment; the separate Claude session edits the working tree; you verify and commit.

This skill is not a signal for the current Claude to implement directly. Use it only after the human explicitly asks for delegation to another Claude Code process or session.

When not to use this

  • The human asked the current agent to implement the task directly.
  • The task is small enough to do inline and the human did not request delegation.
  • The claude CLI is missing or unauthenticated (claude auth status).
  • The task needs a stronger host boundary than Claude Code's tool permissions and shell-only sandbox provide. Use an isolated container or VM for that requirement.

Prerequisites

  1. claude --version succeeds.
  2. claude auth status reports an authenticated session. On macOS the live credentials sit in the login Keychain; when the orchestrator's own sandbox blocks Keychain access (Codex's sandbox does), claude falls back to a possibly stale credentials file and reports loggedIn: false even though the login is valid. Re-run the check — and the dispatch itself — with that sandbox escalated or outside it before concluding the CLI is unauthenticated.
  3. The target repository is the directory passed with --cd.
  4. On Linux/WSL2, Claude's sandbox dependencies are installed. The normal relay profile is configured to fail when the sandbox is unavailable instead of silently running shell commands unsandboxed. Existing merged settings can still affect the effective boundary.

The loop

1. Write the brief

The separate session has no orchestrator chat history. It receives the brief on stdin and can inspect the target working tree.

Claude Code automatically discovers the target project's CLAUDE.md and normal local Claude configuration because the relay does not use --bare. It does not generically auto-load AGENTS.md. Read AGENTS.md yourself and copy every load-bearing constraint and the real gate commands into the brief. Tell the implementer not to commit. Keep one task per brief.

Template and details: references/writing-the-brief.md.

2. Dispatch

bash
node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --cd /path/to/repo
# review/diagnosis only:                 add --read-only
# continue the latest session:           add --resume-last
# continue the recorded session:         add --session <id>
# choose limits:                         add --max-turns 40 --max-budget-usd 10
# set the auto-compact window:           add --autocompact 400k
# hard relay deadline:                   add --timeout 2h
# inspect every option:                  node .../relay.mjs --help

<skill-dir> is this installed skill directory, the folder containing this SKILL.md.

The relay runs claude -p --output-format stream-json --verbose, sends the brief through stdin, and writes artifacts under the system temp directory by default. It never uses --bg or --bare, and it never commits. See references/dispatch-and-poll.md.

--autocompact <auto|tokens> passes Claude Code's auto-compact window setting on every new or resumed invocation, and needs Claude Code 2.1.221 or newer — older builds fail the dispatch with unknown option '--autocompact'. The installed CLI owns the accepted range (auto, or 100k–1M tokens); the relay records the requested value but does not claim that Claude applied or enforced it.

3. Wait

The relay blocks until Claude exits. Use the orchestrator's background-command facility, or run it in the foreground and wait. Completion means the process exited and result.json exists.

  • A pre-run usage error exits 2 and writes no result.json.
  • A missing claude exits 127 and writes status: "claude_unavailable".
  • Timeout and caught relay signals terminate the whole implementer process tree and preserve an outcome artifact.

Read finalMessage, touchedFiles, resultSubtype, and the raw artifact paths from result.json.

4. Review

Treat the implementer's report and gate outcomes as claims:

  • Review edits to existing tests before a green gate means anything.
  • Re-run the project's actual gates yourself.
  • Read the complete diff against the brief, starting with touchedFiles.
  • Inspect untracked and staged content as well as the ordinary diff.
  • Run relevant guard skills if installed.

Full checklist: references/review-and-land.md.

5. Land

The orchestrator commits only after the gates pass and the diff holds. For rework, resume the same Claude session with a delta brief:

bash
echo "Keep the implementation, replace the mocked DB test with the migrated fixture, and remove the
unused import." | node "<skill-dir>/scripts/relay.mjs" --session <id> --cd /path/to/repo

Review a resumed run exactly like the first run.

Permission profiles

The normal profile is deliberately explicit:

  • acceptEdits permission mode.
  • Built-in tools restricted to Read, Glob, Grep, Edit, Write, and the platform shell.
  • On macOS, Linux, and WSL2, Claude's shell sandbox is enabled with startup failure on missing dependencies and no unsandboxed retry. Commands that stay sandboxed are auto-approved so ordinary gates can run headlessly. The sandbox governs shell processes and their children only; merged local or managed sandbox settings can add effective paths or exclusions.
  • Configured MCP discovery and Claude.ai connectors are disabled, all MCP tools are denied, and skills, commands, and Claude's Agent tool are unavailable to the child. Project CLAUDE.md, hooks, normal authentication, session persistence, and other local settings still load.
  • String rules deny common direct shell forms of git commit, git push, and nested claude, plus any command containing claude-delegate. Aliases, scripts, and wrappers can bypass them, so they are only a speed bump; the brief's no-commit instruction and orchestrator review remain the boundary.

Native Windows does not support Claude's shell sandbox. The relay restricts the tool surface and pre-approves PowerShell so the run remains non-interactive, but that shell is not OS-isolated. Native claude.exe and npm claude.cmd launch paths are implemented; Windows verification is pending.

--read-only uses plan mode with only Read, Glob, and Grep. It removes edit, write, and shell paths, then compares parsed git porcelain and fingerprints the working-tree identity and index entries of Git-visible paths that were already dirty. readOnlyViolation is true when either signal proves a change, false when coverage is complete and detects none, and null when coverage is incomplete. This is a reporting tripwire, not an OS boundary: ignored paths and perfect restores are outside it, local hooks can write, and concurrent changes cannot be attributed to Claude.

--dangerously-skip-permissions is an explicit opt-in to Claude's bypassPermissions mode. The restricted tool surface, direct commit/push deny rules, and supported-platform shell sandbox remain, but direct file tools can cross normal permission boundaries. Use it only with the human's explicit acceptance.

Complementary to native Claude features

Claude subagents, agent teams, and background sessions are useful when the current Claude environment is already the orchestrator and native coordination is the goal. This skill is complementary: it provides a cross-orchestrator contract — self-contained brief → dispatch → artifacts → review → land — and keeps the commit with the orchestrator.

References

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Claude Delegate AI skill do?

Delegate a coding task to a separate Claude Code CLI process or another Claude session as an implementer, then review its diff and land it yourself. Use only when the user explicitly asks to delegate implementation to Claude Code, another Claude session, or the `claude` CLI — for example, "have another Claude implement this", "delegate this to Claude Code", or "run this queue through a separate Claude session." Do not trigger merely because the current orchestrator is Claude, and do not use when the user asks the current Claude to implement directly without delegation.

Why use Claude Delegate on TypingMind?

Because you install it once and use it with any model. Claude Delegate is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Claude Delegate in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/amElnagdy/delegate-skills/tree/master/skills/claude-delegate. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Claude Delegate?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Claude Delegate?

As many as you like. As long as a model supports skills, you can use Claude Delegate with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Claude Delegate AI skill free?

Yes. It is published on GitHub by amElnagdy under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇