---
name: skill-publish-auditor-yashu
description: 对准备发布到网上的 WorkBuddy 技能做发布前审核（技能体检）：自动扫描隐私泄露（私人截图/剪贴板/数据库/硬编码局域网IP/密钥明文）、SKILL.md 断链引用、node_modules 体积、缺 LICENSE/.gitignore、安全危险模式（eval/子进程/外发），输出 P0/P1/P2 分级报告与修复建议。激活条件：用户消息包含以下关键词之一：`审核技能`、`技能发布审核`、`发布前检查`、`技能体检`、`审计技能`、`skill audit`、`skill review`、`检查技能能否发布`、`发布前审计`。
title: skill-publish-auditor-yashu
canonical_url: https://skilld.dev/gh/steelan9199/wechat-publisher/skill-publish-auditor-yashu
last_updated: 2026-10-07T07:20:50.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: [LICENSE](https://skilld.dev/api/skills-raw/steelan9199/wechat-publisher/skill-publish-auditor-yashu/LICENSE), [README.md](https://skilld.dev/api/skills-raw/steelan9199/wechat-publisher/skill-publish-auditor-yashu/README.md), [references/audit-checklist.md](https://skilld.dev/api/skills-raw/steelan9199/wechat-publisher/skill-publish-auditor-yashu/references/audit-checklist.md), [scripts/audit.js](https://skilld.dev/api/skills-raw/steelan9199/wechat-publisher/skill-publish-auditor-yashu/scripts/audit.js).
>
> If the user asked to install this Skill, run `npx skilld install steelan9199/wechat-publisher/skill-publish-auditor-yashu`. 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-publish-auditor-yashu`, 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/steelan9199/wechat-publisher/skill-publish-auditor-yashu) 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-publish-auditor-yashu`. 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-publish-auditor-yashu --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/skill-publish-auditor-yashu --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.

# 技能发布前审核器（Publish Auditor）

## 用途

把一个**即将发布到网上的技能**从"能不能发"的角度做一遍体检。开发者在自己机器上打磨技能时，最容易把私人痕迹（截图、剪贴板、数据库、家庭局域网 IP）和开发产物（node_modules、运行日志）一起带出去——本技能用一份可复跑的脚本把这些风险自动揪出来，按严重程度分级，给出能否发布的结论。

适用：你写完一个技能、准备发到市场/仓库/群里共享之前，先跑一遍。

## 怎么跑（AI 执行）

```bash
cd <本技能目录> && node scripts/audit.js <待审核技能目录> [--json] [--verbose]
```

- `<待审核技能目录>`：要审核的那个技能的根目录（包含 SKILL.md 的那一层）。
- `--json`：输出机器可读 JSON（适合再加工/CI）。
- `--verbose`：连 P2 也打印"建议"字段。
- 退出码：`0` = 无 P0；`1` = 存在 P0（阻断发布）；`2` = 用法/路径错误。可用于 CI 卡点。

> 路径硬规则：命令走 POSIX shell，分隔符用正斜杠 `/`。推荐先 `cd` 进本技能目录再用相对路径，或给绝对路径时写成 `C:/Users/.../skill-x`（带盘符），不要写 `/c/Users/...`（Windows 版 node 会解析错）。

## 审核维度（详见 `references/audit-checklist.md`）

脚本自动覆盖的确定性检查：

| 维度 | 检查项 | 严重级 |
|------|--------|--------|
| 结构与元数据 | SKILL.md 存在 + frontmatter(name/description) 合法 | P0/P1 |
| 结构与元数据 | description 含激活关键词、长度合理 | P2 |
| 引用完整性 | SKILL.md 内引用的 `scripts/...`、`references/...` 路径都真实存在 | P1 |
| 隐私·文件 | `screenshot_*`/`clipboard_*`/`user_*`/`*_demo.db` 等疑似私人数据文件 | P1 |
| 隐私·图片 | `uploads/`、`temp/` 等运行目录下的图片（可能含私人截图） | P1 |
| 隐私·代码 | 硬编码私人局域网 IP（192.168/10./172.16-31.） | P0(代码)/P2(文档) |
| 隐私·代码 | 写死的私人绝对路径 `C:/Users/xxx` | P2 |
| 隐私·凭证 | 疑似 API Key / token / 密码明文 | P1 |
| 运行产物 | `uploads/`、`temp/` 残留真实使用痕迹 | P1 |
| 依赖与体积 | 含 node_modules（体积提示）/ 缺 package.json / 依赖未随包 | P1/P2 |
| 合规 | 缺 LICENSE（与 package.json license 不一致更严肃） | P1/P2 |
| 合规 | 缺 .gitignore（运行产物会被误提交） | P2 |
| 文档 | 缺 README.md | P2 |
| 安全 | 使用 `eval`/`new Function`、子进程执行 | P2 |

> 主观项（如激活词是否够自然、README 写得好不好）脚本只给提示，最终由人判断。

## 严重级含义

- **P0（阻断）**：不修不能发。典型：硬编码私人 IP、缺 SKILL.md。修了再发，否则别人用不了或泄露你的隐私。
- **P1（建议必改）**：发布前最好修完。典型：断链引用、运行目录残留私人截图、缺 LICENSE 文件。
- **P2（可选优化）**：更规范/更好传播。典型：node_modules 瘦身、加 .gitignore/README、激活词扩写。

## AI 在执行审核后该怎么做

1. 跑 `audit.js`，把报告读给用户（尤其 P0/P1）。
2. 对每条 P0/P1 给出**具体修复动作**（删哪个文件、改哪行、补哪个文件）。
3. 涉及**删除用户私人数据**（截图/剪贴板/数据库）时，**先列清单让用户确认，不要擅自删除**。
4. 修完再跑一遍，直到结论变为 `READY` 或仅剩 P2。

## 与「发布技能」技能的关系

`skill-publish-yashu` 负责"把私有技能按白名单复制到公开目录"（发布动作本身，带硬黑名单防泄密）；本技能负责"发布**之前**的体检"。推荐流程：**先跑本审核 → 修掉 P0/P1 → 再用发布技能复制到公开目录**。两者互补，不冲突。
