mgc-task-chain-meta-skill

MGC-based single-device multi-Agent task-chain collaboration methodology: supplies prompt templates for a lead Agent, script role, and executing Agents to enable multi-Agent cooperation without exposing sensitive resources.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "mgc-task-chain-meta-skill" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-4b33b2f4d95d7a8548bdedfc8eff28476dca3fba0b09e316c41e86beaf1f80c5. Verify the upstream source and version against https://skillhub.cn/skills/user_46820e02/mgc-task-chain-meta-skill before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

MGC-based single-device multi-Agent task-chain collaboration methodology: supplies prompt templates for a lead Agent, script role, and executing Agents to enable multi-Agent cooperation without exposing sensitive resources.

0 Downloads

Introduction source: third_party · user_46820e02 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: "mgc-task-chain-meta-skill"
description: 基于 MGC 的单设备多 Agent 任务链协作方法论,提供主 Agent、脚本角色、执行 Agent 的提示词模板,实现敏感资源零暴露的安全协作。

多Agent安全协作(单设备)


一句话定位

基于 MGC 的单设备多 Agent 任务链协作方法论,通过主 Agent 调度、脚本角色编写、 执行 Agent 执行,实现敏感资源零暴露的安全协作。


解决的问题

痛点 解决方案
多 Agent 共用环境,密钥易泄露 密钥存入 MGC,Agent 无接触执行
脚本内容暴露给所有 Agent 脚本存入 MGC,执行时零暴露
缺乏任务协作方法 主 Agent 任务链编排模板
子 Agent 越权访问敏感资源 执行 Agent 提示词约束

核心概念

MGC 在协作中的角色

MGC 是 本地敏感资源托管与执行层:

  1. 用户 通过 WebUI(浏览器或 mgc_open_webui)存入密钥和脚本
  2. 脚本角色 编写脚本并通过 mgc_save 存入 MGC
  3. 主 Agent 编排任务链,指定调用时机;在子 Agent 失败或用户授权时可直接执行
  4. 执行 Agent 只调用 mgc_run,不接触密钥和脚本

四种角色

角色 职责 能力
用户 存入密钥/脚本,下达目标 WebUI / mgc_open_webui
主 Agent 任务拆解,编排调度,在授权/子Agent失败时执行 mgc_list, mgc_run
脚本角色 编写脚本,存入 MGC mgc_save, mgc_get, mgc_list
执行 Agent 完成非敏感任务 mgc_run, mgc_list

注:敏感操作(mgc_get 获取明文)需要用户授权后执行


协作流程

用户 ──存入密钥/脚本(WebUI)──> MGC
                │
                ▼
用户 ──下达目标──> 主 Agent
                │
                ├──拆解任务链
                │
                ▼
        ┌───────┴───────┐
        ▼               ▼
   脚本角色          执行 Agent
   (编写脚本)        (完成任务)
        │               │
        ▼               ▼
   mgc_save         mgc_run
        │               │
        └───────┬───────┘
                ▼
           MGC 执行
        (返回结果)

快速开始

前置条件

  1. 安装 MGC v1.4.7+
  2. 配置 MCP(在 AI 客户端添加以下配置):
    {
      "mcpServers": {
        "mgc-blackbox": {
          "command": "mgc",
          "args": ["--mcp"]
        }
      }
    }
  3. 通过 WebUI 或 mgc_open_webui 存入敏感资源:
    • API 密钥
    • 数据库凭证
    • 业务脚本

步骤 2:配置主 Agent

在主 Agent 系统提示词中加载 prompts/master_agent.md

步骤 3:配置脚本角色

加载 prompts/script_agent.md

步骤 4:配置执行 Agent

加载 prompts/executor_agent.md

步骤 5:开始协作

用户下达任务后,主 Agent 自动拆解任务链并协调子 Agent 完成。


提示词模板

prompts/master_agent.md

主 Agent 提示词模板,包含:

  • 任务拆解方法
  • MGC 调用时机
  • 子任务分配规则

prompts/script_agent.md

脚本角色提示词模板,包含:

  • mgc_save 使用方法
  • 脚本命名规范
  • 脚本位置汇报格式

prompts/executor_agent.md

