org-init-workflow
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "org-init-workflow" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-4858c2e33c90e485479822d2b89d05a9674da01df022a07909f4feed93858eb5. Verify the upstream source and version against https://skillhub.cn/skills/user_f12a44b7/org-init-workflow before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
One-stop workflow for initializing and governing CNB/Gitee organization structure. Provides organization repository initialization, organization profile updates, member permission management, responsibility division planning, batch creation of scaffold template repositories, and includes a seven-position architecture template. Triggered by phrases like “initialize organization,” “govern organization,” “organization structure planning,” “create repos for organization,” “update organization profile,” or “build team code architecture.” Not applicable to single-repo routine management, organizations on non-CNB/Gitee platforms, or everyday team collaboration.
Introduction source: third_party · user_f12a44b7 · 1.0.1 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: org-init-workflow
version: 1.0.1
description: CNB/Gitee组织架构初始化与治理一站式工作流。提供组织仓库初始化、组织简介更新、成员权限管理、职责分工规划、scaffold模板仓库批量创建等全套操作,内置七工位架构模板。当用户说"初始化组织""治理组织""组织架构规划""给组织建仓库""更新组织简介""搭建团队代码架构"时触发。不适用于:单个仓库的日常管理(用git原生操作)、非CNB/Gitee平台的组织管理、团队日常协作。
displayName: 组织架构初始化工作流
summary: CNB/Gitee组织架构一站式初始化:仓库规划、成员管理、权限配置、scaffold模板批量创建。
requires:
bins:
- curl
- git
- jq
env:
- CNB_TOKEN
tags:
- 组织管理
- CNB
- Gitee
- 仓库管理
- 团队建设
- 权限
- Org Mgmt
- Repo Mgmt
- Team Building
- Permission组织架构初始化与治理工作流
v1.0 · 2026-04-19 · 沉淀自实际执行复盘
触发条件
用户说"初始化组织"、"治理组织"、"组织架构规划"、"给组织建仓库"、"更新组织简介"等。
架构定义
七工位(CNB)
| 组织 | 标签 | 定位 | 简介关键词 |
|---|---|---|---|
| yunjinhong | 前台 | 正式产品发布 | 领航项目、产品迭代、生产运维 |
| cnbmm | 客户部 | 客户项目交付 | 定制开发、按客户名建仓库 |
| cnbnn | 工具箱 | NPC协同与工具 | NPC派单、代码审查、工作流 |
| cnbvv | 实验室 | 技术预研 | MVP验证、方案选型、跑通再搬 |
| cnbyy | 采购部 | 第三方集成 | API/SDK对接、外部依赖管理 |
| cnbll | 机房 | 基础设施 | OpenClaw、Skill开发、运维 |
| W3C | 展厅 | 开源社区 | 技术联盟(通常无管理权限) |
决策链
老板指令 → cnbvv(实验) → cnbll(Skill沉淀) / cnbmm(客户交付) / yunjinhong(正式上线)
仓库归属规则
- Skill 一律放 cnbll
- 工作流模板放 cnbnn
- 客户项目放 cnbmm
- 正式产品放 yunjinhong
- 实验/MVP 放 cnbvv
- 第三方集成放 cnbyy
- 基础设施放 cnbll
- 开源贡献放 W3C
Gitee 定位
分发与展示,不做开发。
| 仓库 | 用途 |
|---|---|
| openclaw-workspace | 记忆备份 |
| docs-site | 组织文档站(Gitee Pages) |
| releases | Release 国内下载源 |
工作流步骤
Step 1: 记忆检索
目的:查历史组织架构、积分状态、已有仓库,避免重复劳动。
# 在 agent 中执行
memory_search("组织架构 cnbmm cnbll 积分 职责")
memory_get("memory/cnb-core/MEMORY.md")
输出:组织架构全景表 + 积分现状 + 待办。
Step 2: CNB 组织简介更新
API:PUT /{group}(UpdateOrganization)
权限:group-manage:rw
提示词模板:
把每个组织的简介更新一下,写清楚各自负责什么
curl 示例:
curl -s -X PUT "https://api.cnb.cool/yunjinhong" \
-H "Accept: application/vnd.cnb.api+json" \
-H "Authorization: Bearer ${CNB_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"description": "正式产品发布 · 面向客户的上线项目\n\n核心产品:领航项目(微信小程序+云开发)\n\n职责:产品迭代、版本发布、生产运维、客户交付",
"remark": "前台"
}'
参数说明:
description:组织描述(支持换行)remark:短标签(前台/客户部/工具箱/实验室/采购部/机房)site:网站链接wechat_mp:微信公众号
批量更新脚本:见 references/batch-update-orgs.sh
踩坑:
- W3C 是技术联盟组织,普通 Token 无 group-manage:rw 权限,会返回空响应
- description 换行用
\n转义
Step 3: CNB 仓库批量创建
API:POST /{slug}/-/repos(CreateRepo)
权限:group-resource:rw
提示词模板:
给每个组织初始化一个 scaffold 仓库
curl 示例:
curl -s -X POST "https://api.cnb.cool/yunjinhong/-/repos" \
-H "Accept: application/vnd.cnb.api+json" \
-H "Authorization: Bearer ${CNB_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "scaffold",
"description": "初始化模板",
"visibility": "public"
}'
参数:
name:仓库名description:仓库描述visibility:public / privatelicense:开源协议(可选)
成功:HTTP 201 失败:HTTP 403(无权限)、HTTP 409(仓库已存在)
Step 4: 仓库标准内容推送
踩坑记录:
CreateBlob + CreateCommit API— CreateCommit 需要预先构建 tree 对象,API 不支持从 blob 直接创建 commit,此路不通- ✅ 用 git clone + 本地 commit + push — 最可靠
提示词模板:
给 scaffold 仓库推送标准结构
推送脚本:
TMPDIR=$(mktemp -d)
cd "$TMPDIR"
ORG="yunjinhong"
DESC="前台 · 正式产品上线运营"
mkdir -p "${ORG}-scaffold/docs" "${ORG}-scaffold/src" "${ORG}-scaffold/tests"
cat > "${ORG}-scaffold/README.md" <<EOF
# ${ORG}/scaffold
> ${DESC}
## 标准结构
\`\`\`
${ORG}/scaffold/
├── README.md
├── docs/
├── src/
└── tests/
\`\`\`
EOF
touch "${ORG}-scaffold/docs/.gitkeep" \
"${ORG}-scaffold/src/.gitkeep" \
"${ORG}-scaffold/tests/.gitkeep"
cd "${ORG}-scaffold"
git init
git add -A
git -c user.name="cnb" -c user.email="cnb@cnb.cool" commit -m "init: scaffold 初始化"
git remote add origin "https://cnb:${CNB_TOKEN}@cnb.cool/${ORG}/scaffold.git"
git push -u origin master # CNB 默认 master,不是 main
批量推送:见 references/batch-push-scaffold.sh
踩坑:
- CNB 默认分支是
master,不是main。git push -u origin main会报错,用master - 删临时目录用
rm -rf "$TMPDIR"
Step 5: Gitee 接入
5.1 验证 Token
curl -s "https://gitee.com/api/v5/user?access_token=${GITEE_TOKEN}" | jq '{login,name,public_repos}'
5.2 列出所有仓库(含私有)
curl -s "https://gitee.com/api/v5/user/repos?access_token=${GITEE_TOKEN}&type=all&per_page=100" \
| jq '.[] | {name,private,updated_at}'
5.3 删除仓库
curl -s -X DELETE "https://gitee.com/api/v5/repos/hjhcoo/{repo}?access_token=${GITEE_TOKEN}"
5.4 创建仓库
curl -s "https://gitee.com/api/v5/user/repos" \
-d "access_token=${GITEE_TOKEN}" \
-d "name={repo_name}" \
-d "description={desc}" \
-d "private=true" \
-d "auto_init=true"
5.5 Gitee 初始化推送
git clone "https://hjhcoo:${GITEE_TOKEN}@gitee.com/hjhcoo/{repo}.git"
# ... 添加文件 ...
git -c user.name="hjhcoo" -c user.email="hjhcoo@cnb.cool" commit -m "init: ..."
git push
踩坑:
- Gitee API 返回空 body 表示成功(DELETE 操作)
- Gitee 私有仓库不出现在公开 profile,必须用
type=all查询 - 不要建 CNB 镜像仓库——空壳无价值,需要时再建
Step 6: 记忆同步
提示词模板:
更新记忆文件
更新清单:
TOOLS.md— 添加/更新 Gitee 配置memory/cnb-core/MEMORY.md— 更新组织表格、积分状态USER.md— 组织架构(已有则跳过)memory/YYYY-MM-DD.md— 当日工作日志
完整提示词链(一步到位版)
老板只需说:
初始化所有组织的仓库和简介
Agent 自动执行 Step 1-6 全流程,无需逐步确认。
质量自评
- ✅ 触发精准:组织初始化/治理/规划相关指令
- ✅ 边界清晰:只管 CNB + Gitee 组织层面,不管具体项目开发
- ✅ 踩坑完整:API 限制、分支名、权限问题都有记录
- ✅ 可复用:curl 命令可直接复制执行
- ⚠️ 积分管理未纳入:NPC 积分消耗是另一个工作流
Current listing version
1.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 CNB/Gitee 组织架构一站式初始化解决方案,覆盖仓库规划、成员管理、权限配置、scaffold 模板批量创建等核心需求
- 内置七工位架构模板与决策链,显著提升团队组织治理效率
- 明确边界,聚焦组织层面而非单个项目开发,避免功能泛化
Highlights
- 触发词精准覆盖组织初始化、治理、规划等核心场景
- 边界清晰,明确排除单个仓库管理与非 CNB/Gitee 平台
Highlights
- 六步工作流结构清晰,每步有明确目的与输出
- 提供完整端到端示例与可复制执行的 curl 命令
- frontmatter 完整,版本与依赖明确
Areas to improve
-
不可逆操作缺乏显式确认机制 Reported severity: Minor
Gitee 仓库删除等不可逆操作未要求用户二次确认
Recommendation: 在执行删除等高风险操作前增加确认提示
Highlights
- 工具来源明确,参数正确,覆盖主要异常场景
- 详细记录踩坑经验(如 CNB 默认分支为 master、Gitee API 返回空 body 表示成功)
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Delete files
Confirm the absolute path and scope and keep a recoverable backup. Do not run example commands against important directories.
Mentioned in main document · lines 210 -
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 218, 223, 229, 235
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- api.cnb.cool
- gitee.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.