Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计异常

code-quality代码质量

Agent Skill

code-quality 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

259

周安装

11

GitHub Stars

20

下载量

91
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:code-quality(代码质量)
来源仓库:https://github.com/georgekhananaev/claude-skills-vault
仓库路径:skills/code-quality
安装命令:
npx skills add https://github.com/georgekhananaev/claude-skills-vault --skill code-quality
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/georgekhananaev/claude-skills-vault --skill code-quality

简介

code-quality 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。
  • 可结合来源仓库和原始 README 核验具体用法,通过 npx 命令安装。
  • 安装前建议确认权限范围、维护状态及是否会触发联网或文件操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Code Quality

Production-grade code standards and review for TypeScript, Python, Go, and Rust.

When to Use

  • Writing or reviewing code in TS/Python/Go/Rust
  • Code review or pull request analysis
  • Security or performance audit
  • Setting up linting/CI for a project
  • Python-specific style check (PEP 8)

Quick-Start Modes

IntentSections to Use
Write codeCore Rules + Language Standards + AI-Friendly Patterns
Review PRReview Process + references/checklist.md + Severity Levels
Setup CIConfig Files + Scripts + Enforcement Strategy
Python stylereferences/python.md (full PEP 8 deep-dive)

Context loading: For deep reviews, read the relevant references/ file for the language under review.

Quick Reference

LanguageType SafetyLinterComplexity
TypeScriptstrict, no anyESLint + typescript-eslintmax 10
Pythonmypy strict, PEP 484Ruff + mypymax 10
Gostaticcheckgolangci-lintmax 10
Rustclippy pedanticclippy + cargo-audit-

Severity Levels

LevelDescriptionAction
CriticalSecurity vulnerabilities, data lossBlock merge
ErrorBugs, type violations, anyBlock merge
WarningCode smells, complexityMust address
StyleFormatting, namingAuto-fix

Core Rules (All Languages)

Type Safety

  • No implicit any / untyped functions
  • No type assertions without guards
  • Explicit return types on public APIs

Security

  • No hardcoded secrets (use gitleaks)
  • No eval/pickle/unsafe deserialization
  • Parameterized queries only
  • SCA scanning (npm audit / pip-audit / govulncheck / cargo-audit)

Complexity

  • Max cyclomatic complexity: 10
  • Max function lines: 50
  • Max nesting depth: 3
  • Max parameters: 5

Error Handling

  • No ignored errors (Go: no _ for err)
  • No bare except (Python)
  • No unwrap in prod (Rust)
  • Wrap errors with context

Language-Specific Standards

TypeScript

See: references/typescript.md

// CRITICAL: Never use any
const bad: any = data;           // Error
const good: unknown = data;      // OK

// ERROR: No type assertions
const bad = data as User;        // Error
const good = isUser(data) ? data : null;  // OK

// ERROR: Non-null assertions
const bad = user!.name;          // Error
const good = user?.name ?? '';   // OK

Python (PEP 8 / 3.11+)

See: references/python.md

# CRITICAL: All functions must be typed
def bad(data):                   # Error
    return data

def good(data: dict[str, Any]) -> list[str]:  # OK
    return list(data.keys())

# Use modern syntax
value: str | None = None         # OK (not Optional)
items: list[str] = []            # OK (not List)

Go

See: references/go.md

// CRITICAL: Never ignore errors
result, _ := doSomething()       // Error
result, err := doSomething()     // OK
if err != nil {
    return fmt.Errorf("doing something: %w", err)
}

Rust

See: references/rust.md

// CRITICAL: No unwrap in production
let value = data.unwrap();        // Error
let value = data?;                // OK
let value = data.unwrap_or_default(); // OK

Cross-Language Standards

Structured Logging

See: references/logging.md

logger.info({ userId, action: 'login' }, 'User logged in');   // TS (pino)
logger.info("user_login", user_id=user_id)                    # Python (structlog)
log.Info().Str("user_id", userID).Msg("user logged in")       // Go (zerolog)

Test Coverage

See: references/testing.md

MetricThreshold
Line coverage80% min
Branch coverage70% min
New code90% min

Security Scanning

