当前位置: 首页 > news >正文

什么是Skill

Skill

什么是skill

skill就是为AI安装的可重复工作流包,把一件经常做,并且有固定规则的事情整理成一套模板,必要时附上脚本和资源。即

Skill = 说明书(SKill.md) + 元数据(openai.yaml) + 可选的脚本/参考资料/资源文件

结构

skill-name/ | |-- SKILL.md # 必需:入口说明,告诉 ChatGPT 这个 skill 是做什么的、什么时候触发、怎么做 | |-- agents/ | `-- openai.yaml # 必需:UI/元数据,比如显示名称、简介、图标等 | |-- scripts/ # 可选:放可执行脚本,适合稳定、可重复的步骤 | |-- analyze.py | `-- helper.sh | |-- references/ # 可选:放参考资料、规则、模板说明 | |-- schema.md | `-- style-guide.md | `-- assets/ # 可选:放输出会用到的资源文件 |-- template.docx `-- logo.png

简单实现

实现一个git PR变更摘要

your-skill/ ├── agents/ │ └── openai.yaml └── SKILL.md
  • interface:
    这一段是在定义这个 skill 的“界面展示信息”。

  • display_name: "PR Change Summary"
    这是这个 skill 在界面上显示出来的名字。
    用户看到的通常就是这个名字,而不是目录名。

interface:display_name:"PR Change Summary"short_description:"Summarize git diffs into short developer-facing updates"

---上下包裹着的是元信息

  • name:skill的名字

  • description:触发描述

## Overview:说明 skill 的总目标

## Workflow:定义执行步骤

  • ### Read the diff structurally结构化阅读变化
  • ### Infer the real change推断改动类型
  • ### Produce a brief developer summary生成短的摘要

## Output rules:定义输出边界

## Heuristics:给出好坏范式

--- name: pr-change-summary description: summarize git diff or patch content into a short developer-facing change summary. use when chatgpt or codex is given a git diff, patch, unified diff, or code change snippet and needs to quickly explain what changed, highlight impacted areas, and produce a concise summary for engineers. --- # PR Change Summary ## Overview Turn raw `git diff` or patch text into a short summary for developers. Focus on what changed, where it changed, and why it likely matters. ## Workflow ### 1. Read the diff structurally Identify: - files changed - added, removed, or renamed files - changed functions, classes, routes, queries, configs, or tests - recurring patterns across files Prefer the semantic change over line-by-line narration. ### 2. Infer the real change Summarize the implementation intent in plain engineering language: - bug fix - refactor - feature addition - cleanup - configuration change - test-only update - dependency or build change Do not overclaim intent when the diff is ambiguous. Use wording like `likely`, `appears to`, or `seems to` when needed. ### 3. Produce a brief developer summary Default output should be short and scan-friendly. Use this structure unless the user asks for another format: ```markdown Summary: <1-3 sentences> Changed areas: - <area 1> - <area 2> - <area 3> ``` ## Output rules - Write for developers, not for end users. - Keep the whole summary brief. - Mention concrete modules, files, or components when visible in the diff. - Group related edits together instead of listing every file separately. - Mention tests only if the diff clearly changes or adds tests. - Avoid filler such as `This PR basically...` or `Overall...`. - Do not invent motivation, risk, or product impact unless directly supported by the diff. ## Heuristics ### Prefer summaries like these Good: - `Adds validation for empty email input in the signup flow and updates the API handler to return a 400 response instead of silently accepting invalid data.` - `Refactors cache invalidation into a shared helper and updates the user/profile paths to call the new helper.` - `Updates test fixtures and snapshot expectations for the new serializer output.` Bad: - `Changes many files across the codebase.` - `Improves the system.` - `Adds some fixes and refactors.` ## Special cases ### Large diffs For large patches: - collapse low-signal edits - emphasize the main theme of the change - mention only the most important 2-5 changed areas ### Mixed diffs If a diff mixes unrelated work, call that out briefly and summarize each cluster separately. ### Pure formatting changes Say so directly, for example: - `Mostly formatting and lint-driven cleanup; no clear behavioral change is visible in the diff.` ## Example ### Input pattern A user provides raw `git diff` or patch text. ### Expected style ```markdown Summary: Refactors authentication token parsing into a shared utility and updates the login and refresh handlers to use it. Also adds tests covering expired-token behavior. Changed areas: - auth utility extraction - login and refresh handlers - expired-token test coverage ```

整体结构

SKILL.md | |-- Frontmatter | |-- name | `-- description | |-- Title | `-- PR Change Summary | |-- Overview | `-- 说明任务目标 | |-- Workflow | |-- 1. 结构化读 diff | |-- 2. 推断真实改动类型 | `-- 3. 输出简短摘要 | |-- Output rules | `-- 约束输出内容和边界 | |-- Heuristics | `-- 给出好坏摘要示例 | |-- Special cases | |-- large diffs | |-- mixed diffs | `-- formatting-only diffs | `-- Example `-- 给出目标输出样式

使用

在chatgptweb端安装skill


上传skill压缩包

进行skill测试,由于 web 端 gpt 不能使用 git 命令,所以这里失败了,可以尝试用 codex-cli测试该skill

http://www.jsqmd.com/news/500116/

相关文章:

  • 3月18日打卡
  • 告别AI Agent学习焦虑!6个GitHub项目带你从入门到精通,附可执行路线图
  • RPC核心原理:组件与调用流程
  • 2025年10款降AI率工具深度测评:论文降ai率,谁是真能手?
  • 智破纸质壁垒 赋能医药合规——旗讯数字医药注册批件纸质文档智能识别与结构化提取对接解决方案
  • 2026年本科毕业论文查AI率用什么工具预检?这3个又快又准
  • 消息中间件RabbitMQ04:路由模式+死信队列的应用实践模板
  • SQL 注入防不胜防?金仓 V009R002C014 内置防火墙,主动防御更省心
  • SEO_详解SEO关键词研究的完整步骤与工具推荐
  • 金仓数据库 SQL 防火墙实战:内核层防注入,配置 / 调优 / 审计全代码解析
  • 10款降AIGC平台真实测评:见证免费降AI天花板(附98%降至6%案例对比)
  • 超详细 OpenClaw 全平台部署教程
  • 深刻理解继承和多态
  • 2026阿里云SSL证书价格全解析:免费版与付费版对比及申请指南
  • 设计模式大揭秘:打造高级AI应用的核心套路与实战技巧
  • python爬虫学习第二课-流程控制
  • 第4篇:中文语言 华夏本源语言——极简语法大全
  • SpringBoot 参数校验报错全集|@Valid/@Validated 高频踩坑全解决
  • 从学习到拦截:KingbaseES SQL 防火墙三种模式深度测评
  • 【ARM汇编】0x01_ARM和C混合编程实现基本运算
  • 【影刀RPA】【B站】之【视频】【自动】【获取信息、关注、点赞、智能评论、智能回复】
  • MCP的基本概念
  • esp8266 nodemcu v3烧录失败A fatal esptool.py error occurred: Cannot configure port, something went wrong
  • Claude Code 使用与配置完整指南
  • 2026上海户外广告位哪家好?核心商圈资源深度解析 - 品牌排行榜
  • Fitbit健康教练将集成医疗记录数据提供个性化指导
  • 应对芯片涨价,光口以太网芯片国产P2P替代
  • 做乡村改造没设计师?这个建筑AI工具ADAI能救命
  • 飞渡科技2026空间智能新品发布,引领全栈信创新时代
  • OpenShell:安全沙箱隔离的沙箱隔离技术