# Siyu Save

> |

- **Type:** Skill
- **Install:** `agentstack add skill-maojiebc-majia-siyu-team-siyu-save`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [maojiebc](https://agentstack.voostack.com/s/maojiebc)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [maojiebc](https://github.com/maojiebc)
- **Source:** https://github.com/maojiebc/majia-siyu-team/tree/main/plugins/siyu-core/skills/siyu-save

## Install

```sh
agentstack add skill-maojiebc-majia-siyu-team-siyu-save
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# siyu-save：客户档案存档

把当前对话里已经形成的客户主诉、结论、否决方向、待验证假设和下一步，写成结构化 markdown 文件。只记录，不重新诊断。

## 两种状态不要混用

- `.siyu-team/`：一次团长编排的运行时状态，用于断点续跑，完成后归档。
- `~/.siyu/clients/`：跨对话长期累积的客户档案。

编排完成后可把结论沉到客户档案；两者不互相替代，也不要把客户档案写进仓库。

## 用户措辞

对用户只说「客户档案」「存档」「对话」，不说 slug、snapshot、session。路径和 frontmatter 字段仅作技术标识。

## 触发方式

| 命令 | 行为 |
|---|---|
| `/siyu-save` | 保存当前对话，自动提取标题 |
| `/siyu-save ` | 使用指定标题 |
| `/siyu-save --client  [标题]` | 保存到指定客户档案 |
| `/siyu-save list [客户]` | 只列档，不写文件 |

## 工作流程

### 1. 判断是否值得存

先检查对话里是否已有诊断结论、执行产物、否决方向或待验证假设。只有一句「保存」且前面没有有效内容时，拒绝写空文件：

> 现在没有可存的结论。先完成一次具体任务或诊断，再来存档。

### 2. 确定客户和标题

- 客户目录默认取当前目录名，归一化为小写字母、数字和连字符；没有明确客户或位于家目录时用 `default`。
- 用户传了 `--client` 时优先使用，并把不安全字符替换为 `-`，禁止 `..`、路径分隔符和越出 `~/.siyu/clients/`。
- 标题优先用用户指定值，否则从对话提取不超过 20 字的名词短语。

跟用户说「客户」，不要说内部目录标识。

### 3. 生成路径

```text
~/.siyu/clients/{客户目录}/{YYYYMMDD-HHMMSS}-{标题目录}.md
```

时间戳使用本地时间；ISO 时间用：

```bash
python3 -c "from datetime import datetime; print(datetime.now().astimezone().isoformat(timespec='seconds'))"
```

同一秒同名时追加 4 位随机后缀，永不覆盖已有文件。目录不存在时创建。

### 4. 写入固定格式

```markdown
---
client: {客户目录}
timestamp: {ISO 8601 带时区}
title: {标题原文}
source_skill: {本次主要走过的 skill，多个用逗号分隔}
status: {in-progress | resolved | abandoned}
next_skill: {推荐下一步，不确定就留空}
industry: {catering | retail | edu | ...，可为空}
stage: {cold | growth | mature，可为空}
compliance_flags: []
---

## 客户主诉
{保留原话语气的 1—2 句摘要}

## 已得出的结论
- {一句话一个结论}

## 已否决的方向
- {方向} —— {否决理由}

## 待验证假设
- {假设}

## 推荐下一步
{做什么、为什么、对应哪个 skill，一段话}

## 备注
{客户原话、关键转折、当时的怀疑}
```

没有否决方向或假设时写「（暂无）」。`status` 不确定时用 `in-progress`；`next_skill` 不确定时留空，不能猜。

### 5. 一行回执

> 已存档：{路径}。当前客户下共 {N} 份；下次输入 `/siyu-restore` 接着上次。

不复述内容，不说「保存成功」，不加感叹号。档案含敏感信息时补一句：`~/.siyu/` 是本地纯文本且未加密，可先删改敏感细节再保存。

## list 模式

按文件名前缀排序，输出日期、标题、中文状态和来源：`in-progress → 进行中`、`resolved → 已结论`、`abandoned → 已放弃`。没有档案时说明先完成一次任务再存档。

## 边界

- 连续保存允许生成新文件，不能覆盖。
- 写入前解析并确认最终路径仍在 `~/.siyu/clients/` 下。
- 面向用户一律中文，遵循《中文文案排版指北》。

---

## 不知道下一步用哪个 skill？

输入 `/siyu`。

这是私域工具箱的导航入口。它会读取刚才的具体结论，选择当前最值得处理的一个方向，
并直接路由到对应 skill。迷路了就回 `/siyu`。

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [maojiebc](https://github.com/maojiebc)
- **Source:** [maojiebc/majia-siyu-team](https://github.com/maojiebc/majia-siyu-team)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-maojiebc-majia-siyu-team-siyu-save
- Seller: https://agentstack.voostack.com/s/maojiebc
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
