news 2026/9/10 13:18:27

Quick Summary Skill

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
Quick Summary Skill

Quick Summary Skill

【免费下载链接】AionUiOpen-source 24/7 Cowork app for OpenClaw, Hermes, Claude Code, Codex, OpenCode and 20+ more CLI Agent | Customize your assistants | Team them up|Star if you like it!项目地址: https://gitcode.com/GitHub_Trending/ai/AionUi

You are a concise project summarizer.

When user asks for a summary:

  1. Output 3-6 bullet points.
  2. Include: goal, current status, and next action.
  3. Keep each bullet under 20 words.
这份文件由四个层次构成,对应编写任何技能都应遵守的骨架: | 层次 | 原文内容 | 作用 | | --- | --- | --- | | 标题 | `# Quick Summary Skill` | 以 Markdown H1 声明技能身份,便于在技能列表中识别 | | 角色设定 | `You are a concise project summarizer.` | 为 Agent 定义一个明确的人格/专业角色,决定后续行为的基调 | | 触发条件 | `When user asks for a summary:` | 明确该技能在何种用户请求下生效,避免误触发 | | 行为指令 | 编号列表 1-3 | 给出可执行、可量化的输出规则,直接约束 Agent 的回答格式 | 值得注意的两点设计: - **用「简洁(concise)」一词贯穿全局**:角色设定里的 `concise` 与第 3 条 `under 20 words`(每条少于 20 词)形成前后呼应,把「简洁」从抽象形容词落地为可校验的量化约束。 - **输出结构固定化**:第 2 条要求必须包含 `goal`(目标)、`current status`(当前状态)、`next action`(下一步行动)三个字段。这种「结构化输出」约束让总结结果稳定、易读,也便于下游消费。 ## 技能的四种编写形态:对比仓库中的其他技能 Hello World 扩展目录下还提供了另一个技能 [issue-breakdown.md](https://link.gitcode.com/i/fd7222e511c980915d83bf3cea798806),它演示了「流程化指令」的写法: ```markdown # Issue Breakdown Skill You are an issue triage assistant. For any bug report: 1. Restate the issue in one sentence. 2. Provide likely root causes (max 3). 3. Give a minimal verification checklist.

同样是「标题 + 角色 + 触发条件 + 编号指令」的结构,但每条指令都带有数量上限约束max 3个根因)和粒度约束(一句话复述、最小化验证清单),适合 Bug 分类这种需要控制输出规模的场景。

再看 E2E 完整扩展(examples/e2e-full-extension)中的两个技能,它们展示了另两种风格:

  • coding-skill.md ——能力清单式:不设触发条件,直接用无序列表声明Help with code generationSupport multiple programming languagesProvide code reviews等能力范围,适合常驻型通用技能;
  • test-skill.md ——强制格式式:要求Always respond with structured JSONInclude a "status" field in every response,用强约束保证输出可被程序解析,适合与自动化流水线对接的技能。

四种形态(量化约束式、流程分步式、能力清单式、强制格式式)可自由组合,共同点是都必须包含清晰的角色设定可执行指令

把技能注册进扩展:contributes/skills.json

仅放置 Markdown 文件并不会被 AionUI 识别,技能必须在扩展清单中登记。Hello World 扩展通过 contributes/skills.json 完成注册:

[ { "name": "hello-quick-summary", "description": "Generate a short project summary with clear bullet points", "file": "skills/quick-summary.md" }, { "name": "hello-issue-breakdown", "description": "Break a user issue into reproducible steps and checks", "file": "skills/issue-breakdown.md" } ]

每个技能条目包含三个字段:

字段取值示例说明
namehello-quick-summary全局唯一的技能标识,被 Agent/Assistant 的enabledSkills引用,也出现在扩展快照的skills列表中
descriptionGenerate a short project summary with clear bullet points技能的能力摘要,供系统在技能索引注入与用户选择时展示
fileskills/quick-summary.md技能文件路径,相对于扩展根目录解析

除外部 JSON 文件外,技能也可以像 e2e-full-extension/aion-extension.json 第 53-64 行那样直接内联在扩展清单的contributes.skills数组中(e2e-test-skille2e-coding-skill),两种写法等价,外部文件方式更利于模块化组织。

扩展清单中的声明链路:aion-extension.json

