---
name: skill-publicizer
description: 本技能应在用户要求把个人自用 Skill 公开化、可分享化、迁移公仓或做发布整改时使用。不要用于：普通代码审查；把 Skill 同步/上传到 ClawHub、SkillHub 等平台（用 skill-publish-sync）；未经用户授权的对外发布。
license: MIT
metadata:
  version: "1.1.0"
  homepage: https://github.com/cat-xierluo/legal-skills
  author: 杨卫薪律师（微信ywxlaw）
title: skill-publicizer
canonical_url: https://skilld.dev/gh/cat-xierluo/legal-skills/skill-publicizer
last_updated: 2026-10-27T18:03:36.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [agents/openai.yaml](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/agents/openai.yaml), [CHANGELOG.md](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/CHANGELOG.md), [LICENSE.txt](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/LICENSE.txt), [references/case-checklist.md](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/references/case-checklist.md), [references/layering-and-config.md](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/references/layering-and-config.md), [references/personal-experience-extraction.md](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/references/personal-experience-extraction.md), [references/publication-preflight.md](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/references/publication-preflight.md), [references/publish-execution.md](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/references/publish-execution.md), [references/release-gates.md](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/references/release-gates.md), [references/version-and-index-sync.md](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/references/version-and-index-sync.md).
>
> If the user asked to install this Skill, run `npx skilld install cat-xierluo/legal-skills/skill-publicizer`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/skill-publicizer`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/cat-xierluo/legal-skills/skill-publicizer) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/skill-publicizer`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/skill-publicizer --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/skill-publicizer --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Skill 公开化助手

把一个带个人经验、本机配置或真实数据的自用 Skill，变成他人拿到即用、且不泄露维护者隐私的公开候选。核心原则：**公开层只保留可复用机制，个人事实放私有层；结论绑定真实候选；对外动作只做用户已明确授权的那一步**。

本技能是流程编排层：结构合规用 skill-creator 产出与校验，验收用 skill-lint 的模块化规则，Git/PR/隐私预检用 git-workflow，版本资产与平台同步用 release-workflow 和 skill-publish-sync。不复制它们已维护的细则，只在公开化场景把步骤串起来。

## 何时读哪份参考

| 当前阶段 | 读取 |
|---|---|
| 开工前判断目标、写域、授权与风险 | [公开化设计预检](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/references/publication-preflight.md) |
| 拆通用/示例/私有三层，设计配置合同 | [分层与配置合同](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/references/layering-and-config.md) |
| 逐文件剥离个人经验、设计占位符与登记表 | [个人经验剥离](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/references/personal-experience-extraction.md) |
| 对齐版本、CHANGELOG、README 与发布字段 | [版本与索引同步](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/references/version-and-index-sync.md) |
| 跑静态门禁、测试与隐私检查 | [发布前门禁](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/references/release-gates.md) |
| 执行 PR/迁移/平台上传等对外动作 | [发布执行与授权边界](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/references/publish-execution.md) |
| 需要三案例的可复用检查清单 | [案例检查清单](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/references/case-checklist.md) |

## 共同约束

- **先预检后动手**：任何剥离或重构前，先完成设计预检；目标、写域和动作已有明确授权时直接记录后执行，仅追问仍会改变方案的缺失信息。
- **单源自用公开同源**：默认不维护「自用版/公开版」两套实现；自用差异放本地配置或数据目录，发行候选从同一源构建。例外须记录理由与两套源的同步责任。
- **同源还要核功能范围**：一份源码不等于可任意裁剪发行物；先核用户已确认的功能与兼容入口。要求自用公开一致时，允许清单应覆盖完整通用功能，只排个人配置、运行状态和内部维护材料；发现个人硬编码就配置化，不能靠另做精简包规避整改。
- **ignore 不解除已跟踪**：把文件写进 `.gitignore` 不会让已跟踪文件退出版本控制；本地配置若曾被跟踪，需先另存副本再逐项退出跟踪，发布包按路径硬排除作为兜底。
- **双通道防护**：版本控制 ignore 规则挡提交，发布包允许清单挡打包；两道都要有，且都要有回归验证（含正反例）。
- **静态检查是下界**：安全扫描、链接检查、示例验证通过不等于语义隐私已清零、行为已验收；独立复审与按产物类型的真实验证不可跳过。
- **结构校验先对齐目标规范**：不同仓库对 `version`、`author` 等发布字段有不同合法位置。使用 `quick_validate` 前先读取目标项目发布规范与 skill-lint 的 `references/frontmatter-metadata-policy.md`；项目规范要求的字段不能因通用校验器白名单更窄而删除，工具不兼容时以目标仓结构规则为准并记录 NOT_VERIFIED。
- **对外动作逐级授权**：整理、拆层、写测试是可自主推进的工作；push、PR、合并、平台上传、公开仓迁移、tag/Release 分别核对会话中已有授权是否覆盖当前目标、写域与动作；授权持续有效，缺失或目标变化时才补问，前一步完成不隐含下一步。
- **候选绑定证据**：所有通过结论绑定当前候选 OID/哈希；候选变化后重跑受影响检查，不复用旧证据。

