agent-skills/README.md
2026-04-02 14:44:53 +08:00

69 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Agent Skills
这个仓库用于公开分发可安装的 agent skills。
## 技能列表
### `gitops-app-onboarding`
用于 Baizhi GitOps 平台的项目接入工作流,适用于:
- `deploy.baizhi.cloud`
- `registry.baizhi.cloud`
- GitLab + Argo CD 的固定交付模型
适合处理:
- 给当前平台接入新项目
- 恢复 `.gitlab-ci.yml`、`deploy/`、Helm Chart、release bundle
- 修当前平台的发版链路
- 让应用仓库在发版时推送自己的 release 结果
执行时会遵守这些平台规则:
- 明确列出应用仓库必须产出的文件、GitOps 导出结果和 CI 处理顺序
- 只允许应用仓库 CI 同步当前应用自己的 release 结果与 `Application.targetRevision`
- `deploy/release/secret.yaml` 是应用私有 Secret 作者源
- 应用仓库 CI 保留 GitOps 仓库中已有的 `manifests/kustomization.yaml``manifests/db-secret.yaml`
- 如果 Go 构建发生在 Dockerfile 内,`build-images` 必须用 `--build-arg` 透传 `GOPROXY` 等构建变量
- 需要公网 HTTP 入口时固定使用 nginx + 单一 `NodePort`,不改成 Ingress
- 百智云用户鉴权是必填项,按固定顺序逐项补齐 `app_id` 与证书材料
- 平台 shared 之外的私有依赖必须明确来源;第三方镜像保持真实来源
不适合处理:
- 通用 GitLab CI 改造
- 通用 Helm Chart 编写
- 未指向当前平台常量的通用 GitOps / Argo CD 任务
- 修改其他应用的 `Application`、任意 `AppProject` 或其他与当前应用版本引用无关的发布侧清单
- 改成 Ingress 驱动的对外暴露方式
## 安装
安装 `gitops-app-onboarding`
```bash
npx skills add "https://deploy.baizhi.cloud/gitops-admin/agent-skills.git" --full-depth --skill gitops-app-onboarding -g -y
```
如果已经拿到本地副本,也可以直接从本地目录安装:
```bash
npx skills add "/path/to/agent-skills" --full-depth --skill gitops-app-onboarding -g -y
```
安装后可先确认是否已被识别:
```bash
npx skills add "https://deploy.baizhi.cloud/gitops-admin/agent-skills.git" --full-depth --skill gitops-app-onboarding --list
```
## 仓库结构
```text
agent-skills/
├── README.md
└── gitops-app-onboarding/
└── SKILL.md
```