# Siyu Restore

> |

- **Type:** Skill
- **Install:** `agentstack add skill-maojiebc-majia-siyu-team-siyu-restore`
- **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-restore

## Install

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

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

## About

# siyu-restore：接续客户档案

从 `~/.siyu/clients/` 读取存档，恢复跨对话状态。不要把它与单次编排使用的 `.siyu-team/` 混用。

## 用户措辞

对用户只说「客户档案」「存档」「对话」，不说 slug、snapshot、session。读取为主，不改写原档案。

## 触发方式

| 命令 | 行为 |
|---|---|
| `/siyu-restore` | 拉当前客户最近一份进行中档案；没有时再取最近一份 |
| `/siyu-restore ` | 拉列表中的指定档案 |
| `/siyu-restore list` | 复用 `/siyu-save list` 的格式 |
| `/siyu-restore --client ` | 拉指定客户的档案 |

## 工作流程

### 1. 定位档案

1. 解析 `--client`；没有时按 `siyu-save` 的规则取当前目录名，没有明确客户则用 `default`。
2. 用户给序号时按文件名排序后取对应项。
3. 默认优先取时间最新的 `status: in-progress`；没有进行中档案再取最新一份。
4. 「最新」只按文件名中的 `YYYYMMDD-HHMMSS` 判断，不依赖 mtime。
5. 解析后的路径必须仍位于 `~/.siyu/clients/`，拒绝路径穿越。

### 2. 处理多客户和空档案

默认客户没有档案时，检查其他客户目录：

- 有多个客户：按各自最近档案时间列出最近 3 个，先问用户要接哪个客户，不擅自混档。
- 完全没有档案：说明先完成一次任务，再用 `/siyu-save` 留下结论。
- 序号越界：说明当前只有几份，请用户重新选择。

### 3. 容错读取

读取完整 markdown 与 frontmatter。字段被手动改坏时尽量呈现可用内容，并标明缺失字段；不要因为一个字段缺失就拒绝恢复，也不要猜造缺失结论。

### 4. 用三句话恢复上下文

紧凑呈现：

> 上次到这里：{客户主诉与已得出的核心结论}  
> 已经否决：{方向与理由；没有则写暂无}  
> 推荐下一步：{推荐动作与 next_skill；为空则说明尚未确定}

随后补充时间、来源和中文状态。不要全文复述，不寒暄。

### 5. 接续

- `next_skill` 有值且用户说「按上次走」：直接调用该 skill，把档案核心内容作为上下文，不让用户重讲。
- 用户提出新情况：把新情况与旧档案并列，交 `/siyu` 重新判断当前一步。
- 用户提出具体新任务：按 `/siyu` 路由表处理。
- `next_skill` 为空：只问一个能决定下一步的关键问题。

不要替用户继承已经标为 `abandoned` 的方向。

## 边界与风格

- 同一对话连续恢复同一份：提示状态已展示；要换档请给序号或客户。
- 文件被删：说明该档已不存在，建议查看列表。
- 一律中文，遵循《中文文案排版指北》；状态展示为进行中、已结论、已放弃。

---

## 不知道下一步用哪个 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-restore
- 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%.