## 主流程

1. **预检**：固定目标 Skill、目标形态（公仓目录/独立仓/平台包）、当前版本与基准、允许写域、停止条件。识别已知风险类别（见预检参考的风险表），必要时先请用户裁决高风险项。
2. **权威仓库裁决**：私仓 Skill 迁入公开仓时，先在预检中确认公仓目录是「权威源」还是「同一源码的导出快照」，并写入预检输出。两种形态的门禁产物不同：公仓权威源需按公仓项目规范同步 README 与套件索引；导出快照必须在 CHANGELOG/任务记录写明来源 OID、manifest 与同步方向，且公仓目录不独立改实现。本步骤只决定范围，不产生对外写入。
3. **分层**：把文件归入通用层（入库）、示例层（入库的 `*.example.*` 与 schema）、私有层（本机数据，不入库）。设计配置合同：解析顺序、缺省行为、坏配置处理、校验入口。
4. **剥离**：逐文件处理个人经验——占位化、泛化、结构化（写成步骤/判据而不是叙述）、或整体移入私有层。许可与外部来源先查清；第三方材料按用户裁决删除替换或标注。
5. **同步版本与索引**：`SKILL.md` 版本、CHANGELOG 最新条目、README 索引（含最近更新区）、发布字段（license/homepage/author）一次对齐；CHANGELOG 历史条目同样去具体化。
6. **门禁**：静态安全扫描、Harness 失效审查、quick_validate、链接/引用、示例对 schema、ignore 正反例、（若有脚本）离线测试。证据写任务卡。
7. **前向检查**：按公开使用说明完成隔离安装与首次配置；其余检查按候选实际能力选取，见[能力适用表](https://skilld.dev/api/skills-raw/cat-xierluo/legal-skills/skill-publicizer/references/publish-execution.md#按实际能力做前向检查)。不存在的能力记“不适用”，并写明依据；适用而未执行的项记 `NOT_VERIFIED`，并逐条写明阻塞范围与恢复条件。
8. **独立复审**：指派无旧上下文的只读 reviewer，给出结构化发现；PM 独立验收，不采信自报。
9. **执行与收口**：按授权走 safe-push → safe-pr（Draft）→ 合并/迁移/平台上传；回写任务状态与证据，明确 NOT_VERIFIED 项。

## 完成定义

公开化整理阶段完成 = 分层落地并有正反例验证、个人锚点清零或登记豁免、版本引用一致、关键门禁全部执行并通过、独立复审无未闭合阻断项、任务卡记录证据。

门禁分两类：

- **关键门禁**：静态安全扫描、隐私检查、适用的行为验证、真实产物生成、版本与索引一致性。关键门禁未执行或未通过时，公开化整理阶段保持未完成，不得用 `NOT_VERIFIED` 覆盖。
- **其他适用门禁**：链接/引用、示例与 schema、ignore 正反例、扩展项的平台或 Runtime 覆盖等。未执行时记 `NOT_VERIFIED`，并写明它不阻塞的范围与恢复条件；它阻塞依赖该结论的发布或稳定性声明。

按能力适用表判定为“不适用”的项不是 `NOT_VERIFIED`，也不阻塞任何结论，但要写明判定依据。

**完成不等于已发布**——正式发布前还需按 skill-lint 完成候选绑定证据验收；发布以真实远端回执/平台回执为准，且须在用户已授权范围内。

## 边界

- 不代替 skill-lint 的正式验收、git-workflow 的 Git 门禁或各平台的发布合同。
- 不自动扫描全盘找隐私；以当前候选文件清单和任务指定的上下文为界。
- 二进制与非 UTF-8 材料走 git-workflow 隐私预检的人工审查路径，本技能不发明跳过开关。
- 处理法律/客户材料时遵循最小必要；无法确认是否真实的信息按疑似具体信息处理。

## 按阶段需要的依赖

- `skill-creator`：Skill 编辑与结构校验；`skill-lint`：质量/隐私/候选证据审查。
- `git-workflow`：Git 提交、推送、PR、身份与完整历史预检。
- `release-workflow`：仅在构建发布包或 Release 时需要；`skill-publish-sync`：仅在上传目标平台时需要。

先确认对应技能与执行工具可用；缺失时暂停依赖它的阶段并说明缺口，保留可独立完成的整理。
本技能不内置上述脚本，也不保证单独复制它的目录即可完成 Git/平台操作。
Skill 内的使用说明写在 SKILL.md 和按需 references；README 仅指目标仓库或套件的外部索引。
