Token导航 LogoToken导航

Agent Skill · 研究检索

python-backend-reviewer(Python backend reviewer 搜索)

用于辅助 Python 项目开发、测试、依赖管理和常见框架工作流。它适合让 Agent 阅读 Python 代码、定位测试问题、整理运行命令、生成脚本或分析数据处理逻辑。使用时需要确认项目虚拟环境、依赖版本和测试入口;涉及执行脚本、读写文件、访问数据库或调用外部 API 时,应先明确运行目录和输入输出范围,避免误改生产数据。

python-backend-reviewer 是研究检索类 Agent Skill,可用宿主为 Local Agent,通过unknown获取,权限为需要联网;许可证信息还不明确,暂无第三方扫描结果,按安装量在研究检索类的 73,675 个 Skill 里排第 48,992。

总安装 667周安装 8下载 65核验 2026-05-01
研究检索需要联网unknown未标认证来源可访问许可证需确认审计未展示Local Agent

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
许可证
unknown

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:python-backend-reviewer(Python backend reviewer 搜索)
来源仓库:https://modelscope.cn
仓库路径:python-backend-reviewer
安装命令:
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

python-backend-reviewer 用于辅助 Python 项目开发、测试和依赖管理,适合在 Local Agent 中处理 Python 代码。适用于需要阅读 Python 代码、定位测试问题或分析数据处理逻辑的场景。使用时需确认项目虚拟环境、依赖版本和测试入口。

涉及执行脚本或读写文件时,应先明确运行目录和输入输出范围。当前分类为研究检索,主要服务于 Python 后端开发需求。

来源仓库内路径:python-backend-reviewer

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Local Agent;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    没有现成安装命令,按unknown的说明从来源页面获取,仓库路径是 python-backend-reviewer。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

python-backend-reviewer 怎么安装?

公开资料没有给出可以直接复制的命令,需要按来源页面说明手动安装,仓库内路径为 python-backend-reviewer。

python-backend-reviewer 支持哪些 AI 工具?

公开资料标注支持 Local Agent。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

python-backend-reviewer 需要什么权限?

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

python-backend-reviewer 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

python-backend-reviewer 用的人多吗?

公开数据是累计安装 667 次,近一周安装 8 次,下载 65 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

python-backend-reviewer 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 Local Agent 一种宿主,触发方式和使用习惯不用来回切换。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Local Agent,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
python-backend-reviewer

Python backend reviewer 搜索 · 本页

667—需要联网未明确未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Python Backend Code Reviewer

Expert analysis and refactoring of Python backend code to eliminate duplication, reduce complexity, and enforce best practices.

Overview

This skill helps identify and fix common issues in Python backend code, particularly problems introduced by AI code generation:

  • Duplicate code across multiple files
  • Recreated utilities instead of imports
  • Over-engineered solutions
  • High complexity functions and classes
  • Anti-patterns and code smells
  • Concurrency issues in async code (shared state mutation)

The skill provides automated analysis tools and comprehensive refactoring guidance.

⚠️ Architecture-Aware Prioritization

Static analysis finds issues, but architectural context determines priority.

Before prioritizing fixes, identify:

  1. Critical paths: Which code runs on every request?

- WebSocket/HTTP handlers - Main workflow orchestration - Shared services/middleware

  1. Secondary paths: Less critical code

- CLI tools - Scripts - Dev-only utilities - One-time migrations

  1. Concurrency model: How is state shared?

- Are handlers concurrent? - Are instances shared across requests? - Is there mutable singleton state?

Prioritization rule: Correctness in critical paths > Complexity in secondary paths

FindingCritical PathSecondary Path
Shared state mutation🔴 Fix immediately🟡 Review
High complexity (>25)🟡 Refactor carefully🟢 Backlog
Duplicates🟡 Extract if >3 occurrences🟢 Nice to have
God class🟡 Migrate to façade🟢 Low priority

Pragmatic Thresholds

For orchestration/workflow code, use realistic thresholds:

MetricStrict ThresholdPragmatic ThresholdNotes
Cyclomatic complexity1025Orchestrators naturally have decision points
Function length50 lines150 linesAsync flows can be longer
Nesting depth45Guard clauses help more than extracting
God class methods20N/AOK if it's a façade that delegates

