asyncpg-detection
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.
Best use case
asyncpg-detection is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using asyncpg-detection should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/asyncpg-detection/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How asyncpg-detection Compares
| Feature / Agent | asyncpg-detection | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# AsyncPG Detection for FastAPI Projects 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. ## Detection Overview Scan FastAPI projects for asyncpg patterns including imports, connection management, queries, transactions, and error handling. Generate detailed reports with line numbers and conversion recommendations. ## Core Detection Patterns ### Import Detection Look for these import statements: - `import asyncpg` - `from asyncpg import` - `import asyncpg as pg` - `from asyncpg import Connection, Pool` ### Connection Patterns Identify these asyncpg connection approaches: - `asyncpg.connect()` calls - `asyncpg.create_pool()` usage - Manual connection string parsing - Environment-based connection configuration ### Query Patterns Detect these asyncpg execution methods: - `connection.fetch()` for SELECT queries - `connection.execute()` for INSERT/UPDATE/DELETE - `connection.fetchval()` for single values - `connection.fetchrow()` for single rows - `connection.iter()` for result iteration ## Usage Instructions To detect asyncpg usage in your FastAPI project: 1. **Run comprehensive scan**: Use the `/convert-asyncpg-to-sqlalchemy` command to scan all Python files in the project 2. **Analyze detection results**: Review the generated report for files containing asyncpg code 3. **Prioritize conversion**: Focus on files with the most asyncpg usage first 4. **Check for complex patterns**: Look for nested connections, transactions, and error handling that may require special attention ## Reporting Format The detection generates reports with: - **File list**: All files containing asyncpg imports - **Pattern analysis**: Specific asyncpg methods found - **Complexity assessment**: Files requiring manual intervention - **Conversion recommendations**: Suggested SQLAlchemy equivalents ## Additional Resources ### Reference Files - **`references/patterns-mapping.md`** - Complete asyncpg to SQLAlchemy pattern mapping - **`references/complex-cases.md`** - Handling of complex asyncpg scenarios - **`references/supabase-specific.md`** - Supabase-specific asyncpg patterns ### Examples - **`examples/detection-report.md`** - Sample detection output - **`examples/fastapi-project-structure.md`** - Example FastAPI project with asyncpg usage
Related Skills
performing-steganography-detection
Detect and extract hidden data embedded in images, audio, and other media files using steganalysis tools to uncover covert communication channels.
ai-writing-detection
Comprehensive AI writing detection patterns and methodology. Provides vocabulary lists, structural patterns, model-specific fingerprints, and false positive prevention guidance. Use when analyzing text for AI authorship or understanding detection patterns.
bio-metagenomics-amr-detection
Detect antimicrobial resistance genes using AMRFinderPlus, ResFinder, and CARD. Screen isolates and metagenomes for resistance determinants. Use when characterizing resistance profiles in clinical isolates, surveillance samples, or metagenomic data.
adb-screen-detection
Screen understanding with OCR and template matching for Android device automation
bgo
Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.
mcp-create-declarative-agent
Skill converted from mcp-create-declarative-agent.prompt.md
MCP Architecture Expert
Design and implement Model Context Protocol servers for standardized AI-to-data integration with resources, tools, prompts, and security best practices
mathem-shopping
Automatiserar att logga in på Mathem.se, söka och lägga till varor från en lista eller recept, hantera ersättningar enligt policy och reservera leveranstid, men lämnar varukorgen redo för manuell checkout.
math-modeling
本技能应在用户要求"数学建模"、"建模比赛"、"数模论文"、"数学建模竞赛"、"建模分析"、"建模求解"或提及数学建模相关任务时使用。适用于全国大学生数学建模竞赛(CUMCM)、美国大学生数学建模竞赛(MCM/ICM)等各类数学建模比赛。
matchms
Mass spectrometry analysis. Process mzML/MGF/MSP, spectral similarity (cosine, modified cosine), metadata harmonization, compound ID, for metabolomics and MS data processing.
managing-traefik
Manages Traefik reverse proxy for local development. Use when routing domains to local services, configuring CORS, checking service health, or debugging connectivity issues.
managing-skills
Install, find, update, and manage agent skills. Use when the user wants to add a new skill, search for skills that do something, check if skills are up to date, or update existing skills. Triggers on: install skill, add skill, get skill, find skill, search skill, update skill, check skills, list skills.