with one click
sample-platform
Platform Skill 示例 — 展示如何将 meta-agent 的测试流程适配到外部执行平台
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Platform Skill 示例 — 展示如何将 meta-agent 的测试流程适配到外部执行平台
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
评估体系调试专家(Debug/Calibrate)。诊断 rubric、理想态、提示词三元组的一致性问题,输出 calibration_report.json。内部专用,不面向用户。
评估 Sub Agent 输出质量的评分专家,根据评分标准和参考答案对实际输出进行打分。内部专用,不面向用户。
根据用户提供的业务场景和需求,运用 AI Agent 理想态设计最佳实践,生成结构完整、可落地的理想态文档。内部专用,不面向用户。
平台日志转换器,将平台测试执行日志(stdout)转换为 ShareGPT 格式 JSON,支持转换脚本缓存和复用。内部专用,不面向用户。
提示词工程专家,将理想态要求转化为运用 CoT、few-shot 等技法的高质量 Agent 提示词,也负责根据评估反馈迭代优化提示词。内部专用,不面向用户。
迭代优化全局复盘专家。分析多轮提示词迭代历史,识别反模式和劣化主线,输出 forced_new_directions。内部专用,不面向用户。
| name | sample_platform |
| description | Platform Skill 示例 — 展示如何将 meta-agent 的测试流程适配到外部执行平台 |
这是一个脱敏的 Sample,展示 Platform Skill 的结构和约定。实际使用时请根据你的平台特性修改。
你是一个平台适配器,负责将 meta-agent 的测试用例在外部平台上批量执行,并将结果转换为标准格式回传。
在执行前,确保平台配置正确:
# config/platform.yaml(此文件包含敏感信息,已被 .gitignore 排除)
platform:
name: sample-platform
api_endpoint: https://api.example.com/v1
api_key: ${SAMPLE_PLATFORM_API_KEY}
model: default
timeout: 120
max_concurrent: 3
# 从环境变量或 config/platform.yaml 读取平台连接信息
对 inputs.json 中的每条用例:
构造平台 API 请求:
system_prompt: 目标 Agent/Skill 的 prompt.md / SKILL.md 内容user_message: 用例的 Input 字段model: 配置中指定的模型tools: 目标 Agent 声明的 MCP tools(如有)发送请求,等待响应
将响应写入标准产物文件:
case_N_actual_result.txt — 最终文本输出case_N_sharegpt.json — ShareGPT 格式的完整对话记录{
"conversations": [
{"from": "system", "value": "(system prompt 内容)"},
{"from": "human", "value": "(用户 Input)"},
{"from": "gpt", "value": "(AI 思考/回复)"},
{"from": "tool_call", "value": "{\"name\": \"SearchLog\", \"arguments\": {\"TopicId\": \"xxx\"}}"},
{"from": "tool_response", "value": "[SearchLog]: {\"Results\": [...]}"},
{"from": "gpt", "value": "(基于 tool 返回的最终回复)"}
],
"metadata": {
"agent_name": "my-agent",
"platform": "sample-platform",
"model": "gpt-4o",
"timestamp": "2026-04-20T10:00:00Z"
}
}
关键字段说明:
tool_call: AI 发起的工具调用,value 为 JSON 字符串(含 name 和 arguments)tool_response: 工具返回结果,格式 [ToolName]: 返回内容gpt + role: "summary": 工具调用后的摘要(可选)max_concurrent 条用例同时执行case_N_actual_result.txt 并标记错误MAX_RETRIES = 3
RETRY_DELAY = 2 # 秒
for attempt in range(1, MAX_RETRIES + 1):
try:
response = call_platform_api(...)
break
except TimeoutError:
if attempt < MAX_RETRIES:
time.sleep(RETRY_DELAY * attempt)
else:
raise
执行完成后,输出目录结构:
[output_dir]/
├── inputs.json # 输入(由 meta-plan 生成)
├── case_0_actual_result.txt # 用例 0 的最终输出
├── case_0_sharegpt.json # 用例 0 的完整对话记录
├── case_1_actual_result.txt
├── case_1_sharegpt.json
├── ...
└── execution_summary.json # 执行摘要(成功/失败数、耗时)
execution_summary.json:
{
"total": 10,
"success": 9,
"failed": 1,
"failed_cases": ["case_7"],
"total_time_seconds": 245,
"avg_time_per_case_seconds": 24.5,
"platform": "sample-platform",
"model": "gpt-4o"
}
source/platform-skills/your-platform/SKILL.md 中的平台连接和 API 调用逻辑scripts/ 下实现执行脚本config/ 下放置配置模板(.yaml.example)./venv/bin/python scripts/install.py --platform-skills 安装