跳到正文
cccskills
免费在 GitHub 公开中文介绍

alint-ruleset

维护 `packages/alint` 中由模型判断的代码规则,依据真实代码校准误报、分类检测结果,并根据拉取请求数据决定警告何时升级为错误,同时检查令牌用量。

原文查看原文说明

Maintain LobeHub's model-backed alint rule set in packages/alint: author a rule, calibrate its false positives against real source, decide its severity (warn vs error) from real PR data, and track its token cost. Use for adding or narrowing an alint rule, classifying findings as true/false positives, promoting or demoting a rule, or running the weekly rule-set review.

lobehub/lobehub星标 83,502(GitHub 83,502 + cccskills 0)

实测评分 未实测

查看安装方法

适用场景

  • 添加模型判断型代码规则
  • 用真实代码减少误报
  • 制定警告升级为错误的标准
  • 检查检测结果和令牌成本

中文介绍

功能

此技能用于维护 packages/alint 中由模型判断的代码检查规则,处理 ESLint 无法表达的判断。它指导使用真实代码和审查意见制定规则,再把检测结果归类为正确命中或误报。反复出现的误报应写入排除条件和测试样例。新规则从警告级别开始,只有在真实拉取请求的结果中确认没有误报后,才可升级为错误级别。资料也说明如何将检测过多的规则移至审计检查,以及查看每次运行的令牌用量。

适用场景

团队要引入自定义代码质量规则,或减少现有规则的误报时,可以使用此技能。维护者也可据此设定警告升级为错误的标准,并定期检查规则准确度和运行成本。

使用示例

  • “请根据这条审查意见添加一条 alint 规则。”
  • “请用真实代码检查这条规则,并减少误报。”
  • “请检查拉取请求中的结果,判断这条规则能否升级为错误。”

注意事项

编辑规则前应先阅读 packages/alint/README.md。校准需要 .alint/config.toml,以及 ALINT_API_KEY 或 DEEPSEEK_API_KEY。每次编辑规则后都要清除缓存,并使用 alint 专用命令,而不是 bun run i18n。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

文档检查

AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。

安全性发送数据、删除文件、执行命令等是否有说明
B部分不足资料涉及设置检查、插件安装和缓存删除等操作。
安装难易度所需工具和 API 密钥是否少且有说明
B部分不足需要配置文件和 API 密钥,但安装说明不完整。

不计入评分。 由 AI(OpenAI Codex)于 2026年10月26日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(10)

  • SKILL.md7.5 KB
  • references/calibration.md5.9 KB
  • references/cost.md4.2 KB
  • references/promotion.md3.2 KB
  • references/rule-authoring.md4.4 KB
  • references/weekly.md3.6 KB
  • scripts/collect-rejections.ts5.3 KB
  • scripts/cost-report.ts7.0 KB
  • scripts/pull-alint-runs.ts6.2 KB
  • scripts/sample-findings.ts3.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

alint rule set

packages/alint holds the model-backed lint rules for the judgement calls ESLint cannot express — semantic rules such as "fan-out over a runtime-sized list needs pMap" or "a secondary button is not primary". Each rule is a prompt that runs per file through alint and is cached by file content.

This skill owns the lifecycle of that rule set: how a rule is written, how its false positives are removed, when it earns error, and what it costs. It does not own the rules themselves (they live in packages/alint/rules) and it does not restate the reading contract — that is packages/alint/README.md. Read that file once before editing a rule.

The loop

Everything below is one cycle. An ad-hoc task runs the phase it needs; the weekly review runs the incremental phases on a schedule.

PhaseWhat it doesReference
A · Collect the standardPull the owner's recent review rejections, read them, keep the part that recurs and one file decidescalibration.md
B · Author the rulerule.alint.toml: what to report, where to anchor, and an explicit "do not report" listrule-authoring.md
C · CalibrateScan → sample → classify TP/FP → write the recurring FP patterns back as carve-outs → cold-run fixturescalibration.md
D · Map the problemsCluster findings across rules by file/area; that is the cleanup backlogcalibration.md
E · PromoteRead the rule's findings on real PRs; warn → error only at zero false positivespromotion.md
F · Account for the costToken usage per run; cache invalidation is the cost drivercost.md

Decision rules

These are the calls that are easy to get wrong. They are not suggestions.

  • The owner's words are the standard. A rule quotes the rejection it comes from, verbatim and in the original language; never paraphrase. If a comment is a requirement or a taste call that no single file can decide, it does not become a rule.
  • Deterministic checks belong in ESLint/stylelint, not alint. If an AST or a path list decides it, ESLint decides it. alint is only for what neither can express — no-node-in-browser kept only the "does this npm package need Node at runtime" half and handed the import-path half to ESLint.
  • Carve-outs first. Write the "do not report" list before the report list: the false positives live in the carve-outs. Every carve-out observed in calibration gets a good-* fixture, so the exemption stays true.
  • Scope with [[config.group]] files, never includeFiles inside a rule. includeFiles only filters reports, so every file still runs (double the jobs) and the rule becomes uncacheable.
  • error is a promotion, not a starting point. A new rule starts at warn, and is promoted only after its findings have been read on real PRs and measured at zero false positives. Fixture groups stay warn so a rule PR never fails on its own bad-* fixtures.
  • A rule that is mostly true but not worth acting on per PR does not belong in the PR check. Too many findings, or weak precision, sends the rule to alint.audit.toml (bun run alint:audit). test-the-exit-not-the-entry was deleted for producing 92% of all findings and drowning the sharper rules.
  • Rule changes and product changes are different PRs. A rule PR contains rules, config and fixtures only. A product fix that a rule surfaced gets its own PR with acceptance.
  • Sample precision is optimistic. It is measured on the same sample the carve-outs were written from. Say so whenever the number is quoted.

