运维测试
- 作者仓库星标 3,063
- 许可证 NOASSERTION
- 作者更新于 实时读取
- 作者仓库 qlty
- 领域
- 工程开发
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 94 / 100 · 已通过审计
- 作者 / 版本 / 许可
- @qltysh · NOASSERTION
- Token 消耗评级
- 中等消耗
- 接入复杂程度
- 即装即用
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- 读取环境变量
- 网络行为
- 允许外网请求
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: bc-check
description: Analyze a qlty pull request (or the current branch) for backwards-incompatible behavior changes.…
category: 工程开发
runtime: 无特殊运行时
---
# bc-check 输出预览
## PART A: 任务判断
- 适用问题:代码实现、重构、调试或代码审查。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Who gets hurt by a BC break in this repo / 1. Developers running qlty locally / 2. Customers running qlty in their CI”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于代码实现、重构、调试或代码审查,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Who gets hurt by a BC break in this repo / 1. Developers running qlty locally / 2. Customers running qlty in their CI”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、读取环境变量、会按任务需要访问外部网络、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、读取环境变量;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、读取环境变量。
先用一个小任务确认它会围绕“Who gets hurt by a BC break in this repo / 1. Developers running qlty locally / 2. Customers running qlty in their CI”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: bc-check
description: Analyze a qlty pull request (or the current branch) for backwards-incompatible behavior changes.…
category: 工程开发
source: qltysh/qlty
---
# bc-check
## 什么时候使用
- 用于审阅代码、文档或方案并给出可执行反馈 适合处理工程开发场景下的代码实现、调试、重构、测试或代码审查,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;通常…
- 面向代码实现、重构、调试或代码审查,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Who gets hurt by a BC break in this repo / 1. Developers running qlty locally / 2. Customers running qlty in their CI」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、读取环境变量;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "bc-check" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Who gets hurt by a BC break in this repo / 1. Developers running qlty locally / 2. Customers running qlty in their CI
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、读取环境变量 | 会按任务需要访问外部网络
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Backwards-compatibility review for a qlty PR
Your job is to identify whether the target PR (or branch) introduces behavior changes that would break existing qlty users when they upgrade, and return a structured findings report in your reply.
The target is whatever the user named (a PR number, PR URL, or branch). If
the user didn't specify anything, default to the current branch vs.
origin/main.
Who gets hurt by a BC break in this repo
Keep these three user segments in mind. The severity of a finding depends on which segment it affects.
1. Developers running qlty locally
Individual developers download a qlty CLI version and often don't run
qlty upgrade regularly, so their local version can be months behind main.
They mostly invoke qlty check and qlty fmt against a .qlty/qlty.toml
that's checked into their repo. A BC break here causes friction for one
developer at a time — annoying but recoverable. Severity baseline: risky
unless unusually disruptive.
2. Customers running qlty in their CI
Customers run qlty coverage publish and qlty coverage complete inside
their CI pipelines on every build. Pipelines are hard to change in a hurry:
a BC break here fails every build for every customer on the affected
version, often silently (they don't notice until coverage stops showing up,
or a release is blocked by red CI). This is the highest-stakes category.
Severity baseline for a confirmed break: blocker. Be especially
sensitive to anything that changes exit codes, error vs. warning behavior,
or required inputs on qlty coverage * commands.
3. Qlty Cloud's hosted builds
Qlty Cloud runs builds on behalf of customers and invokes the qlty CLI
directly. The commands currently relied on include qlty sources fetch,
qlty config validate, qlty fmt --skip-source-fetch, qlty init,
qlty install, and qlty build. A BC break that affects any of these
commands, or the config/source formats they depend on, causes a Qlty
Cloud outage — every customer's builds fail at once until we can ship a
coordinated fix. Severity baseline for a confirmed break here: blocker,
with extra urgency in the report.
A single finding can hit more than one of these. Call out each affected segment explicitly.
Step 1 — Load the diff
Resolve the target from the user input:
- PR number / PR URL →
gh pr view <N> --json title,body,headRefName,baseRefName,author,filesandgh pr diff <N>. - Branch name →
git fetch origin main && git diff origin/main...<branch>andgit log origin/main..<branch> --oneline. - No input → current branch:
git fetch origin main && git diff origin/main...HEADandgit log origin/main..HEAD --oneline.
Read the PR description and commit messages first. Intent matters: a PR captioned "fix bug where X silently failed" is exactly the #2762 pattern — that's a red flag unless the fix is gated behind an opt-in flag.
Step 2 — For each category below, check the diff
For every category the PR touches, produce a finding with file:line, before behavior, after behavior, which of the three user segments breaks, and severity (blocker / risky / note). Don't just point at a diff — walk through what an existing user actually experiences.
a. Behavior changes on existing command paths
The #2762 pattern. Silent failures becoming hard errors, added network/IO
on a command's hot path, new validation that rejects previously-accepted
input. Grep signals: new bail!, ensure!, return Err, ? on
previously-swallowed results, unwrap_or_default() being removed,
fetch_sources, load_config, validate_ added to a command flow.
Ask: what does a user with a 6-month-old working setup see now?
b. CLI flag surface (qlty-cli/src/commands/**)
Any #[arg] / #[clap] removed or renamed; default_value changed;
optional↔required changes; value_enum variant removed; subcommand
removed or renamed; new positional argument shifting existing args;
hide = true flags being removed (flag but rarely a blocker).
c. qlty.toml schema (qlty-config/src/config/**)
serde fields renamed or removed without #[serde(alias)]; Option<T> →
T; type changes; #[serde(deny_unknown_fields)] added; default changes;
config_version handling that would reject a config_version = "0" file;
TOML merge semantics in qlty-config/src/toml_merge.rs.
d. Output formats
qlty-coverage/src/print.rs, any print_*_as_json, serde_json::to_*,
Serialize derives on output types. Field renames/removals, numeric
format changes, wire format changes in qlty-types protos. Also text
output that scripts parse (CI log patterns, summary lines).
e. Exit codes
std::process::exit, CommandError vs CommandSuccess, ? propagation
into main. A command starting to return non-zero where it used to return
zero (or vice versa) is a blocker for CI-segment users.
f. Environment variables
std::env::var call sites. QLTY_* renamed or removed; precedence order
between env and flag changed; auth token resolution in
qlty-coverage/src/token.rs.
g. Source fetching / cache layout
Changes to .qlty/sources/ / .qlty/cache/ / ~/.qlty/ layout;
GitSource / LocalSource / DefaultSource / SourcesList changes to
what counts as cached, when fetches happen, credential resolution, source
resolution order.
h. Plugin behavior
plugin.toml schema changes in qlty-plugins/plugins/*/plugin.toml or
the loader in qlty-check; drivers, prepare_script, affects_cache
semantics; download URL patterns (breaking these kills offline caches).
i. Telemetry / logging defaults
Log levels changing debug! → warn! / error! (visible in CI logs);
event shape changes for Sentry/analytics (lower severity).
Step 3 — Trace the worst-case user for each segment
For the riskiest findings, walk through a concrete scenario per affected
segment. Write out the .qlty/qlty.toml snippet or CLI invocation that
would break, say what the user saw before, and what they see now. This is
the step that catches incidents like #2762 — it forces you past "the tests
pass" into "what does each segment hit?"
For segment 3 (Qlty Cloud), check whether the change would affect any of the qlty commands listed above that Qlty Cloud relies on. If the answer is yes, the PR needs a coordinated Qlty Cloud update before it ships — flag that explicitly in the mitigation suggestion.
Step 4 — Check for mitigations
For each finding, does the PR:
- Gate the new strict behavior behind an opt-in flag (like
--skip-source-fetch), default preserving old behavior? - Add
#[serde(alias = "old_name")]on renamed fields? - Bump
config_versionand gate breaking checks on the new version? - Emit a warning (not an error) with a deprecation window?
- Call out a coordinated Qlty Cloud update if segment 3 is affected?
- Update CHANGELOG / migration docs?
No mitigation + confirmed break ⇒ escalate to blocker.
Step 5 — Output the report
Return the findings as the last thing in your reply, using this shape. Nothing else should come after it — the report is the skill's output.
## Backwards-compatibility review
**Target:** <PR #N / branch <name> / current branch>
**Verdict:** <safe / risky — needs mitigation / blocker — do not merge as-is>
**Affected user segments:** <local devs / CI users / Qlty Cloud — segments with findings>
### Findings
**[severity]** `path/to/file.rs:123` — <category>
- Before: ...
- After: ...
- Who breaks: <segment(s) + concrete scenario>
- Suggested mitigation: ...
<repeat, most severe first>
### Categories checked and clear
<list of categories from Step 2 where nothing was found>
### Notes for reviewer
<optional: anything the reviewer should verify manually>
If there are zero findings, still emit the report with "Verdict: safe" and the "Categories checked and clear" list, so the caller knows the check ran.
Scope / non-goals
- Don't critique code quality, test coverage, or style — only compatibility.
- Don't flag purely additive changes (new optional flag, new optional field, new subcommand) unless they shadow or conflict with existing behavior.
- Internal refactors (moving code between private crates, renaming private fns) are out of scope unless they change observable behavior.
- Don't post to GitHub, don't edit files, don't commit — just analyze and return the report.
- Be specific. "This might break something" is useless. "Customers with
[[source]] repository = ...entries hit exit 1 now becauseworkspace.load_configatcoverage/publish.rs:185propagates the error whereunwrap_or_default()used to swallow it — this breaks segment 2 (CI) and segment 3 (Qlty Cloud, which invokesqlty sources fetch)" is the bar.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核