使用方法
- 复制安装命令,在自己的智能体环境安装前先检查源码包。
- 从原始文档核对所需工具、凭据和支持的宿主。
- 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/victorgarciaesgi/regle --skill code-review开始前需了解
- 安装不包含模型订阅、API 额度或访问文件的权限。
- 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。
Code review — pre-commit validation
Apply on every pull request review. These checks are blocking. Do not approve a PR until all pass or the author has addressed failures.
Review checklist (run every time)
| # | Gate | Command | On failure | |
|---|---|---|---|---|
| 1 | Commit messages | `printf '%s' "$MSG" \ | pnpm exec commitlint` per commit | Blocking comment + suggested fix |
| 2 | Workspace | test -f node_modules/.modules.yaml | Request pnpm install | |
| 3 | Lint | pnpm run lint | Blocking; suggest pnpm run lint:fix | |
| 4 | Format | pnpm run fmt:check | Blocking; suggest pnpm run fmt |
Run all commands from the repo root after pnpm install.
Commit messages (commitlint)
Every commit must follow Conventional Commits per commitlint.config.ts (@commitlint/config-conventional).
type(optional-scope): imperative subject
Optional body explaining why.- Types:
feat,fix,docs,style,refactor,perf,test,chore,ci,build - Subject: lowercase, imperative mood, no trailing period
- Blank line between title and body when a body is present
Auto-fix loop
pnpm run lint:fix
pnpm run fmt
pnpm run lint
pnpm run fmt:checkCommon commitlint failures
| Error | Fix |
|---|---|
type-empty / subject-empty | Use type: subject format |
type-enum | Use an allowed conventional type |
subject-case | Keep subject lowercase |
subject-full-stop | Remove trailing . from subject |