Preflight — before any calibration run

A calibration run fails expensively when the setup is not real. Check these in order; do not interpret a skipped suite as a pass.

  1. .alint/config.toml exists (gitignored; bun run alint:setup, needs ALINT_API_KEY or DEEPSEEK_API_KEY). Without it the fixture suite skips rather than fails — silence is not a pass.
  2. bun run alint plugin install has run, and is re-run after adding a rule or a packages/<pkg>/alint/rules directory. A missing lock entry exits 2 with no JSON.
  3. In a git worktree, install dependencies for real. A symlinked node_modules resolves @lobechat/* to the main checkout, so rule reads and type-checks lie.
  4. Delete .alintcache after every rule edit while calibrating. The local cache is keyed by file content, so an edited rule otherwise replays the previous rule's findings.
  5. Confirm a run is cold when a count is quoted. A warm run replays the previous results and costs nothing, which hides a regression.

Where the pieces live

  • Rules — packages/alint/rules/<name>/rule.alint.toml (repo-wide, plugin prefix lobehub). A rule about one package lives in packages/<pkg>/alint/rules under its own prefix (e.g. hetero) and is registered in the matching [[config.group]].
  • Fixtures — packages/alint/fixtures/<name>/ (mirrored next to a package-level rule): bad-* with // alint-expect on the line above the anchor line (JSX children use {/* alint-expect */}), and one good-* per carve-out.
  • Scope — root alint.config.toml (the PR check) and alint.audit.toml (the bulk audit). Everything a repo-wide group needs is files, ignores, plugins, rules.
  • Runner — bun run check --alint (changed lines by default; explicit paths lint whole files), bun run alint --dirty, bun run alint:audit.
  • CI & reporting — .agents/scripts/check/alint.ts (the --alint selector), packages/alint/report.ts (the ALint check run, its annotations, one PR summary comment with marker <!-- alint-summary -->, and a usage line), and the ALint & Test Desktop App job in .github/workflows/test.yml. The check is not required, so a red check informs rather than blocks.
  • Scripts in this skill — scripts/: collect-rejections.ts, sample-findings.ts, pull-alint-runs.ts, cost-report.ts.

Related skills — read them, do not restate them

acceptance (the rejection loop this rule set is fed by), ux (the design values the ui-* rules encode), react / compose-atoms / data-fetching-architecture (the sources of the engineering rules), pr (how a rule PR is opened and stacked on its base).

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

acceptance

免费有简介

通过实际操作产品验证交付内容,记录用户可查看的证据,并发布验收报告。可检查已有验证计划或创建检查项,选择合适的操作界面,并使用 `lh` CLI 发布结果。

  • 实际检查更改后的产品行为
  • 收集截图或其他验证证据
  • 编写验证计划和报告
lobehub/lobehub8.4万2026年10月26日 更新

add-model-provider

免费有简介

本技能指导在 LobeHub 中接入 AI 模型提供商,涵盖运行时、模型信息、设置、品牌展示、文档和验收,并帮助判断新增模型是否需要新的提供商集成。

  • 为 LobeHub 接入新的 AI 模型提供商
  • 更新提供商设置说明或介绍
  • 判断添加模型是否需要新的提供商集成
lobehub/lobehub8.4万2026年10月26日 更新

add-setting-env

免费有简介

本技能指导如何用服务器端环境变量设置用户偏好默认值,涵盖变量校验、服务器配置、写入用户状态,以及更新 `.env.example` 和自托管文档。

  • 通过环境变量设置用户偏好默认值
  • 将设置接入服务器配置和用户状态
  • 更新环境变量示例及文档
lobehub/lobehub8.4万2026年10月26日 更新

agent-runtime-hooks

免费有简介

说明如何在智能体执行步骤、工具调用、人工审批、上下文压缩和子智能体调用时注册钩子。钩子可观察事件、模拟本地工具结果,也可通过 Webhook 按配置策略允许或拒绝工具调用。

  • 记录智能体步骤和错误
  • 测试时模拟工具结果
  • 通过 Webhook 允许或拒绝工具调用
lobehub/lobehub8.4万2026年10月26日 更新

agent-signal

免费有简介

此技能用于为智能体设计事件驱动的后台工作流,划分来源、信号、动作和策略的职责,并处理异步交接、去重、执行范围、完成记录与运行观测。

  • 添加事件触发的后台任务
  • 将工作移出对话请求
  • 防止动作重复执行
lobehub/lobehub8.4万2026年10月26日 更新

agent-testing-bot

免费有简介

本技能在 macOS 桌面聊天应用中测试机器人频道:打开应用、进入频道或联系人、发送消息、等待回复并截图。支持 Discord、Slack、Telegram、微信、飞书和 QQ;iMessage 使用 BlueBubbles 桥接。

  • 检查真实 Discord 频道中的机器人回复
  • 测试 Slack 或 Telegram 的对话流程
  • 记录 macOS 应用中的操作结果
lobehub/lobehub8.4万2026年10月26日 更新

查看 lobehub 的全部技能

报告此技能的问题