verify-quality
- Repo stars 5,436
- License MIT
- Author updated Live
- Author repo ccg-workflow
- Domain
- Other
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 94 / 100 · audit passed
- Author / version / license
- @fengshao1227 · MIT
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Not required
- Operating systems
- macOS · Linux · Windows
- Runtime requirements
- Node.js · Python
- Permissions
-
- Read-only
- Write / modify
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: verify-quality
description: 代码质量 = 可读性 + 可维护性 + 可测试性 劣质代码是技术债,技术债是道基裂痕 node scripts/quality_checker.js <扫描路径> runs entirely…
category: other
runtime: Node.js / Python
---
# verify-quality output preview
## PART A: Task fit
- Use case: 代码质量 = 可读性 + 可维护性 + 可测试性 劣质代码是技术债,技术债是道基裂痕 node scripts/quality_checker.js <扫描路径> runs entirely locally; runs on Node.js. Works with Claude Code, Cursor, Cline and 23 more..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “核心原则 / 自动检查 / 检测指标” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “代码质量 = 可读性 + 可维护性 + 可测试性 劣质代码是技术债,技术债是道基裂痕 node scripts/quality_checker.js <扫描路径> runs entirely locally; runs on Node.js. Works with Claude Code, Cursor, Cline and 23 more.”.
- **02** When the source has headings, the agent prioritizes “核心原则 / 自动检查 / 检测指标” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files.
Start with a small task and check whether the result follows “核心原则 / 自动检查 / 检测指标”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: verify-quality
description: 代码质量 = 可读性 + 可维护性 + 可测试性 劣质代码是技术债,技术债是道基裂痕 node scripts/quality_checker.js <扫描路径> runs entirely…
category: other
source: fengshao1227/ccg-workflow
---
# verify-quality
## When to use
- 代码质量 = 可读性 + 可维护性 + 可测试性 劣质代码是技术债,技术债是道基裂痕 node scripts/quality_checker.js <扫描路径>; runs on Node.js. | 指标 | 阈值 | 超标后果 |…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “核心原则 / 自动检查 / 检测指标” and keep inference separate from source facts.
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "verify-quality" {
input -> user goal + target files + boundaries + acceptance criteria
context -> 核心原则 / 自动检查 / 检测指标
rules -> SKILL.md triggers / order / output contract
runtime -> Node.js / Python | read files, write/modify files | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} ⚖ 校验关卡 · 代码质量
核心原则
代码质量 = 可读性 + 可维护性 + 可测试性
劣质代码是技术债,技术债是道基裂痕
复杂度是 bug 的温床
自动检查
运行质量检查脚本(跨平台):
# 在 skill 目录下运行
node scripts/quality_checker.js <扫描路径>
node scripts/quality_checker.js <扫描路径> -v # 详细模式
node scripts/quality_checker.js <扫描路径> --json # JSON 输出
检测指标
复杂度指标
| 指标 | 阈值 | 超标后果 |
|---|---|---|
| 圈复杂度 | ≤ 10 | 🟠 警告,建议拆分 |
| 函数长度 | ≤ 50 行 | 🟠 警告,建议拆分 |
| 文件长度 | ≤ 500 行 | 🟡 提示,考虑拆分 |
| 参数数量 | ≤ 5 | 🟠 警告,考虑封装 |
| 嵌套深度 | ≤ 4 | 🟠 警告,建议重构 |
| 行长度 | ≤ 120 | 🔵 提示 |
命名规范
| 类型 | 规范 | 示例 |
|---|---|---|
| 类名 | PascalCase | UserService, HttpClient |
| 函数名 | snake_case | get_user, process_data |
| 常量 | UPPER_SNAKE | MAX_RETRY, DEFAULT_TIMEOUT |
| 变量 | snake_case | user_id, total_count |
代码异味
| 异味 | 说明 | 严重度 |
|---|---|---|
| 重复代码 | 相似代码块 > 10 行 | 🟠 High |
| 过长参数列表 | 参数 > 5 个 | 🟡 Medium |
| 魔法数字 | 未命名的常量 | 🟡 Medium |
| 死代码 | 未使用的函数/变量 | 🔵 Low |
| 注释代码 | 被注释的代码块 | 🔵 Low |
自动触发时机
| 场景 | 触发条件 |
|---|---|
| 复杂模块 | 代码行数 > 200 |
| 重构完成 | 重构任务完成时 |
| 代码审查 | PR/MR 审查时 |
| 提交前 | 代码提交前检查 |
校验流程
1. 扫描代码文件
2. 计算复杂度指标
3. 检测代码异味
4. 验证命名规范
5. 输出质量校验报告
校验报告格式
## 代码质量校验报告
✓ 通过 | ✗ 未通过
### 复杂度指标
- 平均函数复杂度: N
- 超标函数数: N
- 最大文件行数: N
### 代码异味
- 🟠 High: N
- 🟡 Medium: N
- 🔵 Low: N
### 问题清单
| 文件 | 行号 | 类型 | 严重度 | 描述 |
|------|------|------|--------|------|
| ... | ... | ... | ... | ... |
### 结论
可交付 / 需重构后交付
重构建议
降低复杂度
# 🔴 高复杂度 - 道基不稳
def process(data):
if condition1:
if condition2:
if condition3:
# 深层嵌套
pass
# ✅ 低复杂度 - 道基稳固
def process(data):
if not condition1:
return
if not condition2:
return
if not condition3:
return
# 主逻辑
消除重复
# 🔴 重复代码 - 异端
def func1():
# 10行相同逻辑
pass
def func2():
# 10行相同逻辑
pass
# ✅ 提取公共函数 - 正道
def common_logic():
# 公共逻辑
pass
def func1():
common_logic()
def func2():
common_logic()
Decide Fit First
Design Intent
How To Use It
Boundaries And Review