arc-skill-gitops

TotalClaw 作者 totalclaw

针对代理工作流程和技能的自动化部署、回滚和版本管理。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~trypto1019-arc-skill-gitops
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~trypto1019-arc-skill-gitops/file -o trypto1019-arc-skill-gitops.md
# Agent GitOps

Automated deployment and rollback for agent workflows. Track skill versions, deploy with confidence, roll back when things break.

## Why This Exists

Agents install and update skills constantly. When an update breaks something, you need to:
1. Know what changed
2. Roll back fast
3. Track which version was stable

This skill manages that lifecycle.

## Commands

### Initialize tracking for a skill
```bash
python3 {baseDir}/scripts/gitops.py init --skill ~/.openclaw/skills/my-skill/
```

### Snapshot the current state (before updating)
```bash
python3 {baseDir}/scripts/gitops.py snapshot --skill ~/.openclaw/skills/my-skill/ --tag "pre-update"
```

### Deploy a skill update (snapshots current state first)
```bash
python3 {baseDir}/scripts/gitops.py deploy --skill ~/.openclaw/skills/my-skill/ --tag "v1.1"
```

### List all snapshots for a skill
```bash
python3 {baseDir}/scripts/gitops.py history --skill ~/.openclaw/skills/my-skill/
```

### Roll back to a previous snapshot
```bash
python3 {baseDir}/scripts/gitops.py rollback --skill ~/.openclaw/skills/my-skill/ --tag "pre-update"
```

### Check status of all tracked skills
```bash
python3 {baseDir}/scripts/gitops.py status
```

### Run pre-deploy checks (integrates with arc-skill-scanner if available)
```bash
python3 {baseDir}/scripts/gitops.py check --skill ~/.openclaw/skills/my-skill/
```

## Data Storage

Snapshots and metadata are stored in `~/.openclaw/gitops/`.

## How It Works

1. **init** creates a git repo in the skill directory (if not already one) and records it in the tracking manifest
2. **snapshot** commits the current state with a tag
3. **deploy** takes a pre-deploy snapshot, then commits the new state
4. **rollback** restores a tagged snapshot using git checkout
5. **check** runs arc-skill-scanner (if installed) as a pre-deploy gate
6. **history** shows all tagged snapshots with timestamps
7. **status** shows all tracked skills and their current/latest versions

## Tips

- Always snapshot before updating a skill manually
- Use `deploy` instead of manual updates — it snapshots automatically
- Combine with `arc-skill-scanner` for security-gated deployments
- Tags should be descriptive: "v1.2", "pre-security-patch", "stable-2026-02-15"

---

## 中文说明

# Agent GitOps

针对代理工作流的自动化部署与回滚。跟踪技能版本,放心部署,出问题时回滚。

## 为什么需要它

代理会不断安装和更新技能。当某次更新破坏了某些功能时,你需要:
1. 知道发生了什么变更
2. 快速回滚
3. 跟踪哪个版本是稳定的

此技能管理这一生命周期。

## 命令

### 为技能初始化跟踪
```bash
python3 {baseDir}/scripts/gitops.py init --skill ~/.openclaw/skills/my-skill/
```

### 快照当前状态(更新前)
```bash
python3 {baseDir}/scripts/gitops.py snapshot --skill ~/.openclaw/skills/my-skill/ --tag "pre-update"
```

### 部署技能更新(先快照当前状态)
```bash
python3 {baseDir}/scripts/gitops.py deploy --skill ~/.openclaw/skills/my-skill/ --tag "v1.1"
```

### 列出某技能的所有快照
```bash
python3 {baseDir}/scripts/gitops.py history --skill ~/.openclaw/skills/my-skill/
```

### 回滚到此前的快照
```bash
python3 {baseDir}/scripts/gitops.py rollback --skill ~/.openclaw/skills/my-skill/ --tag "pre-update"
```

### 检查所有被跟踪技能的状态
```bash
python3 {baseDir}/scripts/gitops.py status
```

### 运行部署前检查(如果可用,集成 arc-skill-scanner)
```bash
python3 {baseDir}/scripts/gitops.py check --skill ~/.openclaw/skills/my-skill/
```

## 数据存储

快照和元数据存储在 `~/.openclaw/gitops/`。

## 工作原理

1. **init** 在技能目录中创建一个 git 仓库(如果尚未存在),并将其记录到跟踪清单中
2. **snapshot** 以一个标签提交当前状态
3. **deploy** 先做一个部署前快照,然后提交新状态
4. **rollback** 使用 git checkout 还原一个带标签的快照
5. **check** 运行 arc-skill-scanner(如果已安装)作为部署前关卡
6. **history** 显示所有带时间戳的标签快照
7. **status** 显示所有被跟踪的技能及其当前/最新版本

## 提示

- 手动更新技能前务必先快照
- 使用 `deploy` 而非手动更新 —— 它会自动快照
- 与 `arc-skill-scanner` 结合,实现带安全关卡的部署
- 标签应具有描述性:"v1.2"、"pre-security-patch"、"stable-2026-02-15"