Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
builderio avatar

Delegate To Agent

  • 5 installs
  • 4.4k repo stars
  • Updated August 2, 2026
  • builderio/agent-native

delegate-to-agent is a Claude skill defining how to route all AI work to the agent chat bridge instead of inline LLM calls.

About

This skill defines the agent-native rule that the UI and server never call an LLM directly and instead delegate all AI work to the agent through the chat bridge. A developer follows it when tempted to add inline LLM calls or when sending messages to the agent from application code. It shows the sendToAgentChat and agentChat APIs, submit-versus-prefill behavior, and how to detect when the agent is generating.

  • Establishes the rule that UI and server never call an LLM directly
  • Routes all AI work through the agent chat bridge via @agent-native/core
  • Explains submit vs prefill and how to detect when the agent is done

Delegate To Agent by the numbers

  • 5 all-time installs (skills.sh)
  • Ranked #13,035 of 16,556 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 3, 2026 (Skillselion catalog sync)
At a glance

delegate-to-agent capabilities & compatibility

Capabilities
orchestration · delegate to agent
Use cases
orchestration
Pricing
Free
From the docs

What delegate-to-agent says it does

How to delegate all AI work to the agent chat.
SKILL.md
The UI and server never call an LLM directly. All AI work is delegated to the agent through the chat bridge.
SKILL.md
Don't `import Anthropic from "@anthropic-ai/sdk"` in client or server code
SKILL.md
npx skills add https://github.com/builderio/agent-native --skill delegate-to-agent

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs5
repo stars4.4k
Last updatedAugust 2, 2026
Repositorybuilderio/agent-native

What it does

Delegate all AI work from UI or scripts to the agent chat bridge instead of inline LLM calls.

Who is it for?

Keeping AI reasoning in one agent interface across UI and scripts.

Skip if: Adding direct LLM SDK calls in client or server code.

When should I use this skill?

Delegating AI work from UI or scripts, or tempted to add inline LLM calls.

What you get

AI requests routed through the agent chat bridge with submit or prefill control.

  • agent-delegated AI calls

Files

SKILL.mdMarkdownGitHub ↗

Delegate All AI to the Agent

Rule

The UI and server never call an LLM directly. All AI work is delegated to the agent through the chat bridge.

Why

The agent is the single AI interface. It has context about the full project, can read/write any file, and can run scripts. Inline LLM calls bypass this — they create a shadow AI that doesn't know what the agent knows and can't coordinate with it.

How

From the UI (client):

import { sendToAgentChat } from "@agent-native/core";

sendToAgentChat({
  message: "Generate a summary of this document",
  context: documentContent, // optional hidden context (not shown in chat UI)
  submit: true, // auto-submit to the agent
});

From scripts (Node):

import { agentChat } from "@agent-native/core";

agentChat.submit("Process the uploaded images and create thumbnails");

From the UI, detecting when agent is done:

import { useAgentChatGenerating } from "@agent-native/core";

function MyComponent() {
  const isGenerating = useAgentChatGenerating();
  // Show loading state while agent is working
}

submit vs Prefill

The submit option controls whether the message is sent automatically or placed in the chat input for user review:

submit valueBehaviorUse when
trueAuto-submits to the agent immediatelyRoutine operations the user has already approved
falsePrefills the chat input for user reviewHigh-stakes operations (deleting data, modifying code, API calls with side effects)
omittedUses the project's default settingGeneral-purpose delegation
// Auto-submit: routine operation
sendToAgentChat({ message: "Update the project summary", submit: true });

// Prefill: let user review before sending
sendToAgentChat({
  message: "Delete all projects older than 30 days",
  submit: false,
});

Don't

  • Don't import Anthropic from "@anthropic-ai/sdk" in client or server code
  • Don't import OpenAI from "openai" in client or server code
  • Don't make direct API calls to any LLM provider
  • Don't use AI SDK functions like generateText(), streamText(), etc.
  • Don't build "AI features" that bypass the agent chat

Exception

Scripts may call external APIs (image generation, search, etc.) — but the AI reasoning and orchestration still goes through the agent. A script is a tool the agent uses, not a replacement for the agent.

Related Skills

  • scripts — The agent invokes scripts via pnpm script <name> to perform complex operations
  • self-modifying-code — The agent operates through the chat bridge to make code changes
  • files-as-database — The agent writes results to data files after processing requests
  • sse-file-watcher — The UI updates automatically when the agent writes files

Related skills

FAQ

Can scripts call external APIs?

Yes, scripts may call external APIs like image generation, but AI reasoning and orchestration still go through the agent.

What controls auto-submit?

The submit option: true auto-submits, false prefills for review, and omitted uses the project default.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.