code-quality-check — automate Python code formatting code-quality-check, unifiles-mcp, community, automate Python code formatting, ide skills, Ruff linter auto-fix, Mypy type checking, Black formatter AI agent, Python code quality automation, install code-quality-check skill, Claude Code

v1.0.0
GitHub

About this Skill

Perfect for Python Development Agents needing automated code quality assurance and formatting. code-quality-check is an AI Agent skill that automates Python code quality checks. It executes a sequence of tools including the Black code formatter, the Ruff linter with auto-fix capabilities, and the Mypy static type checker on specified source and test directories.

Features

Executes Black code formatting on `src/` and `tests/` directories
Runs Ruff linting with the `--fix` flag for automatic corrections
Performs static type checking using Mypy on the `src/unifiles_mcp/` package
Supports a full sequential workflow (Black -> Ruff -> Mypy) or individual tool execution
Allows for a Black dry-run using the `--check` flag to verify formatting without changes
Configures UTF-8 console encoding and activates a Python virtual environment (.venv)

# Core Topics

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

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 automate Python code formatting, Ruff linter auto-fix, Mypy type 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
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

code-quality-check

Automate your Python code reviews with the code-quality-check AI Agent skill. It runs Black, Ruff, and Mypy to enforce formatting, linting, and type safety....

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 an AI Agent skill that automates Python code quality checks. It executes a sequence of tools including the Black code formatter, the Ruff linter with auto-fix capabilities, and the Mypy static type checker on specified source and test directories.

How do I install code-quality-check?

Run the command: npx killer-skills add Asheng008/unifiles-mcp. 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. 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

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI