Verify Quality logo

Verify Quality

CommunityPopular
fengshao1227
verify-quality

代码质量校验关卡。检测复杂度、重复代码、命名规范、函数长度等质量指标。当用户提到代码质量、复杂度检查、代码异味、重构建议、lint检查、代码规范时使用。在复杂模块、重构完成时自动触发。

Overview

Publisherfengshao1227
Repositoryccg-workflow
Skill nameverify-quality
Stars
5.9K
Forks
446
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by fengshao1227 on GitHub. Read the source before you install it.

Installation

Install the Verify Quality AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fengshao1227/ccg-workflow.git /tmp/ccg-workflow
mkdir -p .claude/skills
cp -r /tmp/ccg-workflow/dsh-ccg/skills/verify-quality .claude/skills/verify-quality
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Verify Quality in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Verify Quality on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Verify Quality is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

⚖ 校验关卡 · 代码质量

核心原则

代码质量 = 可读性 + 可维护性 + 可测试性
劣质代码是技术债,技术债是道基裂痕
复杂度是 bug 的温床

自动检查

运行质量检查脚本(跨平台):

bash
# 在 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🔵 提示

命名规范

类型规范示例
类名PascalCaseUserService, HttpClient
函数名snake_caseget_user, process_data
常量UPPER_SNAKEMAX_RETRY, DEFAULT_TIMEOUT
变量snake_caseuser_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

### 问题清单

| 文件 | 行号 | 类型 | 严重度 | 描述 |
|------|------|------|--------|------|
| ... | ... | ... | ... | ... |

### 结论
可交付 / 需重构后交付

重构建议

降低复杂度

python
# 🔴 高复杂度 - 道基不稳
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
    # 主逻辑

消除重复

python
# 🔴 重复代码 - 异端
def func1():
    # 10行相同逻辑
    pass

def func2():
    # 10行相同逻辑
    pass

# ✅ 提取公共函数 - 正道
def common_logic():
    # 公共逻辑
    pass

def func1():
    common_logic()

def func2():
    common_logic()

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Verify Quality AI skill do?

代码质量校验关卡。检测复杂度、重复代码、命名规范、函数长度等质量指标。当用户提到代码质量、复杂度检查、代码异味、重构建议、lint检查、代码规范时使用。在复杂模块、重构完成时自动触发。

Why use Verify Quality on TypingMind?

Because you install it once and use it with any model. Verify Quality is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Verify Quality in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/fengshao1227/ccg-workflow/tree/main/dsh-ccg/skills/verify-quality. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Verify Quality?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Verify Quality?

As many as you like. As long as a model supports skills, you can use Verify Quality with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Verify Quality AI skill free?

Yes. It is published on GitHub by fengshao1227 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