feat: update readme

This commit is contained in:
2026-09-08 15:25:58 +08:00
parent 06865939e1
commit 9b3e16cb63
12 changed files with 676 additions and 86 deletions
+65
View File
@@ -0,0 +1,65 @@
# 安装 pouch
用户说「帮我安装 pouch」「把 skill 装上」,或丢来仓库 URL / 本地路径时执行。
本文件是代装步骤的唯一详细来源。不要用 `pouch select`(必须交互式 TTY)。
不要在未确认时覆盖已有的 `~/.pouch`。CLI 只认 `~/.pouch`。
默认 remote:`https://git.yumee.top/laily/pouch.git`。用户给了 URL 或本地路径则用用户的。
## 1. 确认本机
需要 `python3` 和 `git`。缺了先说明怎么装,不要继续。
## 2. 让 `~/.pouch` 指向本仓库
按现状只走一条:
| 现状 | 动作 |
| --- | --- |
| 当前目录就是这份仓库(有 `install.sh` 和 `skills/`),且没有 `~/.pouch` | `ln -sfn "$(pwd)" "$HOME/.pouch"` |
| `~/.pouch` 已在且含 `skills/`、`install.sh` | 沿用 |
| 只有 `~/.skills` | `mv ~/.skills ~/.pouch` |
| 都没有 | `git clone <URL> ~/.pouch`。失败则问用户本地路径或可用 remote |
| `~/.pouch` 在,但不是这份仓库 | 停下问用户,不要删、不要覆盖 |
clone 私有 Git 失败时停下来问路径或认证,不要改 remote、不要改用交互式 `pouch select`。
## 3. 装 CLI 和 `pouch` skill
```bash
"$HOME/.pouch/install.sh"
export PATH="$HOME/.local/bin:$PATH"
command -v pouch
pouch status
```
`install.sh` 会改 rc,当前会话仍要 `export PATH`。不要让用户重开终端才继续。
它只全局安装 **pouch** 这一个 skill。其它 skill 不要默认全装。
## 4. 介绍 builtin skill,再问要装哪些
```bash
python3 "$HOME/.pouch/skills/pouch/scripts/catalog.py"
```
把表格里的「做什么」和「可以这么说」告诉用户。不要念 frontmatter `description`,
不要通读各 README。用户没点名就问一次:装哪些、全局还是当前项目。能判断就不要追问。
```bash
pouch add <name> -g -y # 全局,所有项目都能用
pouch add <name> -y # 仅当前项目
```
默认 `pouch add` 装到当前工作目录。cwd 是 pouch 仓库本身时用 `-g`,除非用户就在维护 pouch。
用户是在自己的应用仓库里请你代装,才做项目级安装。
## 5. 验收
```bash
pouch status
pouch doctor
```
软链异常则 `pouch doctor --fix`。已经装好时只汇报状态,问还要不要加 skill,不要重新 clone。
当前目录是业务仓库(不是 pouch 仓库)时,回到 SKILL.md,走「接入当前项目」。
+49
View File
@@ -0,0 +1,49 @@
# 在当前项目接入 skill
用户说「把 skill 接上」「在这个项目初始化 skill」「这个仓库该用哪些 pouch skill」时执行。
安装和初始化是两步,不要只 `pouch add` 就当接入完成。
当前目录是 pouch 仓库本身(有 `install.sh`、`skills/pouch/SKILL.md`、`bin/pouch`)时停:
这是维护 SSOT 的仓库,不要按业务项目接入。改 skill 走「创建」或「问题或优化回流」。
## 1. 看仓库信号
```bash
python3 <pouch-skill-dir>/scripts/suggest_skills.py
```
只根据脚本输出建议,不要为了「可能有用」推荐 eli5、note-style、host-sec-check 这类无仓库信号的 skill。
用户点名的除外。
## 2. 安装
把 `suggested` 和 `already` 都列为应安装的 skill(`already` 表示项目里已有状态,
软链仍要 `pouch add`,除非已经装上)。用户说「接上该用的」时只装这两类,不要全装 builtin。
只对 `init` 列问要不要初始化。
默认当前项目:
```bash
pouch add <name> -a cursor -a claude -a codex -a agents -y
```
只有用户明确要所有项目都能用时才加 `-g`。cwd 是 pouch 仓库时不要走到这一步。
## 3. 问一句要不要初始化
对已经装上、或本来就在的 ack / builder / deployer,看脚本的 `init` 列:
| Skill | 尚未初始化时对用户说 | 不要 |
| --- | --- | --- |
| ack | `/ack 初始化` 或 `pouch init ack` | 静默 `pouch init` |
| builder | 「用 builder 初始化」 | `pouch init builder` |
| deployer | 「用 deployer 初始化」 | `pouch init deployer` |
一次问清要初始化哪些。用户没点名不要自己跑初始化。ACK 初始化**不会**自动初始化
deployer / builder,需要的话要另说。
orc、manage-release 和其余 builtin 装上就能用,不必项目初始化。
## 4. 介绍怎么喊
装完后跑 `catalog.py`,只念本次装上的那几行「可以这么说」。