{"_id":"@effectorhq/skill-lint-action","name":"@effectorhq/skill-lint-action","dist-tags":{"beta":"2.0.0","latest":"2.0.0"},"versions":{"2.0.0":{"name":"@effectorhq/skill-lint-action","version":"2.0.0","description":"GitHub Action — validate Effector SKILL.md files and annotate PRs with inline errors","type":"module","scripts":{"build":"esbuild src/main.js --bundle --platform=node --target=node20 --format=esm --banner:js='#!/usr/bin/env node' --outfile=dist/index.js","test":"node --test tests/action.test.js","test:watch":"node --test --watch tests/action.test.js","lint:example":"node dist/index.js","prepublishOnly":"npm run build && npm test"},"engines":{"node":">=20"},"keywords":["effector","effectorhq","skill","lint","github-action"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/effectorHQ/skill-lint-action.git"},"homepage":"https://github.com/effectorHQ/skill-lint-action#readme","bugs":{"url":"https://github.com/effectorHQ/skill-lint-action/issues"},"dependencies":{"@effectorhq/core":"^1.0.0"},"devDependencies":{"esbuild":"^0.20.0"},"_id":"@effectorhq/skill-lint-action@2.0.0","gitHead":"ae5b7d708a76ff491cf8e8a2807009f0131dce98","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-NyYs7gccmlCOjfzxvJjquV81Vc/AWYnxMMkgfcuRRaGAEqS/GTcNEaH1eiFkXbbKQb8Gkx0Dmw7PcVODePasKQ==","shasum":"53a3b65977669633bb13da29e83377e73df8a26b","tarball":"https://registry.npmjs.org/@effectorhq/skill-lint-action/-/skill-lint-action-2.0.0.tgz","fileCount":19,"unpackedSize":61124,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQConCvorc9kXZvH4iGwyUxtclGMEr1KJfiN6jiRrLjFrgIgU/nE7BUhbiDLThxwR1SI8ur45Mhh41HMHXC+cKcP1dQ="}]},"_npmUser":{"name":"afkv","email":"jydu_seven@outlook.com"},"directories":{},"maintainers":[{"name":"afkv","email":"jydu_seven@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/skill-lint-action_2.0.0_1773841794441_0.7466127289781854"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-18T13:49:54.324Z","2.0.0":"2026-03-18T13:49:54.576Z","modified":"2026-03-18T13:49:54.823Z"},"maintainers":[{"name":"afkv","email":"jydu_seven@outlook.com"}],"description":"GitHub Action — validate Effector SKILL.md files and annotate PRs with inline errors","homepage":"https://github.com/effectorHQ/skill-lint-action#readme","keywords":["effector","effectorhq","skill","lint","github-action"],"repository":{"type":"git","url":"git+https://github.com/effectorHQ/skill-lint-action.git"},"bugs":{"url":"https://github.com/effectorHQ/skill-lint-action/issues"},"license":"MIT","readme":"# skill-lint-action\n\n> 在 CI 中验证 OpenClaw SKILL.md 文件。为 PR 添加行内错误标注。零配置。\n\n[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-skill--lint--action-0075ca?logo=github)](https://github.com/marketplace/actions/skill-lint-action) [![CI](https://github.com/effectorHQ/skill-lint-action/actions/workflows/ci.yml/badge.svg)](https://github.com/effectorHQ/skill-lint-action/actions) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n\n**[English →](./README.md)**\n\n---\n\n## 它做什么\n\n每次你打开一个涉及 `SKILL.md` 改动的 PR，这个 Action 会：\n\n1. **发现** repo 中所有的 `SKILL.md` 文件\n2. **验证** 它们是否符合 OpenClaw skill 规范\n3. **标注** PR diff 的对应行——直接在 PR 里看到错误/警告，无需跳转\n4. **发布摘要** 至 GitHub Actions job summary 标签页\n5. **使构建失败** 如果发现错误（也可配置为警告同样失败）\n\n它能捕获的问题类型：\n\n| 规则 | 级别 | 示例 |\n|------|------|------|\n| `missing-name` | 🔴 错误 | `name:` 字段缺失 |\n| `missing-description` | 🔴 错误 | `description:` 字段缺失 |\n| `missing-openclaw-metadata` | ⚠️ 警告 | 无 `metadata.openclaw` 块 |\n| `missing-emoji` | ⚠️ 警告 | `metadata.openclaw.emoji` 未设置（影响 ClawHub UI） |\n| `description-too-short` | ⚠️ 警告 | description 少于 20 字符——影响搜索发现 |\n| `missing-examples` | ⚠️ 警告 | 无 `## Examples` 或 `## Commands` 章节 |\n| `install-missing-kind` | ⚠️ 警告 | install 条目缺少 `kind:`（brew/apt/manual） |\n| `env-not-uppercase` | ⚠️ 警告 | 环境变量名不是 UPPER_CASE |\n| `name-format` | ⚠️ 警告 | name 不是 kebab-case |\n\n---\n\n## 快速开始\n\n在你的 skill repo 中添加 `.github/workflows/lint.yml`：\n\n```yaml\nname: Lint Skill\n\non:\n  push:\n    branches: [main]\n    paths:\n      - '**/SKILL.md'\n  pull_request:\n    paths:\n      - '**/SKILL.md'\n\njobs:\n  lint:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: effectorHQ/skill-lint-action@v1\n```\n\n就这些。打开一个修改了 `SKILL.md` 的 PR，你就能看到行内标注。\n\n也可以使用 effectorHQ 的可复用 workflow，一行搞定：\n\n```yaml\njobs:\n  lint:\n    uses: effectorHQ/.github/.github/workflows/reusable-skill-lint.yml@main\n    with:\n      fail-on-warnings: true\n```\n\n---\n\n## 输入参数（Inputs）\n\n| 参数 | 必填 | 默认值 | 说明 |\n|------|------|--------|------|\n| `path` | 否 | `.` | 搜索 SKILL.md 文件的路径，可以是目录或具体文件 |\n| `fail-on-warnings` | 否 | `false` | 设为 `true` 时，有警告也会以 exit code 1 退出 |\n| `glob` | 否 | `''` | 查找 SKILL.md 文件的 glob 模式，设置后会覆盖 `path` |\n| `json` | 否 | `false` | 以 JSON 格式输出结果 |\n\n## 输出参数（Outputs）\n\n| 参数 | 说明 |\n|------|------|\n| `errors` | 发现的验证错误数量 |\n| `warnings` | 发现的验证警告数量 |\n| `files-checked` | 检查的 SKILL.md 文件数量 |\n\n在下游 step 中使用输出：\n\n```yaml\n- name: Lint\n  id: lint\n  uses: effectorHQ/skill-lint-action@v1\n\n- name: 只在 lint 通过后运行\n  if: steps.lint.outputs.errors == '0'\n  run: clawhub publish\n```\n\n---\n\n## 使用场景\n\n### 单 skill repo（基础）\n\n```yaml\n- uses: effectorHQ/skill-lint-action@v1\n```\n\n### 严格模式（警告也会失败）\n\n```yaml\n- uses: effectorHQ/skill-lint-action@v1\n  with:\n    fail-on-warnings: 'true'\n```\n\n### 包含多个 skills 的 monorepo\n\n```yaml\n- uses: effectorHQ/skill-lint-action@v1\n  with:\n    path: 'skills/'\n```\n\n### 发布前的质量门控\n\nlint 通过后才触发 ClawHub 发布：\n\n```yaml\njobs:\n  lint:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: effectorHQ/skill-lint-action@v1\n        with:\n          fail-on-warnings: 'true'\n\n  publish:\n    needs: lint\n    runs-on: ubuntu-latest\n    steps:\n      - run: clawhub publish\n        env:\n          CLAWHUB_TOKEN: ${{ secrets.CLAWHUB_TOKEN }}\n```\n\n---\n\n## 为什么用 Action 而不是 CLI？\n\n[`skill-lint`](https://github.com/effectorHQ/skill-lint) 是独立的 CLI——在提交前本地运行。\n\n`skill-lint-action` 封装了相同的规则，并额外提供：\n- **PR 行内标注** — 错误直接出现在 diff 对应行，而不是只在日志里\n- **Job 摘要** — 在 Actions summary 标签页有格式化的汇总表格\n- **零配置** — 无需 `npm install`，无需配置，直接添加 Action 即可\n- **输出参数** — 在下游 step 中使用 `steps.lint.outputs.errors`\n\n推荐两个同时用：本地写 skill 时用 CLI，CI 里用 Action 做质量门控。\n\n---\n\n## 技术说明\n\n- **零外部依赖** — 仅使用 Node.js 20 内置模块\n- **无 Docker 开销** — 直接在 GitHub runner 上运行（启动快）\n- **离线/企业环境可用** — lint 过程无网络请求\n- `dist/index.js` 已提交且自包含——使用本 Action 无需构建步骤\n\n---\n\n## 贡献\n\n欢迎 issue 和 PR。详见 [CONTRIBUTING.md](./CONTRIBUTING.md)。\n\n核心验证规则在 `dist/index.js`（自包含）和对应源码 `src/` 中。添加新规则时，在两处都添加，并补充测试 fixture 和测试用例。\n\n---\n\n## 相关项目\n\n- [`skill-lint`](https://github.com/effectorHQ/skill-lint) — 本 linter 的 CLI 版本\n- [`plugin-template`](https://github.com/effectorHQ/plugin-template) — SKILL.md 起始模板\n- [`cookbook`](https://github.com/effectorHQ/cookbook) — 可参考的示例 skills\n- [ClawHub](https://clawhub.com) — 将验证通过的 skill 发布到注册中心\n\n---\n\nMIT License — effectorHQ Contributors\n","readmeFilename":"README.zh.md","_rev":"1-07b614b43a079b613944b8a46c405e1c"}