📦 Sqlalchemy Code Review — 技能工具

v1.1.0

审查 SQLAlchemy 2.0 代码的会话生命周期、模型关系、N+1 查询及迁移模式,确保性能与一致性。

0· 90·1 当前·1 累计
anderskev 头像by @anderskev (Kevin Anderson)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/27
0
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill is an instruction-only SQLAlchemy code-review checklist and reference bundle whose requested resources and actions are consistent with its stated purpose.
评估建议
This skill is internally coherent and appears safe: it provides checklists and reference material for reviewing SQLAlchemy 2.0 code and asks for no credentials or installs. Before installing, consider: 1) provenance — the skill's source/homepage is unknown, so if you require provenance/auditability prefer skills from known authors; 2) when running the skill, the agent will need access to the codebase you want reviewed — grant repository access only to trusted agents; 3) verify the guidance match...
详细分析 ▾
用途与能力
Name/description (SQLAlchemy code review) match the provided instructions and internal reference files (sessions, relationships, queries, migrations). There are no unexpected environment variables, binaries, or config paths requested that would be unrelated to a code-review skill. Note: the skill's source/homepage are unknown, but that does not create an internal inconsistency.
指令范围
SKILL.md and the included reference files limit guidance to reviewing SQLAlchemy code (session lifecycle, relationship loading strategies, query patterns, Alembic migrations). The instructions do not direct the agent to read or exfiltrate system files, environment variables, or send data to external endpoints. They reference only the included docs and typical review questions.
安装机制
No install spec or code files that would be downloaded or executed; this is instruction-only, so nothing is written to disk or fetched during install. Lowest-risk install profile.
凭证需求
No required environment variables, secrets, or config paths are declared or referenced. The skill does not request credentials or other sensitive inputs beyond what a normal code reviewer would need.
持久化与权限
always:false and default invocation settings are used. The skill does not request permanent system presence or to modify other skills or system configs. It can be invoked autonomously (platform default), but there are no other privilege concerns.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.1.02026/3/27

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.

无害

安装命令

点击复制
官方npx clawhub@latest install sqlalchemy-code-review
镜像加速npx clawhub@latest install sqlalchemy-code-review --registry https://cn.longxiaskill.com

技能文档

Quick Reference

Issue TypeReference
Session lifecycle, context managers, async sessionsreferences/sessions.md
relationship(), lazy loading, N+1, joinedloadreferences/relationships.md
select() vs query(), ORM overhead, bulk opsreferences/queries.md
Alembic patterns, reversible migrations, data migrationsreferences/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

  • Are all sessions properly managed with context managers?
  • Are relationships configured to avoid N+1 queries?
  • Are queries using SQLAlchemy 2.0 select() syntax?
  • Are all migrations reversible and properly tested?
数据来源ClawHub ↗ · 中文优化:龙虾技能库