feat(sproutclaw): modularize webui, extensions, and agent config layout
Some checks failed
CI / build-check-test (push) Has been cancelled
Some checks failed
CI / build-check-test (push) Has been cancelled
Restructure local extensions into per-feature directories, split WebUI into backend modules with slash commands and systemd support, and track prompts/skills under .pi/agent for portable Gitea deployment. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
48
.pi/agent/skills/command-help-zh-skill/SKILL.md
Normal file
48
.pi/agent/skills/command-help-zh-skill/SKILL.md
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
name: command-help-zh-skill
|
||||
description: 为任意 CLI 命令创建独立、无依赖的 Bash 包装脚本,将帮助文本翻译成中文,并只把说明性描述高亮为黄色。适用于用户希望获得本地化的 `--help` 体验,同时保持命令名称和参数不着色的场景。
|
||||
---
|
||||
|
||||
# 命令帮助中文高亮
|
||||
|
||||
## 适用场景
|
||||
|
||||
用户要把任意命令的 `--help` / `-h` 帮助页做成中文版本,并且要求:
|
||||
|
||||
- 只高亮“介绍 / 描述”文字
|
||||
- 命令名、参数名、选项名保持普通颜色
|
||||
- 脚本必须是单文件 `bash`
|
||||
- 不能依赖复杂工具链,优先只用 `printf`、`case`、`cat`
|
||||
|
||||
## 处理流程
|
||||
|
||||
1. 先确认目标命令名,例如 `codex`、`git`、`tea`、`gh`,或由用户提供 `--help` 输出。
|
||||
2. 如果没有原始帮助内容,就先运行 `<command> --help` 获取输出。
|
||||
3. 翻译成自然、简洁的中文。
|
||||
4. 保留原始结构:
|
||||
- 标题
|
||||
- 简介
|
||||
- 用法
|
||||
- 命令
|
||||
- 参数
|
||||
- 选项
|
||||
5. 输出时只让说明文字使用 ANSI 黄色。
|
||||
- 例如 `\033[1;33m`
|
||||
- 结束后恢复默认颜色
|
||||
6. 命令名、参数、选项、括号内容保持普通颜色,不要整行染色。
|
||||
7. 生成可直接放到全局 PATH 的脚本,默认命名为 `<command>-help`;如果用户要求或命名冲突,再用 `<command>-help-zh`。
|
||||
|
||||
## 实现要求
|
||||
|
||||
- 必须是独立脚本,不能依赖仓库内外的其他文件。
|
||||
- 脚本开头应固定目标命令名,执行时再调用原始命令的 `--help`。
|
||||
- 推荐使用 `printf` 逐行输出,避免把整段文本一起染色。
|
||||
- 如果需要分隔“左侧标签”和“右侧说明”,先打印标签,再单独打印黄色说明。
|
||||
- 保持输出整洁,避免多余前导空格。
|
||||
|
||||
## 输出标准
|
||||
|
||||
- 中文表达自然,优先清晰准确。
|
||||
- 说明部分高亮黄色。
|
||||
- 可以直接复制到 `/usr/local/bin/` 之类的位置使用。
|
||||
- 如果用户指定了固定命令名,按用户要求命名。
|
||||
@@ -0,0 +1,4 @@
|
||||
interface:
|
||||
display_name: "Command Help Chinese Highlight"
|
||||
short_description: "Translate any CLI help text into Chinese with yellow-highlighted descriptions only"
|
||||
default_prompt: "Create a standalone no-dependency Bash help wrapper for the specified command. Translate its help text into Chinese, keep command names and arguments uncolored, and highlight only descriptions in yellow."
|
||||
Reference in New Issue
Block a user