Hard limits (always fix):

  • No functions > 300 lines
  • No nesting > 7 levels
  • No shared-state mutation without synchronization guard

Quick Start

1. Run Automated Analysis

Start with automated tools to identify issues:

# Detect duplicate code blocks
uv run python scripts/detect_duplicates.py <path>

# Analyze imports and utility reimplementation
uv run python scripts/analyze_imports.py <path>

# Check code complexity
uv run python scripts/complexity_analyzer.py <path>

# Check for concurrency issues (shared state mutation)
uv run python scripts/concurrency_analyzer.py <path>

2. Review Analysis Results

Each tool outputs:

  • Severity levels: Warnings (must fix) vs Info (should review)
  • File locations: Exact line numbers for each issue
  • Specific recommendations: What to change and why

3. Apply Fixes

Use the reference guides to refactor issues:

Main Workflows

Review a Python File

When a user asks to review a specific file:

  1. Run all analysis tools on the file: python scripts/detect_duplicates.py path/to/file.py python scripts/analyze_imports.py path/to/file.py python scripts/complexity_analyzer.py path/to/file.py
  2. Analyze results and categorize issues:

- Critical: Duplicates, high complexity, security issues - Important: Utility reimplementation, deep nesting - Minor: Style issues, minor inefficiencies

  1. Provide specific fixes:

- Quote exact code locations with line numbers - Show before/after examples - Explain why the change improves the code

  1. Offer to implement fixes if requested

Check Backend for Duplicates

When a user asks to check a project/module for duplicates:

  1. Run duplicate detection on the entire directory: python scripts/detect_duplicates.py src/
  2. Group duplicates by severity:

- High: 10+ lines duplicated, 3+ occurrences - Medium: 5-10 lines, 2+ occurrences - Low: Helper functions that could be extracted

  1. Recommend consolidation strategy:

- Extract to shared utilities for cross-cutting concerns - Create base classes for inherited behavior - Use decorators for repeated patterns

Analyze Module Over-Engineering

When code appears over-engineered:

  1. Run complexity analysis: python scripts/complexity_analyzer.py --max-complexity 10 --max-length 50 path/
  2. Identify over-engineering patterns:

- Premature abstractions (base classes with one implementation) - Excessive configuration options - God classes (20+ methods) - Deep inheritance hierarchies

  1. Suggest simplifications:

- Replace abstractions with simple functions - Remove unused configuration - Split god classes by responsibility - Flatten inheritance

  1. Reference specific patterns from python_antipatterns.md

Optimize Following Best Practices

When asked to optimize code or ensure best practices:

  1. Run all analysis tools to get baseline metrics
  2. Check against best practices:

- DRY principle violations - SOLID principle violations - Type hint coverage - Error handling patterns - Async/await consistency

  1. Prioritize optimizations:

- First: Correctness (bugs, security) - Second: Maintainability (duplicates, complexity) - Third: Performance (N+1 queries, inefficiencies) - Fourth: Style (naming, imports)

  1. Reference best_practices.md for specific guidelines

Analyze Concurrency Safety

When reviewing async code that handles concurrent requests:

  1. Run concurrency analysis: uv run python scripts/concurrency_analyzer.py services/ workflows/
  2. Prioritize by severity:

- Critical: Fix before production deployment - Warning: Review for actual sharing patterns - Info: Consider but often acceptable

  1. Common fixes for shared state mutation: # ❌ Before: Mutating shared instance state class Workflow: async def run(self, task): self.current_task = task # Race condition! # ✅ After: Request-scoped state class Workflow: async def run(self, task): execution = ExecutionContext(task=task) return await self._execute(execution)
  2. Alternative patterns:

- Pass state through parameters (preferred) - Use contextvars for request-scoped data - Use asyncio.Lock for truly shared state - Create new instances per request

Analysis Tools

detect_duplicates.py

Finds duplicate code blocks using AST analysis.

Usage:

uv run python scripts/detect_duplicates.py <path>
uv run python scripts/detect_duplicates.py --min-lines 10 <path>

Detects:

  • Duplicate functions (identical implementations)
  • Duplicate classes
  • Repeated code blocks

Options:

  • --min-lines N: Minimum lines for a block to be considered (default: 5)

analyze_imports.py

Analyzes import organization and detects recreated utilities.

Usage:

uv run python scripts/analyze_imports.py <path>

