senior-python-backend
Skill2 starsChanged 5 days agoMITView on GitHub
Use when designing, implementing, debugging, reviewing, or refactoring Python web backends with FastAPI, Django, Django REST Framework, or Flask, including routing, Pydantic or serializer validation, ORM queries (SQLAlchemy, Django ORM), migrations, auth, async I/O, background tasks (Celery, RQ), and API tests. For general Python code standards also see python-standard.
In this repository50 other files it gives its agents.
- angular-standardSkill
- business-analyst-standardSkill
- execute-browser-verifySkill
- execute-build-testSkill
- execute-debug-evidenceSkill
- execute-implementationSkill
- jira-ba-dev-test-flowSkill
- nestjs-standardSkill
- professional-slidesSkill
- python-standardSkill
- senior-angularSkill
- senior-api-designSkill
- senior-backend-engineerSkill
- senior-business-analystSkill
- senior-cicdSkill
- senior-cloud-serverSkill
- senior-code-reviewSkill
- senior-delivery-orchestratorSkill
- senior-designSkill
- senior-dockerSkill
- senior-dotnetSkill
- senior-flutterSkill
- senior-frontend-engineerSkill
- senior-git-workflowSkill
- senior-goSkill
- senior-java-springSkill
- senior-kubernetesSkill
- senior-manual-testingSkill
- senior-mongodbSkill
- senior-mysqlSkill
- senior-nestjsSkill
- senior-nextjsSkill
- senior-nodejsSkill
- senior-observabilitySkill
- senior-performanceSkill
- senior-postgresqlSkill
- senior-react-nativeSkill
- senior-reactSkill
- senior-redisSkill
- senior-refactoringSkill
- senior-securitySkill
- senior-sql-serverSkill
- senior-tech-leadSkill
- senior-technical-writingSkill
- senior-terraformSkill
- senior-test-automationSkill
- senior-test-engineerSkill
- senior-vueSkill
- solution-architect-standardSkill
- tester-standardSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Avoid N+1 queries (select_related/prefetch_related, SQLAlchemy selectinload/joinedload), paginate lists, and keep transactions short and …
- Distinctive: line 24
Write migrations that are safe for existing data and deployments: add nullable columns or defaults first, backfill separately, avoid long …
- Distinctive: line 25
Keep secrets in environment or a secret store.
- Distinctive: line 30
Run the project's formatter/linter (ruff, black, flake8), type checker (mypy/pyright) if configured, and pytest including API tests for …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Senior Python Backend
Role
Build Python web services with validated contracts, efficient ORM access, correct async boundaries, safe migrations, and enforced authorization.
Before Editing
- Inspect framework and version, project layout, settings and environment handling, ORM and migration tool (Alembic, Django migrations), validation layer (Pydantic, DRF serializers, marshmallow), auth mechanism, task queue, dependency manager, and test setup (pytest, pytest-django, httpx/TestClient).
- Trace the endpoint from router/view through dependencies or middleware, validation, permissions, service logic, ORM queries, external calls, and response schema.
- Reuse existing patterns; do not add a new framework layer, repository abstraction, or library for one endpoint.
Implementation Rules
- Validate all input with the project's schema layer and declare response models so internal fields never leak.
- Enforce authentication and object-level permissions in dependencies, permission classes, or decorators before side effects.
- Avoid N+1 queries (
select_related/prefetch_related, SQLAlchemyselectinload/joinedload), paginate lists, and keep transactions short and explicit (transaction.atomic, session scope). - In async frameworks, never call blocking I/O (sync DB drivers,
requests, heavy CPU) insideasync defhandlers; use async clients, a threadpool, or a sync route. - Write migrations that are safe for existing data and deployments: add nullable columns or defaults first, backfill separately, avoid long table locks.
- Keep secrets in environment or a secret store; set timeouts and retries on outbound HTTP; make background tasks idempotent with retry limits.
- Map errors to the project's error contract; never return raw tracebacks or ORM errors to clients.
Testing and Verification
Run the project's formatter/linter (ruff, black, flake8), type checker (mypy/pyright) if configured, and pytest including API tests for changed endpoints. Run migrations against a disposable database and check generated SQL for changed queries.
Review Checklist
- Are input and output schemas explicit, and is authorization object-level?
- Are queries bounded and free of N+1 behavior?
- Is async code free of blocking calls?
- Are migrations reversible or safe to roll forward under load?
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

