返回顶部
s

sqlalchemy-code-review

Reviews SQLAlchemy code for session management, relationships, N+1 queries, and migration patterns. Use when reviewing SQLAlchemy 2.0 code, checking session lifecycle, relationship() usage, or Alembic migrations.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.1.0
安全检测
已通过
82
下载量
0
收藏
概述
安装方式
版本历史

sqlalchemy-code-review

# SQLAlchemy Code Review ## Quick Reference | Issue Type | Reference | |------------|-----------| | Session lifecycle, context managers, async sessions | [references/sessions.md](references/sessions.md) | | relationship(), lazy loading, N+1, joinedload | [references/relationships.md](references/relationships.md) | | select() vs query(), ORM overhead, bulk ops | [references/queries.md](references/queries.md) | | Alembic patterns, reversible migrations, data migrations | [references/migrations.md](references/migrations.md) | ## Review Checklist - [ ] Sessions use context managers (`with`, `async with`) - [ ] No session sharing across requests or threads - [ ] Sessions closed/cleaned up properly - [ ] `relationship()` uses appropriate `lazy` strategy - [ ] Explicit `joinedload`/`selectinload` to avoid N+1 - [ ] No lazy loading in loops (N+1 queries) - [ ] Using SQLAlchemy 2.0 `select()` syntax, not legacy `query()` - [ ] Bulk operations use bulk_insert/bulk_update, not ORM loops - [ ] Async sessions use proper async context managers - [ ] Migrations are reversible with `downgrade()` - [ ] Data migrations use `op.execute()` not ORM models - [ ] Migration dependencies properly ordered ## When to Load References - Reviewing session creation/cleanup → sessions.md - Reviewing model relationships → relationships.md - Reviewing database queries → queries.md - Reviewing Alembic migration files → migrations.md ## Review Questions 1. Are all sessions properly managed with context managers? 2. Are relationships configured to avoid N+1 queries? 3. Are queries using SQLAlchemy 2.0 `select()` syntax? 4. Are all migrations reversible and properly tested?

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 sqlalchemy-code-review-1775982683 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 sqlalchemy-code-review-1775982683 技能

通过命令行安装

skillhub install sqlalchemy-code-review-1775982683

下载 Zip 包

⬇ 下载 sqlalchemy-code-review v1.1.0

文件大小: 12.61 KB | 发布时间: 2026-4-13 12:09

v1.1.0 最新 2026-4-13 12:09
Version 1.1.0 of sqlalchemy-code-review adds a comprehensive reference and review checklist for SQLAlchemy 2.0 code practices.

- Introduced a clear description of skill usage and review focus areas.
- Added quick-reference links for common SQLAlchemy and Alembic issues.
- Included a detailed checklist for reviewing session management, relationships, queries, and migrations.
- Provided guidance on when to consult reference materials.
- Listed key review questions to help ensure code quality and best practices.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部