This skill should be used when the user asks to "detect asyncpg usage", "find asyncpg patterns", "scan for asyncpg imports", or "identify asyncpg database code in FastAPI projects". It automatically scans Python files to identify asyncpg imports, connection patterns, and query execution methods that need conversion to SQLAlchemy.
Automatically scans Python files to detect asyncpg imports, connection patterns, and query methods that need conversion to SQLAlchemy. Use when you ask to "detect asyncpg usage" or "scan for asyncpg patterns" in FastAPI projects.
/plugin marketplace add kivo360/claude-toolbelt/plugin install asyncpg-to-sqlalchemy-converter@claude-toolbeltThis skill inherits all available tools. When active, it can use any tool Claude has access to.
This skill provides comprehensive detection of asyncpg usage patterns in FastAPI applications, identifying all code that needs to be converted to SQLAlchemy with asyncpg engine support.
Scan FastAPI projects for asyncpg patterns including imports, connection management, queries, transactions, and error handling. Generate detailed reports with line numbers and conversion recommendations.
Look for these import statements:
import asyncpgfrom asyncpg importimport asyncpg as pgfrom asyncpg import Connection, PoolIdentify these asyncpg connection approaches:
asyncpg.connect() callsasyncpg.create_pool() usageDetect these asyncpg execution methods:
connection.fetch() for SELECT queriesconnection.execute() for INSERT/UPDATE/DELETEconnection.fetchval() for single valuesconnection.fetchrow() for single rowsconnection.iter() for result iterationTo detect asyncpg usage in your FastAPI project:
/convert-asyncpg-to-sqlalchemy command to scan all Python files in the projectThe detection generates reports with:
references/patterns-mapping.md - Complete asyncpg to SQLAlchemy pattern mappingreferences/complex-cases.md - Handling of complex asyncpg scenariosreferences/supabase-specific.md - Supabase-specific asyncpg patternsexamples/detection-report.md - Sample detection outputexamples/fastapi-project-structure.md - Example FastAPI project with asyncpg usageUse when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.