Skip to main content 首页 创作者 georgekhananaev claude-skills-vault code-quality
code-quality Multi-language code quality standards and review for TypeScript, Python, Go, and Rust. Enforces type safety, security, performance, and maintainability. Use when writing, reviewing, or refactoring code. Includes review process, checklist, and Python PEP 8 deep-dive.
跳到安装 Skills Marketplace 发现并探索由社区构建的 Agent Skills
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/georgekhananaev/claude-skills-vault --skill code-quality命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
下载 Zip 下载中... name code-quality description Multi-language code quality standards and review for TypeScript, Python, Go, and Rust. Enforces type safety, security, performance, and maintainability. Use when writing, reviewing, or refactoring code. Includes review process, checklist, and Python PEP 8 deep-dive. author George Khananaev replaces ["beautiful-code","code-reviewer","pep8"]
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
Intent Sections to Use Write code Core Rules + Language Standards + AI-Friendly Patterns Review PR Review Process + references/checklist.md + Severity Levels Setup CI Config Files + Scripts + Enforcement Strategy Python style references/python.md (full PEP 8 deep-dive)
Context loading: For deep reviews, read the relevant file for the language under review.
references/
Quick Reference Language Type Safety Linter Complexity TypeScript strict, no anyESLint + typescript-eslint max 10 Python mypy strict, PEP 484 Ruff + mypy max 10 Go staticcheck golangci-lint max 10 Rust clippy pedantic clippy + cargo-audit -
Severity Levels Level Description Action Critical Security vulnerabilities, data loss Block merge Error Bugs, type violations, any Block merge Warning Code smells, complexity Must address Style Formatting, naming Auto-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
const bad : any = data;
const good : unknown = data;
const bad = data as User ;
const good = isUser (data) ? data : null ;
const bad = user!.name ;
const good = user?.name ?? '' ;
Python (PEP 8 / 3.11+) See: references/python.md
def bad (data ):
return data
def good (data: dict [str , Any ] ) -> list [str ]:
return list (data.keys())
value: str | None = None
items: list [str ] = []
Go
result, _ := doSomething()
result, err := doSomething()
if err != nil {
return fmt.Errorf("doing something: %w" , err)
}
Rust
let value = data.unwrap ();
let value = data?;
let value = data.unwrap_or_default ();
Cross-Language Standards
Structured Logging See: references/logging.md
logger.info ({ userId, action : 'login' }, 'User logged in' );
logger.info("user_login" , user_id=user_id)
log.Info().Str("user_id" , userID).Msg("user logged in" )
Test Coverage See: references/testing.md
Metric Threshold Line coverage 80% min Branch coverage 70% min New code 90% 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
Identify the language/framework
Understand the purpose of the code
Check for existing patterns in the codebase
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
git --no-pager diff --cached
git --no-pager show <commit>
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 Element TypeScript Python Go Rust Variables camelCase snake_case camelCase snake_case Functions camelCase snake_case camelCase snake_case Constants SCREAMING_SNAKE SCREAMING_SNAKE MixedCaps SCREAMING_SNAKE Types PascalCase PascalCase PascalCase PascalCase Files kebab-case snake_case lowercase snake_case
AI-Friendly Patterns
Explicit types always
Single responsibility per function
Small functions (< 30 lines ideal)
Max nesting depth 3
Guard clauses for early returns
Named constants, no magic values
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 Mode Trigger Behavior WIP Local commit Warnings only Push git push Errors block PR PR to main Full strict
Config Files
typescript/ - ESLint, tsconfig, Prettier
python/ - pyproject.toml, pre-commit
go/ - golangci.yaml
rust/ - clippy.toml
.pre-commit-config.yaml
.gitleaks.toml
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
同仓库更多 Skills Shapes how every reply to the user gets written - plain everyday words instead of corporate or AI-sounding phrasing, real sentences instead of bullet-heavy formatting, no forced dash punctuation, and at most a rare bit of dry humor when it genuinely fits. Use this for every conversational response written to the user in this project, not only on special request - check it before replying, the same way a person reads over their own message before hitting send.
Safety-first Firebase CLI (firebase-tools v15) skill for full project control — deploy, Hosting (sites/channels/rollback), Cloud Functions (+secrets), Firestore (databases/indexes/backups/delete), Realtime Database, Auth import/export, Remote Config, App Distribution, App Hosting, Extensions, Data Connect, Emulator Suite & MCP server. Classifies every command by risk tier via a deterministic classifier script and gates destructive/irreversible/cost-incurring ops behind AskUserQuestion confirmation; enforces the --non-interactive/--force contract so nothing hangs and nothing is auto-confirmed. Wrong-project preflight prevents deploying to prod by accident. Ships a 3-level self-test (static classifier battery, live read-only, guarded live-write w/ cleanup). Use when running, planning, or debugging any `firebase` command.
Run OpenAI Codex CLI for coding tasks, implementation, reviews, and second-opinion audits with mandatory task-based routing across GPT-5.6-or-newer models. Use when a user asks to run, ask, or use Codex; says "codex prompt"; wants a Codex code/logic/plan audit; or wants Claude to delegate work to OpenAI models. Inspect the live Codex model catalog, explicitly pin an eligible model and reasoning effort on every invocation, route clear high-volume work to Luna, everyday work to Terra, and difficult or high-value work to Sol. Use Sol with max reasoning for plan audits. Never invoke or fall back to GPT-5.5, GPT-5.4, GPT-5.3-Codex-Spark, OSS, or any model older than GPT-5.6.
georgekhananaev
georgekhananaev/claude-skills-vault
打开 GitHub 仓库