unifiles-mcp: Skill for Cursor

.cursor/skills/code-quality-check/SKILL.md

code-quality-check is a skill for Cursor from Asheng008/unifiles-mcp. It costs 50 tokens per session (1,115 once invoked), scanned A, original, MIT.

A code-quality checking workflow for Python projects using Black, Ruff, and Mypy. Black formats code, Ruff checks coding rules, and Mypy checks type annotations.

In plain words
What is it for?
Use it to format `src/` and `tests/`, apply Ruff fixes, and run type checks on `src/unifiles_mcp/`.
Why use it?
It catches formatting, style, and type problems and can automatically fix some issues before review or release.

Skill for Cursor

Written for Cursor: installed under .cursor/.

This is Asheng008/unifiles-mcp's own configuration. It tells Cursor how to work on unifiles-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything unifiles-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Asheng008/unifiles-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Asheng008/unifiles-mcp/main/.cursor/skills/code-quality-check/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Asheng008/unifiles-mcp

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-quality-check

README.md
[![agentmods](https://agentmods.dev/badge/skills/asheng008/unifiles-mcp/code-quality-check/github.svg)](https://agentmods.dev/skills/asheng008/unifiles-mcp/code-quality-check)
Your own site
<a href="https://agentmods.dev/skills/asheng008/unifiles-mcp/code-quality-check"><img src="https://agentmods.dev/badge/skills/asheng008/unifiles-mcp/code-quality-check/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-quality-check

Your own site · 80×15
<a href="https://agentmods.dev/skills/asheng008/unifiles-mcp/code-quality-check"><img src="https://agentmods.dev/badge/skills/asheng008/unifiles-mcp/code-quality-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,115 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.01115
Opus 5 $0.00025 $0.00558
Sonnet 5 $0.00010 $0.00223
Haiku 4.5 $0.00005 $0.00112

Measured 8d ago against content hash c89f9aabefab, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

code-quality-check scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/skills/code-quality-check/SKILL.md · 183 lines

How it starts

The opening of the file, as written. The whole thing — 183 lines — stays where its author put it; the contents beside it link to each section on GitHub.

代码质量检查

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

快速执行

完整检查流程

# 设置编码并激活环境
chcp 65001; [Console]::OutputEncoding = [System.Text.UTF8Encoding]::UTF8; .\.venv\Scripts\Activate.ps1

# 1. Black 格式化代码
black src/ tests/

# 2. Ruff 检查并自动修复
ruff check src/ tests/ --fix

# 3. Mypy 类型检查
mypy src/unifiles_mcp/

单独执行

Black 格式化
.\.venv\Scripts\Activate.ps1; black src/ tests/

检查但不修改:

.\.venv\Scripts\Activate.ps1; black src/ tests/ --check
Ruff 检查
.\.venv\Scripts\Activate.ps1; ruff check src/ tests/

自动修复:

.\.venv\Scripts\Activate.ps1; ruff check src/ tests/ --fix
Mypy 类型检查
.\.venv\Scripts\Activate.ps1; mypy src/unifiles_mcp/

工具配置

Black 配置

项目配置在 pyproject.toml

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

Ruff 配置

项目配置在 pyproject.toml

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

Mypy 配置

项目配置在 pyproject.toml

[tool.mypy]
python_version = "3.10"
warn_return_any = true
disallow_untyped_defs = true
disallow_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 通过或仅剩预期忽略项
  • 所有类型注解完整
  • 无未使用的导入
  • 代码符合项目规范

Read the full file on GitHub · 183 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 183 lines · 50 tokens per session scan A c89f9aabefab

Subscribe to this mod's changes

code-quality-check is a skill published in the GitHub repository Asheng008/unifiles-mcp (0 stars, last pushed 5mo ago), licensed MIT. It adds 50 tokens to every session and 1,115 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.