Detects:

  • Wildcard imports (from module import *)
  • Relative imports in non-package contexts
  • Functions that look like reimplemented utilities
  • Common patterns that should use libraries

Common utilities flagged:

  • JSON serialization → use json or orjson
  • Retry logic → use tenacity or backoff
  • Validation → use pydantic
  • HTTP clients → use requests or httpx

complexity_analyzer.py

Measures cyclomatic complexity, function length, and nesting depth.

Usage:

uv run python scripts/complexity_analyzer.py <path>
uv run python scripts/complexity_analyzer.py --max-complexity 10 --max-length 50 <path>

Metrics:

  • Cyclomatic complexity: Number of decision points (default threshold: 10)
  • Function length: Lines in function (default threshold: 50)
  • Nesting depth: Maximum levels of nested control structures (threshold: 4)
  • God classes: Classes with 20+ methods

Options:

  • --max-complexity N: Cyclomatic complexity threshold (default: 10)
  • --max-length N: Function length threshold (default: 50)

concurrency_analyzer.py

Detects concurrency issues in async Python code.

Usage:

uv run python scripts/concurrency_analyzer.py <path>

Detects:

  • Shared state mutation in async methods (self.x = y in async def)
  • Module-level mutable state (shared across requests)
  • Missing synchronization patterns
  • Potentially unsafe singleton patterns

Severity levels:

  • Critical: Mutation of shared state like client, session, agent, config
  • Warning: Any self.attr mutation in async context
  • Info: Module-level mutable objects

When to use: Run on services, handlers, and workflow code that handles concurrent requests.

Reference Documentation

python_antipatterns.md

Comprehensive catalog of anti-patterns with examples:

  • Code duplication patterns
  • Over-engineering examples
  • God objects
  • Complexity issues
  • Import problems
  • Error handling mistakes
  • Performance anti-patterns

Use when: You identify an issue but need to see the anti-pattern and solution

refactoring_patterns.md

Step-by-step refactoring techniques:

  • Extract function/variable
  • Consolidate duplicates
  • Simplify conditionals
  • Break up god classes
  • Reduce complexity
  • Improve imports

Use when: You know what's wrong and need concrete refactoring steps

best_practices.md

Python backend best practices and principles:

  • Core principles (DRY, SOLID)
  • Code organization
  • Type hints
  • Error handling
  • Async patterns
  • Database practices
  • API design
  • Security guidelines

Use when: Establishing coding standards or need authoritative guidance

Example Reviews

Example 1: Duplicate Validation Logic

User request: "Review this code for quality issues"

Analysis:

uv run python scripts/detect_duplicates.py api/

Finding: Email validation duplicated in 5 files

Recommendation:

# Extract to utils/validation.py
def validate_email(email: str) -> None:
    if not email or "@" not in email:
        raise ValueError("Invalid email")

# Import everywhere
from utils.validation import validate_email

Example 2: Recreated Retry Logic

User request: "Check if we're recreating utility functions"

Analysis:

uv run python scripts/analyze_imports.py services/

Finding: Custom retry logic in 3 services

Recommendation:

# Replace with tenacity
from tenacity import retry, stop_after_attempt, wait_exponential

@retry(stop=stop_after_attempt(3), wait=wait_exponential())
async def fetch_data(url: str):
    return await client.get(url)

Example 3: Complex Function

User request: "This function is hard to understand"

Analysis:

uv run python scripts/complexity_analyzer.py utils/processor.py

Finding: Complexity 23, nesting depth 6

Recommendation: Extract nested logic into helper functions (see refactoring_patterns.md)

When NOT to Refactor

⚠️ Avoid refactoring when:

  • No tests exist and can't be added
  • Close to deadline
  • Code won't be modified again
  • Would break public APIs without migration path

Output Format

When reviewing code, structure feedback as:

  1. Summary: Brief overview of findings
  2. Critical Issues: Must-fix problems (duplicates, security)
  3. Important Issues: Should-fix problems (complexity, utilities)
  4. Suggestions: Nice-to-have improvements
  5. Code Examples: Specific before/after for each issue
  6. Next Steps: Recommended action plan

Always include:

  • Exact file paths and line numbers
  • Severity level for each issue
  • Concrete code examples
  • References to patterns/practices when applicable

平台分布

Local Agent

73.5%
按下载量换算48

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills