apps/electron/default-skills/tool-builder/SKILL.md
交互式创建和管理 Chat 模式的自定义 HTTP 工具。当用户想要创建新的 API 工具、配置 Chat 工具、添加自定义工具、管理自定义工具、或说"帮我创建一个 XX 工具"时使用此 Skill。也适用于调试、修复或删除已有的自定义工具。
npx skillsauth add erlichliu/proma tool-builderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
通过交互式对话帮助用户创建可在 Chat 模式中使用的自定义 HTTP API 工具。
向用户了解:
如果用户不确定具体 API,帮助推荐合适的公开 API。
根据收集的信息构建工具配置 JSON。配置文件位于 ~/.proma/chat-tools.json。
{
"toolStates": {
"memory": { "enabled": true },
"web-search": { "enabled": false },
"custom-weather": { "enabled": true }
},
"toolCredentials": {},
"customTools": [
{
"id": "custom-weather",
"name": "天气查询",
"description": "查询指定城市的当前天气信息",
"params": [
{ "name": "city", "type": "string", "description": "城市名称", "required": true }
],
"category": "custom",
"executorType": "http",
"httpConfig": {
"urlTemplate": "https://wttr.in/{{city}}?format=j1",
"method": "GET",
"resultPath": "current_condition"
}
}
]
}
| 字段 | 必填 | 说明 |
|------|------|------|
| id | 是 | 唯一标识,必须以 custom- 前缀 + slug 格式(如 custom-weather) |
| name | 是 | 显示名称 |
| description | 是 | 工具描述,AI 据此决定何时调用 |
| params | 是 | 参数列表,每个含 name/type/description/required |
| category | 是 | 固定为 "custom" |
| executorType | 是 | 固定为 "http" |
| httpConfig | 是 | HTTP 请求配置 |
| icon | 否 | Lucide 图标名(如 "Cloud"、"Languages") |
| systemPromptAppend | 否 | 启用时注入的系统提示词 |
| 字段 | 必填 | 说明 |
|------|------|------|
| urlTemplate | 是 | URL 模板,{{paramName}} 占位符会被参数值替换(自动 URL 编码) |
| method | 是 | "GET" 或 "POST" |
| headers | 否 | 请求头,常用于 API Key 认证:{ "Authorization": "Bearer xxx" } |
| bodyTemplate | 否 | POST 请求体 JSON 模板,{{paramName}} 占位符会被替换(不编码) |
| resultPath | 否 | 点号路径提取响应中的特定字段(如 "data.results") |
params[].type 支持:"string" / "number" / "boolean"
可选添加 enum 字段限制可选值:
{ "name": "unit", "type": "string", "description": "温度单位", "enum": ["celsius", "fahrenheit"] }
操作步骤:
~/.proma/chat-tools.json(如不存在则创建)customTools 数组(按 id 去重)toolStates 中添加 { "enabled": true } 使其默认启用写入后应用会自动检测文件变化并刷新工具列表。
告知用户:
用户反馈问题时,常见原因:
urlTemplateparams 定义resultPathheaders 中的 API Key修复后重新写入 chat-tools.json,应用自动刷新。
从 customTools 数组中移除对应工具,同时删除 toolStates 中的条目。
{
"id": "custom-weather",
"name": "天气查询",
"description": "查询指定城市的当前天气和温度信息。当用户询问天气时调用。",
"params": [
{ "name": "city", "type": "string", "description": "城市名称(英文)", "required": true }
],
"category": "custom",
"executorType": "http",
"httpConfig": {
"urlTemplate": "https://wttr.in/{{city}}?format=j1",
"method": "GET",
"resultPath": "current_condition"
}
}
{
"id": "custom-translate",
"name": "翻译",
"description": "将文本翻译为目标语言。当用户需要翻译时调用。",
"params": [
{ "name": "text", "type": "string", "description": "要翻译的文本", "required": true },
{ "name": "target_lang", "type": "string", "description": "目标语言代码", "required": true, "enum": ["EN", "ZH", "JA", "KO", "FR", "DE", "ES"] }
],
"category": "custom",
"executorType": "http",
"httpConfig": {
"urlTemplate": "https://api.example.com/translate",
"method": "POST",
"headers": { "Authorization": "Bearer YOUR_API_KEY" },
"bodyTemplate": "{\"text\": \"{{text}}\", \"target_lang\": \"{{target_lang}}\"}",
"resultPath": "translations.0.text"
}
}
data-ai
Proma 使用顾问,主动帮用户把"在 Agent 身上反复踩同一个坑"变成"一次性沉淀成 Skill"。**必须**在以下场景触发:(1) 用户表达不满或挫败——"不对"、"怎么又"、"你没理解"、"我刚才说了"、"再说一遍"、"算了"、"Proma 怎么"、"为什么不能"、"这个 Agent 真"、"stop";(2) 用户在同一会话里第 2 次以上解释同一个流程/偏好/格式;(3) 用户表达"每次都要我提醒"、"以后都这样"、"能不能记住"、"下次别这样";(4) 用户主动求优化——"怎么用 Proma 更顺手"、"有什么使用技巧"、"这个流程能不能固化";(5) 用户混淆 Skill 和 Chat 模式工具、或问"你能做 X 吗"而 X 其实已有 Skill 或更适合换模式。本 Skill 不直接干活——它做四件事:诊断真实痛点、检查已有能力是否被忽略、**主动设计**沉淀方案(Skill 大纲、命名、触发场景预先想好)、把用户的认知负担降到最低(用户只需要确认或微调)。Coach 在判断有更好做法时会**主动挑战**用户而不是顺从。一切从最简单的方案开始,先用最小代价解决,反复出现再升级为完整 Skill。
development
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
testing
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
documentation
Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates, layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx filename, regardless of what they plan to do with the content afterward. If a .pptx file needs to be opened, created, or touched, use this skill.