Delegate Handoff logo

Delegate Handoff

Organization
friday-platform
delegate-handoff

Loads when the agent calls `delegate({...})` for a non-trivial sub-task. Covers what the child sees and doesn't see (the child has NO `load_skill` and NO available-skills index — the parent must pre-push skills via `delegate({skills: [{name, refs?}]})`); how to write a good `handoff`; when to push specific reference files via `refs:`; the `mcpServers:` allowlist; budget envelope (`max_steps`, `max_output_tokens`, `max_depth`); the `{ok, answer | reason, toolsUsed}` return contract; when to delegate vs call a tool inline.

Overview

Publisherfriday-platform
Repositoryfriday-studio
Skill namedelegate-handoff
Stars
102
Forks
5
Bundled files
Instructions only
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.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by friday-platform on GitHub. Read the source before you install it.

Installation

Install the Delegate Handoff 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.
    https://github.com/friday-platform/friday-studio/tree/main/packages/system/skills/delegate-handoff
  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/friday-platform/friday-studio.git /tmp/friday-studio
mkdir -p .claude/skills
cp -r /tmp/friday-studio/packages/system/skills/delegate-handoff .claude/skills/delegate-handoff
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Delegate Handoff 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 Delegate Handoff 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 Delegate Handoff 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.

Delegate handoff contract

delegate({goal, handoff, mcpServers?, skills?}) spawns a sub-agent in-process. The child runs its own streamText loop and returns a compact {ok, answer | reason, toolsUsed} envelope. This skill is the contract for how to use it well — the chat trajectory that motivated the system-skills remodel called delegate 5+ times without ever pushing skills, and the child ran context-blind every time.

What the child sees

SurfaceInherited from parent?
Parent's tool set (minus delegate to prevent infinite nesting)YES
mcpServers: allowlist (if you pass it)only the listed servers
<available_skills> indexNO — child has no skill catalog
load_skill toolNO — child cannot fetch additional skills
Skills pushed via delegate({skills: [...]})YES — injected as <skills> system-prompt block
Workspace context (other agents, MCP servers, signals)NO unless encoded in handoff
Chat historyNO — child sees only the system prompt + handoff
Datetime groundingYES (auto-injected)

Critical: the child can only use what you push. There's no discovery mechanism inside the child.

Always pass skills for non-trivial sub-tasks

If the sub-task involves a domain skill the parent has visible — GitHub queries, Gmail composing, workspace API patterns — push the skill. The child runs blind otherwise.

ts
delegate({
  goal: "Find stale issues + PRs in the friday-platform org",
  handoff: "Today is 2026-05-12. Cutoff: 2026-05-10 (today - 2 days). " +
           "Run searches across friday-studio, friday-studio-examples, agent-sdk. " +
           "Return JSON of {repo, number, title, author, created}.",
  mcpServers: ["github"],
  skills: [
    { name: "@friday/using-mcp-servers" },
    // surgical: only the references you need, not the full body
    { name: "@friday/friday-cli", refs: ["references/recipes.md"] },
  ],
})

Skill resolution: only skills the parent has visible can be pushed. Out-of-scope skills are dropped + logged. The runtime resolves the skill body at the parent boundary and injects it into the child's system prompt as a <skills> block.

refs: for surgical injection

If a skill has reference files (e.g. references/phrases.md, references/anti-patterns.md), you can push only specific files instead of the whole SKILL.md body. The child sees one <file path="..."> block per requested ref.

Use this when:

  • The full skill body is large and you need only a subset.
  • The child's system prompt budget is tight.
  • A specific reference file directly answers the sub-task.

mcpServers: — explicit allowlist

If you pass mcpServers, the child can only use tools from those servers. If you don't pass it, the child gets the parent's full MCP tool surface. Pass it when the sub-task is scoped (e.g. "GitHub-only research") to prevent the child from wandering into unrelated tools.

Budget envelope

The defaults (in packages/core/src/delegate/index.ts):

  • max_steps_per_call: 40 — generous; rarely the limit.
  • max_output_tokens: 20_000 — high so the child can produce detailed answers.
  • max_depth: 1 — child cannot delegate further by default.

Workspaces can override via delegation: block in workspace.yml or per-job in jobs.<name>.delegation:. Job-level wins per field over workspace-level.

Writing a good handoff

The child has no chat history. The handoff is the only context. Good handoffs:

  • State the goal in one sentence. "Find stale issues..." not "Help me understand what's stale."
  • Encode the time anchor. "Today is 2026-05-12. Cutoff: 2026-05-10." Without this the child guesses.
  • Specify the output shape. "Return JSON of {repo, number, ...}." Without this the child invents a format.
  • Surface workspace context. "The repos are friday-studio, friday-studio-examples, agent-sdk in the friday-platform org." The child doesn't know your workspace.
  • Don't restate prompt-injection guards. The child inherits those from the platform prompt scaffolding.

Bad handoffs (what the chat trajectory did):

goal: "Find the right org for these repos"
handoff: "The user is ken@tempest.team. Try each org."

Result: the child spends 12 tool calls brute-forcing get_teams + search_repositories × 3. With workspace introspection in the handoff or as a skill, it would have done one call.

Return contract

The child returns one of:

ts
{ ok: true, answer: string, toolsUsed: [{name, outcome}, ...] }
{ ok: false, reason: string, toolsUsed: [{name, outcome}, ...] }

answer for success; reason for failure (impossible task, missing auth, unrecoverable error). Both shapes carry a tools manifest for observability.

When to delegate vs call inline

Delegate when:

  • The sub-task needs many tool calls (5+).
  • The output is bulky (long enough to bloat the parent's context).
  • The work is independent and bounded (the child won't need to ask the user follow-up questions).

Call inline when:

  • The task is one or two tool calls (get_me, list_jobs).
  • The output is small.
  • The work depends on subsequent parent decisions.

Bad delegate cases:

  • "Look up the workspace's GitHub org" — that's describe_workspace(id).integrations.github.org, one call.
  • "Format this markdown" — pure transformation, no tools needed.

Cross-references

  • @friday/agent-action-handshake — sibling contract for the FSM action ↔ agent boundary.
  • @friday/using-mcp-servers — MCP-tool allowlist semantics for the mcpServers: arg.
  • @friday/debugging-broken-jobs — what to load when a delegate sub-task returns garbage.

Frequently asked questions

What does the Delegate Handoff AI skill do?

Loads when the agent calls `delegate({...})` for a non-trivial sub-task. Covers what the child sees and doesn't see (the child has NO `load_skill` and NO available-skills index — the parent must pre-push skills via `delegate({skills: [{name, refs?}]})`); how to write a good `handoff`; when to push specific reference files via `refs:`; the `mcpServers:` allowlist; budget envelope (`max_steps`, `max_output_tokens`, `max_depth`); the `{ok, answer | reason, toolsUsed}` return contract; when to delegate vs call a tool inline.

Why use Delegate Handoff on TypingMind?

Because you install it once and use it with any model. Delegate Handoff 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 Delegate Handoff in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/friday-platform/friday-studio/tree/main/packages/system/skills/delegate-handoff. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Delegate Handoff?

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 Delegate Handoff?

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

Is the Delegate Handoff AI skill free?

It is published on GitHub by friday-platform. Check the repository for licensing terms. 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 👇