skills/performance-backend-python/SKILL.md
Optimize Python FastAPI backend performance with caching, response compression, pagination, async query optimization, and profiling. Use when: adding Redis/in-memory caching, GZip middleware, optimizing SQLAlchemy or Motor queries, implementing cursor/offset pagination, or profiling Python backend bottlenecks.
npx skillsauth add congiuluc/my-awesome-copilot performance-backend-pythonInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
selectinload() or joinedload() to avoid N+1 queries in SQLAlchemystructlog timing or py-spy| # | Check | Tool / Method |
|---|-------|---------------|
| 1 | All list endpoints accept skip/limit or cursor params | Code review |
| 2 | Read-only queries avoid loading full ORM objects | Code review |
| 3 | No N+1 queries (use eager loading strategies) | SQLAlchemy echo logging |
| 4 | GZipMiddleware enabled for responses > 500 bytes | Code review |
| 5 | Hot data cached in Redis with appropriate TTL | Code review |
| 6 | Cache invalidation on write operations | Code review |
| 7 | All I/O uses async def (no sync blocking in event loop) | Code review |
| 8 | Connection pool configured correctly (SQLAlchemy pool_size) | Config review |
| 9 | Database indexes on frequently queried columns | Schema review |
| 10 | No unbounded queries without LIMIT | Code review |
| 11 | JSON serialization uses orjson or ujson for speed | Config review |
| 12 | Background tasks use BackgroundTasks or task queues | Code review |
echo=True in create_async_enginepy-spy for CPU profiling: py-spy record -o profile.svg -- python main.pystructlog with timing middleware for request durationmemory_profiler for memory leak detectionlocust for load testinghttpx + pytest-benchmark for endpoint benchmarkstools
Build VS Code extensions with TypeScript. Covers extension anatomy, activation events, commands, tree views, webview panels, language features, testing, and publishing. Use when: creating a new VS Code extension, adding commands/views/providers, building webview UIs, implementing language server features, testing extensions, or packaging for the marketplace.
development
Track implementations, features, bugs, and releases in a versioning document. Use when: adding a commit, completing a feature, fixing a bug, or preparing a release. Automatically updates CHANGELOG.md following Keep a Changelog format and Semantic Versioning.
development
Write frontend tests using Vitest and React Testing Library. Use when: testing React components, hooks, user interactions, form submissions, accessibility assertions, or mocking API services.
development
Write Angular frontend tests using Jasmine, Karma, and Angular TestBed. Use when: testing Angular components, services, pipes, directives, user interactions, form submissions, accessibility assertions, or mocking HTTP services.