All skills
alffei avatar

/code-reviewer

@f00cf3b
by Andrew Chenalffei/skill_share68 stars
17

审查 Python 代码的质量、风格和常见缺陷。适用于用户提交代码要求审查、希望获得反馈或进行代码审计时。

  • 2 files
  • 2.4 KB
  • Updated 6 months ago
  • GitHub

Use this Skill: https://skilld.dev/gh/alffei/skill_share/code-reviewer

This session only. Nothing lands on disk.

referencesreview-checklist.md

≈314 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Python Code Review Checklist

Correctness (Severity: error)

  • No undefined variables or missing imports
  • No unreachable code after return/break/continue
  • Exception handling catches specific exceptions, not bare except:
  • No mutable default arguments (e.g. def f(x=[]) is a common bug)
  • Type annotations match actual usage

Style (Severity: warning)

  • Functions use snake_case, classes use PascalCase
  • Functions are under 30 lines (excluding docstrings)
  • No more than 5 parameters per function
  • No wildcard imports (from x import *)
  • Imports grouped: stdlib, third-party, local

Documentation (Severity: info)

  • Public functions have docstrings
  • Complex logic has inline comments explaining WHY
  • Module has a top-level docstring

Security (Severity: error)

  • No hardcoded secrets (passwords, API keys, tokens)
  • No dynamic code execution on user-supplied input
  • SQL queries use parameterized statements
  • File paths are validated against path traversal

Performance (Severity: info)

  • No unnecessary nested loops (O(n^2) when O(n) is possible)
  • Large data processed with generators, not lists
  • No repeated expensive operations inside loops

Source: SKILL.md on GitHub

No third-party reports yet.

Signed by skilld at f00cf3b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 6 months ago
metadata
{
  "pattern": "reviewer",
  "severity-levels": "error,warning,info"
}

README badge

README badge for alffei/skill_share/code-reviewer