See: references/security.md

  • Secrets: gitleaks (pre-commit + CI)
  • Dependencies: npm audit / pip-audit / govulncheck / cargo-audit
  • Accessibility: jsx-a11y (TypeScript)
  • Race detection: go test -race (Go)

API Design

See: references/api-design.md

  • Proper HTTP status codes (200, 201, 204, 400, 401, 403, 404, 422, 429, 500)
  • RFC 7807 error format
  • Plural nouns for resources: /users/{id}/orders
  • Validate at API boundary

Database Patterns

See: references/database.md

  • Transactions for multi-write operations
  • N+1 prevention: eager load or batch
  • Safe migrations (expand-contract pattern)
  • Always paginate list queries

Async & Concurrency

See: references/async-concurrency.md

  • Always clean up resources (try/finally, defer, Drop)
  • Set timeouts on all async operations
  • Use semaphores for rate limiting
  • Avoid blocking in async contexts

Review Process

Step 1: Understand Context

  1. Identify the language/framework
  2. Understand the purpose of the code
  3. Check for existing patterns in the codebase
  4. Review any related tests

Step 2: Systematic Review

Use the checklist at references/checklist.md for thorough reviews covering:

  • Code quality (structure, naming, type safety, dead code)
  • Security (injection, auth, secrets, input validation)
  • Performance (N+1, memory leaks, caching, re-renders)
  • Error handling (edge cases, recovery, cleanup)
  • Testing (coverage, quality, assertions)
  • Best practices (SOLID, patterns, maintainability)

Step 3: Categorize & Report

**[SEVERITY] Issue Title**
- File: `path/to/file.ts:line`
- Problem: Clear description
- Impact: What could go wrong
- Fix: Specific code suggestion

Git Integration

# Review staged changes
git --no-pager diff --cached

# Review specific commit
git --no-pager show <commit>

# Review PR diff
gh pr diff <number>

Review Output Format

Use severity levels from the table above (Critical / Error / Warning / Style).

# Code Review Summary

## Overview
- Files reviewed: X
- Issues found: Y (X Critical, Y Error, Z Warning)
- Recommendation: [Approve / Request Changes / Needs Discussion]

## Critical Issues
[Security vulnerabilities, data loss - must fix]

## Error Issues
[Bugs, type violations - must fix]

## Warnings
[Code smells, complexity - should address]

## Style
[Formatting, naming - auto-fixable]

## Positive Observations
[Good practices found]

Naming Conventions

ElementTypeScriptPythonGoRust
VariablescamelCasesnake_casecamelCasesnake_case
FunctionscamelCasesnake_casecamelCasesnake_case
ConstantsSCREAMING_SNAKESCREAMING_SNAKEMixedCapsSCREAMING_SNAKE
TypesPascalCasePascalCasePascalCasePascalCase
Fileskebab-casesnake_caselowercasesnake_case

AI-Friendly Patterns

  1. Explicit types always
  2. Single responsibility per function
  3. Small functions (< 30 lines ideal)
  4. Max nesting depth 3
  5. Guard clauses for early returns
  6. Named constants, no magic values
  7. Linear, predictable execution flow

Enforcement Strategy

Progressive (Ratchet-Based)

Phase 1: Errors block, Warnings tracked
Phase 2: Strict on NEW files only
Phase 3: Strict on TOUCHED files
Phase 4: Full enforcement

WIP vs Merge Mode

ModeTriggerBehavior
WIPLocal commitWarnings only
Pushgit pushErrors block
PRPR to mainFull strict

Config Files

Available in configs/:

  • typescript/ - ESLint, tsconfig, Prettier
  • python/ - pyproject.toml, pre-commit
  • go/ - golangci.yaml
  • rust/ - clippy.toml
  • .pre-commit-config.yaml
  • .gitleaks.toml

Scripts

Available in scripts/:

  • check_changed.sh - Monorepo-aware incremental linting
  • check_all.sh - Full repository check
  • check_style.py - Python full check (ruff + pycodestyle + mypy)
  • check_pep8.sh - Quick PEP 8 only
  • check_types.sh - Python type hints only
  • fix_style.sh - Python auto-fix issues

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.87%
按下载量换算34

Claude

27.06%
按下载量换算25

Cursor

18.55%
按下载量换算17

Gemini CLI

9.69%
按下载量换算9

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills