Install
openclaw skills install catl-harness-prClawHub Security found sensitive or high-impact capabilities. Review the scan results before using.
Submit structured knowledge-engineering pull requests to the CATL Harness GitHub repo following branch, commit, PR, and sensitive content rules.
openclaw skills install catl-harness-prThis skill teaches OpenClaw agents (龙虾) how to submit pull requests to BlueFocusContentUniverse/catl_harness_repo — the CATL knowledge-engineering harness repo (蓝标内容宇宙组织下,2026-05-08 起取代旧的 Dr-xiaoming/catl_harness_repo 个人仓)。 Treat it as a versioned knowledge base, not a code base: every PR is a deliberate, sourceable knowledge increment.
This skill supports two PR submission modes, auto-detected by preflight.sh:
| Mode | Used when | How |
|---|---|---|
fork (default) | 你的 GitHub 账号对原仓库没有 write 权限 | Fork → push to fork → cross-repo PR |
legacy | 你的 GitHub 账号对原仓库有 write 权限(金明本人 / 组织 maintainer) | 直接在原仓库切分支 push → 同仓库 PR |
探测命令:gh api repos/BlueFocusContentUniverse/catl_harness_repo --jq .permissions.push
true → legacy 模式false 或调用失败 / 没 gh → fork 模式强制覆盖:设 CATL_HARNESS_PR_MODE=fork 或 CATL_HARNESS_PR_MODE=legacy 环境变量。
Fork 模式是默认且未来主流。绝大多数龙虾对组织里的 private repo 只有 read 权限,fork + PR 是唯一可行路径。
https://github.com/BlueFocusContentUniverse/catl_harness_repoBlueFocusContentUniverse (蓝标内容宇宙)Dr-xiaoming,GitHub 个人账号) — BlueFocus 宁德时代项目组 产研组 FDE~/.openclaw/workspace/repos/catl_harness_repoorigin → https://github.com/<your-gh-user>/catl_harness_repo.git (your fork, push 用)upstream → https://github.com/BlueFocusContentUniverse/catl_harness_repo.git (read-only sync)origin → https://github.com/BlueFocusContentUniverse/catl_harness_repo.git (单 remote)catl-wiki skill). Feishu 是协作权威副本,GitHub 是版本/diff/审阅可追溯副本。两边都要同步时:先 Feishu 定稿,再 PR 到 GitHub。main。所有改动走 feature branch + PR,即使是 typo。internal-analysis/ 或 frontmatter tags: [bluefocus-pov],不要混入 layer1-client-cognition/。@Dr-xiaoming 确认方向。龙虾接到"向 harness 仓库提 PR"任务时,第一个动作是跑这个门禁。任一项失败,停下来向用户报告缺什么,不要硬往下走。
bash ~/.openclaw/workspace/skills/public/catl-harness-pr/scripts/preflight.sh
# 干跑(不真改 remote、不真创建 fork、只打印命令):
bash ~/.openclaw/workspace/skills/public/catl-harness-pr/scripts/preflight.sh --dry-run
preflight.sh 自动完成:
CATL_HARNESS_PR_MODE 覆盖)凭证模型(重要):
凭证缺失时的硬规则:
~/.netrc 或用 gh auth login。~/.openclaw/.env 体系,先查是否已存了 GitHub 凭证(grep GITHUB_ ~/.openclaw/.env);但不要自己往 .env 里写新 token,让人类用户自己写。这一步就是"每次修改前同步远程"的硬性要求。preflight.sh 已经把 fork/legacy 两种路径都内置了。
手动版(fork 模式):
REPO=~/.openclaw/workspace/repos/catl_harness_repo
GH_USER="<your-github-username>"
UPSTREAM_URL="https://github.com/BlueFocusContentUniverse/catl_harness_repo.git"
FORK_URL="https://github.com/${GH_USER}/catl_harness_repo.git"
# B1. 确保 fork 存在(用 gh 时幂等)
if command -v gh >/dev/null; then
gh repo view "${GH_USER}/catl_harness_repo" >/dev/null 2>&1 \
|| gh repo fork BlueFocusContentUniverse/catl_harness_repo --clone=false --remote=false
else
# 没 gh:让用户在浏览器开 fork
echo "Open: https://github.com/BlueFocusContentUniverse/catl_harness_repo/fork"
echo "Fork 完成后回来继续。"
fi
# B2. Clone or migrate local
if [ ! -d "$REPO/.git" ]; then
git clone "$FORK_URL" "$REPO"
cd "$REPO"
git remote add upstream "$UPSTREAM_URL"
else
cd "$REPO"
# 兼容存量:如果 origin 还指向 upstream,迁移
current_origin=$(git remote get-url origin)
if [ "$current_origin" = "$UPSTREAM_URL" ] || [ "$current_origin" = "https://github.com/BlueFocusContentUniverse/catl_harness_repo" ]; then
git remote rename origin upstream
git remote add origin "$FORK_URL"
fi
# 确保 upstream 存在
git remote get-url upstream >/dev/null 2>&1 || git remote add upstream "$UPSTREAM_URL"
fi
# B3. 同步 main: upstream → local → fork
git fetch upstream --prune
git fetch origin --prune
git checkout main
git pull --ff-only upstream main
git push origin main # 让 fork 的 main 跟上 upstream
手动版(legacy 模式,仅限对原仓库有 write 的账号):
REPO=~/.openclaw/workspace/repos/catl_harness_repo
cd "$REPO"
git fetch origin --prune
git checkout main
git pull --ff-only origin main
关键理解:Phase B 不是 Phase A 的延续,而是每次开工前都跑一遍的独立门禁。即使 10 分钟前刚跑过,也要重跑——别的协作者可能刚刚合了 PR。
# C1. 从最新的 main 切新分支(分支名见 references/branch-naming.md)
git checkout -b layer1/client-cognition-update-20260508
# C2. 进行实际修改 —— 只改 markdown,除非明确要求
# (edit files here)
# C3. 本地 review
git status
git diff --stat
git diff | head -200 # 眼过一遍实际内容
# C4. 如果看到 .DS_Store / IDE 文件 / 个人笔记 / 原始 chat 记录 — 立刻清
# git restore --staged <file> 或 把它加进 .gitignore
git add <specific-files> # 不要 git add .,容易带脏文件
git commit -m "layer1(client-cognition): 补充 Q2 神行品牌叙事差异化要点
- 来源: 2026-05-06 虞旸定稿 draft-v2 + 5/3 客户访谈
- 影响范围: layer1/客户认知底座.md 第 3 节
- 审阅人: @Dr-xiaoming"
Commit message 规则完整版见 references/commit-style.md。必须带「来源 / 影响范围 / 审阅人」三段。
# E1. 推送前再 fetch upstream 一次,确认 main 没变化(很快)
git fetch upstream main
behind=$(git rev-list --count HEAD..upstream/main)
if [ "$behind" -gt 0 ]; then
echo "⚠️ upstream/main 在我干活期间前进了 $behind 个 commit,考虑 rebase:"
echo " git rebase upstream/main"
fi
# E2. Push feature branch 到自己的 fork(origin)
git push -u origin "$(git branch --show-current)"
# E3. 写 PR body 到 /tmp/pr-body.md(模板见下节)
# E4. 开跨仓库 PR(关键参数:--head <user>:<branch>)
GH_USER="<your-github-username>"
BRANCH=$(git branch --show-current)
if command -v gh >/dev/null; then
gh pr create \
--repo BlueFocusContentUniverse/catl_harness_repo \
--base main \
--head "${GH_USER}:${BRANCH}" \
--title "layer1(client-cognition): 补充 Q2 神行品牌叙事差异化" \
--body-file /tmp/pr-body.md \
--reviewer Dr-xiaoming
else
# 没 gh → 浏览器开跨仓库 compare
echo "请在浏览器打开:"
echo "https://github.com/BlueFocusContentUniverse/catl_harness_repo/compare/main...${GH_USER}:catl_harness_repo:${BRANCH}?expand=1"
echo "把 /tmp/pr-body.md 的内容粘进 description。"
fi
# E1. 推送前再 fetch
git fetch origin main
behind=$(git rev-list --count HEAD..origin/main)
if [ "$behind" -gt 0 ]; then
echo "⚠️ main 在我干活期间前进了 $behind 个 commit,考虑 rebase:"
echo " git rebase origin/main"
fi
# E2. Push 新分支到原仓库
git push -u origin "$(git branch --show-current)"
# E3. 开同仓库 PR
if command -v gh >/dev/null; then
gh pr create \
--title "layer1(client-cognition): 补充 Q2 神行品牌叙事差异化" \
--body-file /tmp/pr-body.md \
--base main \
--reviewer Dr-xiaoming
else
branch=$(git branch --show-current)
echo "请在浏览器打开:"
echo "https://github.com/BlueFocusContentUniverse/catl_harness_repo/compare/main...${branch}?expand=1"
fi
写到 /tmp/pr-body.md,是每个 harness PR 的合同:
## What
<!-- 一句话说明这次 PR 改了什么。不要写「更新文档」这种废话。 -->
## Why / Source
<!-- 必填。这次知识增量从哪里来? -->
- 来源类型: [ ] 会议纪要 / [ ] 客户访谈 / [ ] 外部资料 / [ ] 内部讨论 / [ ] 二次提炼 / [ ] 我的判断
- 时间: 2026-XX-XX
- 关联资料: (Feishu 链接 / 文件路径 / 会议名)
## Scope of impact
- 影响 Layer: [ ] L1 客户认知 / [ ] L2 行业认知 / [ ] L3 项目方法论 / [ ] SOP / [ ] 其他
- 下游引用: (列出会用到这份知识的 agent / skill / 任务)
## Sensitive content check
- [ ] 没有甲方原话 / 内部敏感措辞
- [ ] 没有把蓝标主观判断写成「客户立场」
- [ ] 客户/竞品名字处理符合 Layer 1 红线
## Reviewers
- [ ] @Dr-xiaoming (默认必审)
- [ ] (可选) 业务侧第二审阅人
Default reviewer 永远是 @Dr-xiaoming。第二审阅人仅在跨业务域时加。
git checkout main && git pull --ff-only upstream main && git push origin main 把 fork 的 main 同步上来。catl-wiki 或 feishu-doc skill。obsidian-openclaw-sync skill。scripts/preflight.sh — 一键跑 Phase A + Phase B 门禁(双模式自动探测,支持 --dry-run)scripts/setup-fork.sh — 独立的 fork 创建/远程配置脚本(preflight 会调用,也能单跑)references/branch-naming.md — 分支命名规则表references/commit-style.md — commit message 风格与反模式references/auth-setup.md — gh / HTTPS+PAT / SSH 三种认证路径详解(fork & legacy 模式 PAT scope 区别)references/repo-layout.md — 仓库目录结构与知识归类速查