python-code-review skill
Python kodlarını PEP8 uyumluluğu, tip güvenliği, asenkron desenler, hata yönetimi ve yaygın kodlama hataları açısından inceler.
- GitHub yıldızları
- 87
- Dosyalar
- 6
- Son commit
- 15 Eyl 2026
- Lisans
- Apache-2.0
- İzin verilen araçlar
- —
python-code-review skill ne işe yarar?
python-code-review bir agent skill'dir. Python kodlarını PEP8 uyumluluğu, tip güvenliği, asenkron desenler, hata yönetimi ve yaygın kodlama hataları açısından inceler.
Özet, skill'in SKILL.md dosyasından oluşturuldu.
python-code-review skilli hakkında
Bu SKILL, Python dosyalarının yapısal ve stil açısından doğruluğunu analiz etmenizi sağlar. Geliştiriciler; .py dosyalarını PEP8 uyumluluğu, tip güvenliği ve doğru asenkron desenler açısından denetlemek için bu aracı kullanır. Bir agent bu SKILL'i yüklediğinde, yüksek kaliteli uygulama sağlamak amacıyla kodu pep8-style.md, type-safety.md ve async-patterns.md gibi belirli referans dosyalarına göre inceler.
Araç; asenkron fonksiyonlardaki engelleyici çağrılar (blocking calls), eksik tip ipuçları veya hatalı istisna yönetimi gibi sorunları tespit eder. Gerçek hatalar ile tip tanımlanmamış kütüphaneler için Any kullanımı veya noqa yorumlarının kullanılması gibi geçerli desenler arasında ayrım yapar. Süreç, bulguların bağlama duyarlı kurallara göre doğrulanmasını ve sonuçlar sunulmadan önce zorunlu bir doğrulama protokolünden geçirilmesini gerektiren katı bir raporlama iş akışını takip eder.
Değişken varsayılan argümanları, doğru içe aktarma (import) gruplandırması ve doğru isimlendirme standartlarını kontrol ederek profesyonel bir kod tabanının korunmasına yardımcı olur. Tespit edilen her sorun için spesifik dosya yollarını ve satır numaralarını içeren ayrıntılı raporlar oluşturur.
Bir agent bununla neler yapabilir
- 1PEP8 uyumluluğunu denetleyinBir Python dosyasının standart girintileme, satır uzunluğu ve isimlendirme kurallarına uyup uymadığını kontrol edin.
- 2Tip güvenliğini doğrulayınTüm fonksiyon parametrelerinin ve dönüş tiplerinin uygun tip ipuçlarına sahip olduğundan emin olun.
- 3Asenkron darboğazları tespit edinAsenkron fonksiyonlar içindeki time.sleep veya requests gibi engelleyici çağrıları belirleyin.
Skill'in SKILL.md dosyasından yazılmıştır. Her kullanım durumu oradaki bir alıntı ile kontrol edilir.
python-code-review skill nasıl kurulur
Her komut, skill klasörünü istemcinin skills dizinine kopyalar. Yüklemek için istemciyi yeniden başlatın veya yeni bir oturum başlatın.python-code-review skill'ini Eklenti uygulamasına kur
/plugin marketplace add existential-birds/beagle /plugin install beagle-python@existential-birds
python-code-review skill'ini Claude Code uygulamasına kur
~/.claude/skills/python-code-review/SKILL.md
$ npx degit existential-birds/beagle/plugins/beagle-python/skills/python-code-review ~/.claude/skills/python-code-reviewpython-code-review skill'ini Claude Code (project) uygulamasına kur
.claude/skills/python-code-review/SKILL.md
$ npx degit existential-birds/beagle/plugins/beagle-python/skills/python-code-review .claude/skills/python-code-reviewpython-code-review skill'ini Codex uygulamasına kur
~/.agents/skills/python-code-review/SKILL.md
$ npx degit existential-birds/beagle/plugins/beagle-python/skills/python-code-review ~/.agents/skills/python-code-reviewpython-code-review skill'ini Gemini CLI uygulamasına kur
~/.gemini/skills/python-code-review/SKILL.md
$ npx degit existential-birds/beagle/plugins/beagle-python/skills/python-code-review ~/.gemini/skills/python-code-reviewpython-code-review skill'ini Claude.ai uygulamasına kur
npx degit existential-birds/beagle/plugins/beagle-python/skills/python-code-review python-code-review && zip -r python-code-review.zip python-code-review # claude.ai → Customize → Skills → + → Create skill → Upload a skill → python-code-review.zip
SKILL.md
GitHub'da görüntülePython Code Review
Quick Reference
| Issue Type | Reference |
|---|---|
| Indentation, line length, whitespace, naming | references/pep8-style.md |
| Missing/wrong type hints, Any usage | references/type-safety.md |
| Blocking calls in async, missing await | references/async-patterns.md |
| Bare except, missing context, logging | references/error-handling.md |
| Mutable defaults, print statements | references/common-mistakes.md |
Review Checklist
PEP8 Style
- 4-space indentation (no tabs)
- Line length ≤79 characters (≤72 for docstrings/comments)
- Two blank lines around top-level definitions, one within classes
- Imports grouped: stdlib → third-party → local (blank line between groups)
- No whitespace inside brackets or before colons/commas
- Naming:
snake_casefor functions/variables,CamelCasefor classes,UPPER_CASEfor constants - Inline comments separated by at least two spaces
Type Safety
- Type hints on all function parameters and return types
- No
Anyunless necessary (with comment explaining why) - Proper
T | Nonesyntax (Python 3.10+)
Async Patterns
- No blocking calls (
time.sleep,requests) in async functions - Proper
awaiton all coroutines
Error Handling
- No bare
except:clauses - Specific exception types with context
-
raise ... fromto preserve stack traces
Common Mistakes
- No mutable default arguments
- Using
loggernotprint()for output - f-strings preferred over
.format()or%
Valid Patterns (Do NOT Flag)
These patterns are intentional and correct - do not report as issues:
- Type annotation vs type assertion - Annotations declare types but are not runtime assertions; don't confuse with missing validation
- Using
Anywhen interacting with untyped libraries - Required when external libraries lack type stubs - Empty
__init__.pyfiles - Valid for package structure, no code required noqacomments - Valid when linter rule doesn't apply to specific case- Using
cast()after runtime type check - Correct pattern to inform type checker of narrowed type
Context-Sensitive Rules
Only flag these issues when the specific conditions apply:
| Issue | Flag ONLY IF |
|---|---|
| Generic exception handling | Specific exception types are available and meaningful |
| Unused variables | Variable lacks _ prefix AND isn't used in f-strings, logging, or debugging |
Gates (reporting workflow)
Complete in order. Do not advance until each pass condition is met.
- Scope — Pass: You list every
.pypath (or explicit glob) you inspected this run. - False-positive screen — Pass: For each issue you plan to report, you checked Valid Patterns and Context-Sensitive Rules above; you drop or narrow the finding if those sections say not to flag it.
- Evidence — Pass: Each remaining finding includes
[FILE:LINE](or a bounded line range). Symbols or short verbatim snippets may supplement the location anchor but do not replace it. - Verification protocol — Pass: You load review-verification-protocol and complete its mandatory steps for each reported issue before the user-facing write-up.
- Ship — Pass: The user-visible output matches whatever structure that protocol requires (no issues-only dump that skips its checks).
When to Load References
- Reviewing code formatting/style → pep8-style.md
- Reviewing function signatures → type-safety.md
- Reviewing
async deffunctions → async-patterns.md - Reviewing try/except blocks → error-handling.md
- General Python review → common-mistakes.md
Review Questions
- Does the code follow PEP8 formatting (indentation, line length, whitespace)?
- Are imports properly grouped (stdlib → third-party → local)?
- Do names follow conventions (snake_case, CamelCase, UPPER_CASE)?
- Are all function signatures fully typed?
- Are async functions truly non-blocking?
- Do exceptions include meaningful context?
- Are there any mutable default arguments?
Before reporting: complete Gates (reporting workflow) above (especially gate 4).
Bu becerideki dosyalar
6python-code-review skill soruları
python-code-review skill'ini Claude Code uygulamasına nasıl kurarım?
npx degit existential-birds/beagle/plugins/beagle-python/skills/python-code-review ~/.claude/skills/python-code-review komutunu çalıştırın. Claude Code, skill'leri ~/.claude/skills (tüm projeler) veya .claude/skills (tek proje) konumundan yükler ve açıklaması görevle eşleştiğinde skill'i kullanır.
python-code-review skill'ini hangi istemciler kullanabilir?
Agent Skills biçimini okuyan her istemci: Claude Code, Codex, Gemini CLI ve claude.ai (ZIP olarak yükleyin). Skill içindeki betikler yalnızca istemcinin kod çalıştırmaya izin verdiği yerlerde çalışır.
Bu SKILL hangi spesifik Python stil kılavuzunu takip ediyor?
Bu SKILL; girintileme, satır uzunluğu, boşluk kullanımı ve isimlendirme standartları için PEP8 standartlarını takip eder.
'Any' tip ipucunu kullanmak ne zaman kabul edilebilir?
Tip stubs dosyası bulunmayan ve tip tanımlanmamış kütüphanelerle etkileşime girerken 'Any' kullanmak kabul edilebilir; ancak bunun nedenini açıklayan bir yorum satırı eklenmelidir.