code-quality-check — code quality checking code-quality-check, unifiles-mcp, Asheng008, community, code quality checking, ai agent skill, ide skills, agent automation, Black code formatting, Ruff code style checking, Mypy type checking, automated code review

v1.0.0
GitHub

About this Skill

Perfect for Python Development Agents needing automated code quality assurance and formatting. code-quality-check is a skill that automates code review using tools like Black, Ruff, and Mypy to format code, check style, and perform type checking.

Features

Runs Black for code formatting
Utilizes Ruff for code style checking and auto-fixing
Performs type checking with Mypy
Supports activation of virtual environments via .venv\Scripts\Activate.ps1
Enables checking of specific directories, such as src/ and tests/
Allows for optional --check flag for dry-run checks with Black

# Core Topics

Asheng008 Asheng008
[0]
[0]
Updated: 3/12/2026

Quality Score

Top 5%
36
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
> npx killer-skills add Asheng008/unifiles-mcp/code-quality-check
Supports 19+ Platforms
Cursor
Windsurf
VS Code
Trae
Claude
OpenClaw
+12 more

Agent Capability Analysis

The code-quality-check skill by Asheng008 is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance. Optimized for code quality checking, Black code formatting, Ruff code style checking.

Ideal Agent Persona

Perfect for Python Development Agents needing automated code quality assurance and formatting.

Core Value

Empowers agents to enforce consistent code standards by executing Black for formatting, Ruff for linting and auto-fixing, and Mypy for static type checking, ensuring high-quality Python code through automated tools and protocols like UTF-8 encoding.

Capabilities Granted for code-quality-check

Automating code formatting with Black
Debugging code issues with Ruff's linting and auto-fix capabilities
Performing static type checking with Mypy

! Prerequisites & Limits

  • Requires Python environment activation
  • Limited to Python code quality checking
  • Dependent on Black, Ruff, and Mypy libraries
Project
SKILL.md
3.3 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

代码质量检查

运行代码质量检查工具,确保代码符合项目规范。

快速执行

完整检查流程

powershell
1# 设置编码并激活环境 2chcp 65001; [Console]::OutputEncoding = [System.Text.UTF8Encoding]::UTF8; .\.venv\Scripts\Activate.ps1 3 4# 1. Black 格式化代码 5black src/ tests/ 6 7# 2. Ruff 检查并自动修复 8ruff check src/ tests/ --fix 9 10# 3. Mypy 类型检查 11mypy src/unifiles_mcp/

单独执行

Black 格式化

powershell
1.\.venv\Scripts\Activate.ps1; black src/ tests/

检查但不修改:

powershell
1.\.venv\Scripts\Activate.ps1; black src/ tests/ --check

Ruff 检查

powershell
1.\.venv\Scripts\Activate.ps1; ruff check src/ tests/

自动修复:

powershell
1.\.venv\Scripts\Activate.ps1; ruff check src/ tests/ --fix

Mypy 类型检查

powershell
1.\.venv\Scripts\Activate.ps1; mypy src/unifiles_mcp/

工具配置

Black 配置

项目配置在 pyproject.toml

toml
1[tool.black] 2line-length = 100 3target-version = ['py310', 'py311', 'py312']

Ruff 配置

项目配置在 pyproject.toml

toml
1[tool.ruff] 2line-length = 100 3target-version = "py310" 4select = ["E", "W", "F", "I", "B", "C4", "UP"] 5ignore = ["E501"] # line too long (handled by black)

Mypy 配置

项目配置在 pyproject.toml

toml
1[tool.mypy] 2python_version = "3.10" 3warn_return_any = true 4disallow_untyped_defs = true 5disallow_incomplete_defs = true

常见问题修复

Ruff 错误

E501 - 行太长

  • 通常由 Black 处理,如果出现,检查 Black 是否已运行

F401 - 未使用的导入

  • 删除未使用的导入
  • 或使用 # noqa: F401 注释(谨慎使用)

I001 - 导入排序

  • Ruff 会自动修复,运行 ruff check --fix

Mypy 错误

缺少类型注解

  • 为函数参数和返回值添加类型注解
  • 使用 typing 模块的类型提示

类型不匹配

  • 检查变量类型声明
  • 使用 cast() 或类型断言(谨慎使用)

未定义的类型

  • 确保导入所有使用的类型
  • 使用 from __future__ import annotations 延迟评估

代码规范要点

必须遵循

  1. 类型注解

    • 所有函数参数和返回值必须有类型注解
    • 使用 Pydantic 模型定义复杂参数
  2. 异步优先

    • 使用 async def 定义异步函数
    • 避免阻塞 I/O 操作
  3. 异常处理

    • 捕获具体异常类型
    • 避免裸露的 except Exception
  4. 导入顺序

    • 标准库
    • 第三方库
    • 本地模块

代码风格

  • 行长度:100 字符
  • 使用 4 个空格缩进
  • 使用双引号字符串
  • 函数和类之间空两行

检查清单

代码质量检查完成后,确认:

  • 已激活虚拟环境
  • Black 已格式化代码(无格式问题)
  • Ruff 无报错或已修复所有问题
  • Mypy 通过或仅剩预期忽略项
  • 所有类型注解完整
  • 无未使用的导入
  • 代码符合项目规范

集成到工作流

提交前检查

powershell
1chcp 65001; .\.venv\Scripts\Activate.ps1; black src/ tests/; ruff check src/ tests/ --fix; mypy src/unifiles_mcp/

持续集成

在 CI/CD 流程中:

yaml
1- name: Code Quality Check 2 run: | 3 black --check src/ tests/ 4 ruff check src/ tests/ 5 mypy src/unifiles_mcp/

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is code-quality-check?

Perfect for Python Development Agents needing automated code quality assurance and formatting. code-quality-check is a skill that automates code review using tools like Black, Ruff, and Mypy to format code, check style, and perform type checking.

How do I install code-quality-check?

Run the command: npx killer-skills add Asheng008/unifiles-mcp/code-quality-check. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for code-quality-check?

Key use cases include: Automating code formatting with Black, Debugging code issues with Ruff's linting and auto-fix capabilities, Performing static type checking with Mypy.

Which IDEs are compatible with code-quality-check?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for code-quality-check?

Requires Python environment activation. Limited to Python code quality checking. Dependent on Black, Ruff, and Mypy libraries.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add Asheng008/unifiles-mcp/code-quality-check. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use code-quality-check immediately in the current project.

Related Skills

Looking for an alternative to code-quality-check or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

Generate customizable widget plugins for the prompts.chat feed system

149.6k
0
Design

linear

Logo of lobehub
lobehub

Linear issue management. MUST USE when: (1) user mentions LOBE-xxx issue IDs (e.g. LOBE-4540), (2) user says linear, linear issue, link linear, (3) creating PRs that reference Linear issues. Provides

73.4k
0
Communication

testing

Logo of lobehub
lobehub

Testing guide using Vitest. Use when writing tests (.test.ts, .test.tsx), fixing failing tests, improving test coverage, or debugging test issues. Triggers on test creation, test debugging, mock setup

73.3k
0
Communication

zustand

Logo of lobehub
lobehub

Zustand state management guide. Use when working with store code (src/store/**), implementing actions, managing state, or creating slices. Triggers on Zustand store development, state management questions, or action implementation.

72.8k
0
Communication