hello-world-extension/aion-extension.json 展示了技能在扩展整体架构中的位置:

{ "$schema": "../../schemas/aion-extension-v1.json", "name": "hello-world", "displayName": "Hello World Extension", "version": "1.0.0", "permissions": { "storage": true, "network": false, "shell": false, "filesystem": "extension-only", "events": true }, "contributes": { "acpAdapters": "$file:contributes/acp-adapters.json", "mcpServers": "$file:contributes/mcp-servers.json", "assistants": "$file:contributes/assistants.json", "agents": "$file:contributes/agents.json", "skills": "$file:contributes/skills.json", "themes": "$file:contributes/themes.json", "settingsTabs": "$file:contributes/settings-tabs.json" } }

关键点:

  • contributes.skills使用$file:前缀指向外部 JSON,与 ACP 适配器、MCP 服务器、助手、Agent、主题、设置页并列,是扩展七大贡献类别之一;
  • engine.aionui: "^1.0.0"声明扩展兼容的 AionUI 引擎版本;permissions.filesystem: "extension-only"表明扩展对文件系统的访问被限制在自身目录内——这与后文技能文件加载时的路径校验机制相互印证;
  • 扩展还提供可选的lifecycle脚本(onActivate/onDeactivate),技能文件属于静态资源,不依赖生命周期即可被加载。

技能与 Agent/Assistant 的绑定:enabledSkills 机制

技能注册后还需显式绑定到 Agent 或 Assistant 才会在实际会话中生效。Hello World 扩展的 contributes/agents.json 中,「Hello Coder」Agent 通过enabledSkills引用技能:

{ "id": "hello-coder", "name": "Hello Coder", "description": "A coding agent that helps with code generation and review", "presetAgentType": "hello-stdio-agent", "contextFile": "agents/hello-coder-context.md", "models": ["demo-model"], "enabledSkills": ["hello-quick-summary"], "prompts": ["You are a coding agent. Help users write clean, efficient code."] }

该 Agent 同时配有 agents/hello-coder-context.md 作为系统上下文(声明代码生成、重构、审查、Bug 修复等能力与行为准则),而enabledSkills: ["hello-quick-summary"]则把hello-quick-summary技能挂载到该 Agent 上。同理,e2e-full-extension/aion-extension.json 第 132-143 行的e2e-test-assistant通过enabledSkills: ["e2e-test-skill"]完成 Assistant 级绑定。从源码结构看(如 GuidActionRow.tsx 的enabledSkills处理逻辑),渲染层会依据disabledBuiltinSkillsenabledSkills的并集/差集计算实际启用的技能集合。

技能的底层加载与安全机制:skillFiles 服务源码解析

技能文件的读取由主进程服务 packages/desktop/src/process/services/skills/skillFiles.ts 提供,并在 applicationBridgeCore.ts 第 20-24 行注册为 IPC provider:

ipcBridge.fs.listSkillFiles.provider(({ skill_location }) => skillFiles.list(skill_location)); ipcBridge.fs.readSkillFile.provider(({ skill_location, relative_path }) => skillFiles.read(skill_location, relative_path) );

【免费下载链接】AionUiOpen-source 24/7 Cowork app for OpenClaw, Hermes, Claude Code, Codex, OpenCode and 20+ more CLI Agent | Customize your assistants | Team them up|Star if you like it!项目地址: https://gitcode.com/GitHub_Trending/ai/AionUi

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/9/10 13:17:49

CANN/ge销毁执行配置句柄API

aclmdlDestroyExecConfigHandle 【免费下载链接】ge GE(Graph Engine)是面向昇腾的图编译器和执行器,提供了计算图优化、多流并行、内存复用和模型下沉等技术手段,加速模型执行效率,减少模型内存占用。 GE 提供对 PyTo…

作者头像 李华
网站建设 2026/9/10 13:13:37

STM32+RM500U+AHT20温湿度上云实战:工业级可靠通信与TCP数据上报

简介:这是一套面向嵌入式物联网开发者的STM32实战项目资源,聚焦5G通信与环境传感融合应用,适用于具备C语言基础和HAL库开发经验的中级单片机学习者及工程师。项目以移远RM500U 5G模块为核心,完整实现AHT20温湿度数据采集、TCP协议…

作者头像 李华