code-quality-check — community code-quality-check, unifiles-mcp, community, ide skills

v1.0.0

关于此技能

非常适合需要自动化代码质量保证和格式化的Python开发代理。 运行代码质量检查工具,包括 ruff、black 和 mypy。格式化代码、检查代码风格、进行类型检查。当需要确保代码符合项目规范、修复格式问题或进行代码审查时使用。

Asheng008 Asheng008
[0]
[0]
更新于: 3/12/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 6/11

This page remains useful for operators, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution
Review Score
6/11
Quality Score
36
Canonical Locale
zh
Detected Body Locale
zh

非常适合需要自动化代码质量保证和格式化的Python开发代理。 运行代码质量检查工具,包括 ruff、black 和 mypy。格式化代码、检查代码风格、进行类型检查。当需要确保代码符合项目规范、修复格式问题或进行代码审查时使用。

核心价值

通过执行Black进行格式化、Ruff进行linting和自动修复、以及Mypy进行静态类型检查,使得代理能够执行一致的代码标准,确保通过自动化工具和协议(如UTF-8编码)获得高质量的Python代码。

适用 Agent 类型

非常适合需要自动化代码质量保证和格式化的Python开发代理。

赋予的主要能力 · code-quality-check

使用Black自动化代码格式化
使用Ruff的linting和自动修复功能调试代码问题
使用Mypy进行静态类型检查

! 使用限制与门槛

  • 需要激活Python环境
  • 仅限Python代码质量检查
  • 依赖于Black、Ruff和Mypy库

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.
  • - The underlying skill quality score is below the review floor.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

评审后的下一步

先决定动作,再继续看上游仓库材料

Killer-Skills 的主价值不应该停在“帮你打开仓库说明”,而是先帮你判断这项技能是否值得安装、是否应该回到可信集合复核,以及是否已经进入工作流落地阶段。

实验室 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

常见问题与安装步骤

以下问题与步骤与页面结构化数据保持一致,便于搜索引擎理解页面内容。

? FAQ

code-quality-check 是什么?

非常适合需要自动化代码质量保证和格式化的Python开发代理。 运行代码质量检查工具,包括 ruff、black 和 mypy。格式化代码、检查代码风格、进行类型检查。当需要确保代码符合项目规范、修复格式问题或进行代码审查时使用。

如何安装 code-quality-check?

运行命令:npx killer-skills add Asheng008/unifiles-mcp/code-quality-check。支持 Cursor、Windsurf、VS Code、Claude Code 等 19+ IDE/Agent。

code-quality-check 适用于哪些场景?

典型场景包括:使用Black自动化代码格式化、使用Ruff的linting和自动修复功能调试代码问题、使用Mypy进行静态类型检查。

code-quality-check 支持哪些 IDE 或 Agent?

该技能兼容 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。可使用 Killer-Skills CLI 一条命令通用安装。

code-quality-check 有哪些限制?

需要激活Python环境;仅限Python代码质量检查;依赖于Black、Ruff和Mypy库。

安装步骤

  1. 1. 打开终端

    在你的项目目录中打开终端或命令行。

  2. 2. 执行安装命令

    运行:npx killer-skills add Asheng008/unifiles-mcp/code-quality-check。CLI 会自动识别 IDE 或 AI Agent 并完成配置。

  3. 3. 开始使用技能

    code-quality-check 已启用,可立即在当前项目中调用。

! 参考页模式

此页面仍可作为安装与查阅参考,但 Killer-Skills 不再把它视为主要可索引落地页。请优先阅读上方评审结论,再决定是否继续查看上游仓库说明。

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

code-quality-check

安装 code-quality-check,这是一款面向AI agent workflows and automation的 AI Agent Skill。查看评审结论、使用场景与安装路径。

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

代码质量检查

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

快速执行

完整检查流程

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/

相关技能

寻找 code-quality-check 的替代方案 (Alternative) 或可搭配使用的同类 community Skill?探索以下相关开源技能。

查看全部

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

333.8k
0
AI

widget-generator

Logo of f
f

为prompts.chat的信息反馈系统生成可定制的插件小部件

149.6k
0
AI

flags

Logo of vercel
vercel

React 框架

138.4k
0
浏览器

pr-review

Logo of pytorch
pytorch

Python中具有强大GPU加速的张量和动态神经网络

98.6k
0
开发者工具