执行 Agent 提示词模板,包含:

  • mgc_run 调用方法
  • 禁止行为清单
  • 结果处理规范

prompts/cooperation_best_practice.md

最佳实践文档,由主 Agent 自动维护:

  • 协作流程
  • 可复用脚本列表
  • 参数规范
  • 用户偏好
  • 常见错误与修复
  • 场景最佳实践
  • 协作记录及用户反馈

MGC 工具使用

mgc_save(脚本角色使用)

# 存入脚本
mgc_save(
    info_type="script",
    info_owner="数据查询脚本",
    ext01="python",
    content="""# 脚本内容..."""
)

mgc_run(执行 Agent 使用)

⚠️ 注意:部分 MCP 客户端可能存在 ext02 JSON 对象序列化的兼容性问题,建议使用 JSON 字符串格式。

# 执行脚本
mgc_run(
    info_type="script",      # 必填,指定类型为脚本
    info_owner="数据查询脚本",  # 必填,脚本名称
    diff_1="v1",             # 必填,版本号或分支标识
    ext02='{"param1": "value1"}'  # 可选,JSON 字符串格式的执行参数
)

mgc_list(所有 Agent 可用)

注:mgc_list 仅查看信息列表,不获取明文,所有 Agent 都可使用。

# 查看可用脚本
mgc_list(info_type="script")

mgc_open_webui(用户使用)

用于让 AI 打开 MGC WebUI,方便用户存入敏感资源。

# 打开 WebUI
mgc_open_webui()

安全边界

此技能提供

  • 协作方法论框架
  • 提示词模板
  • MGC 工具调用规范

此技能不提供

  • MGC 权限强制管控(依赖提示词约束)
  • 自动密钥管理
  • Agent 身份鉴权

⚠️ 重要提醒

  1. 所有敏感资源必须用户通过 MGC WebUI 存入
  2. 执行 Agent 只能调用 mgc_run,禁止读取脚本内容
  3. 主 Agent 需明确告知子 Agent 调用时机和脚本位置
  4. 敏感操作结果返回后,主 Agent 负责更新任务状态,协调子Agent协作

常见问题

问题 解答
存入MGC的信息是否会同步云端? MGC是一个本地工具,不具备主动联网能力
MGC的主要能力? 安装MGC后查看 ~/.mgc/skills/mgc_skill.md
子 Agent 能否绕过 MGC? 提示词约束无法完全禁止,需确保子 Agent 无法访问本地脚本文件
如何隔离不同任务的脚本? 通过 info_owner 命名区分,如 任务A_查询脚本、任务B_发布脚本
主 Agent 如何知道有哪些脚本? 使用 mgc_list 查看,或由脚本角色汇报

相关资源


更新日志

v1.0.0

  • 初始版本
  • 提供主 Agent、脚本角色、执行 Agent 三套提示词模板
  • 包含完整协作流程说明

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供多 Agent 安全协作方法论,解决敏感资源零暴露问题
  • 适用于需要安全协作的场景,具有明确实用价值
Trigger Precision95/100

Highlights

  • description 清晰描述了 Skill 的功能和用途
  • 触发词完整,边界清晰
Structure and Standards75/100

Areas to improve

  • 缺少 When to Use 章节 Reported severity: Minor

    Skill 文档中缺少 When to Use 章节,用户可能不清楚何时使用此 Skill。

    Recommendation: 建议添加 When to Use 章节,说明此 Skill 的适用场景和使用时机。

  • 文档过长 Reported severity: Minor

    Skill 文档内容较多,可能影响用户阅读体验。

    Recommendation: 建议适当精简文档内容,或将其拆分为多个部分,提高可读性。

Highlights

  • 结构清晰,包含多个章节
  • 有详细的流程说明和示例
Execution Reliability70/100

Areas to improve

  • 未覆盖所有异常情况 Reported severity: Minor

    Skill 提供了详细的工具使用说明,但未覆盖所有可能的异常情况。

    Recommendation: 建议补充更多异常情况的处理说明,提高执行可靠性。

Highlights

  • 提供了详细的工具使用说明和安全边界
  • 依赖提示词约束,确保执行 Agent 不接触敏感资源
Evidence Verifiability (mean of the first four)81/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • 127.0.0.1
  • github.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.