技能 编程开发 本地模型任务委派

本地模型任务委派

v20261120
on-device-delegate
将大量阅读型子任务委派给本地端侧模型,节省云端上下文;适用于日志排查、测试分析、汇总多文件及从大段输入中提取事实。
获取技能
453 次下载
概览

On-Device Delegate

Send the bulky reading in a task to the on-device worker, then check its answer
once. The main session keeps planning and answering. The worker reads the big
inputs on the local model, so they never enter the main context.

Steps

  1. Gate on what you would read. If one command or a short script can

compute the answer, do it yourself now: no plan, no notes about this
skill. Delegate only when you would otherwise READ more than about 25 KB
of text into your context (prose, many files). Never delegate security
review or design decisions.

  1. Check the worker. The worker is the custom agent

local-coding:on-device-worker (the plugin id). If the task tool lists it
as plain on-device-worker instead (copied into an agents folder), use
that. If neither is available, work normally.

  1. Brief. Do not read the big input first. Make ONE task call:
  • name: "on-device-"
  • description: 3-5 words
  • agent_type: the worker id from step 2
  • mode: "sync"
  • model: the on-device model id named in the session's routing line,

exactly (if there is none:
"winml-azureml-mai-code-1.1-flash-on-device/MAI-Code-1.1-Flash-On-Device").
The worker does not pin a model, so without this it runs on your own
model.

  • prompt, exactly:

```text
GOAL:
INPUTS:
RULES: Read only INPUTS. At most 8 tool calls. Edit nothing but OUTPUT. No questions.
OUTPUT:
ANSWER: Reply ONCE with only , then stop.
If you cannot, reply only: UNABLE:
```

  1. Check once. At most ONE cheap check (format, a count, or one spot

check). Never recompute the answer or re-read the input. If the answer is
wrong, UNABLE, or the task call fails: do it yourself. Then finish.

Example

User: "Use the on-device-delegate skill. From the logs under logs\, list
every distinct error message with its count, most frequent first."

Task prompt:

GOAL: Count each distinct error message in the logs.
INPUTS: logs\
RULES: Read only INPUTS. At most 8 tool calls. Edit nothing but OUTPUT. No questions.
OUTPUT: reply only
ANSWER: Reply ONCE with only lines of the form "<count> <message>", most frequent first, then stop.
If you cannot, reply only: UNABLE: <reason>

Check: confirm the lines match the format and spot-check one count with a
single search. Then answer the user.

Limits

  • The worker can return a confident but wrong answer. The single check

catches format errors, not every wrong fact. Tell the user what you checked.

  • Expect minutes, not seconds, per delegated task, especially on the first

call while the local model loads.

Setup scripts

scripts/ holds two setup scripts for the user, described in the
local-coding plugin README. They are not part of a task: never run them while
you work on the user's request.

local model's output tokens in the user's providers.json.

installs or updates the plugin, then runs the cap script.

信息
分类 编程开发
名称 on-device-delegate
版本 v20261120
大小 8.63KB
更新时间 2026-11-20
语言