Skip to content
Back to skills

Python

ASecurity

Python — typed Python with mypy/pyright, packaging and dependency locking (uv, poetry), FastAPI services, async vs sync, data and ML code hygiene, testing with pytest, performance basics. Use for Python services, data and ML code (Python, FastAPI, typing, pytest, packaging).

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
ai-agentspythongofastapitestingapiperformance

Works with

  • api

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add vectora-os/kit --skill python --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectora-os-python/badge)](https://www.skillsdirectory.com/skills/vectora-os-python)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: python
description: Python — typed Python with mypy/pyright, packaging and dependency locking (uv, poetry), FastAPI services, async vs sync, data and ML code hygiene, testing with pytest, performance basics. Use for Python services, data and ML code (Python, FastAPI, typing, pytest, packaging).
metadata:
  category: languages-frameworks
---

# Python

## Purpose

Write Python that is typed, reproducible and testable.

**Use when:** Python services, scripts, ML code.

**Not for:** notebooks as production code.

## Inputs

- Code, environment.

## Outputs

- Typed code, locked dependencies, tests.

## Read first

- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "python"` for prior decisions, patterns and anti-patterns.

## Steps

1. **Env.** Lock dependencies; pin Python version.
   Done when builds are reproducible.
2. **Types.** Type hints and a type checker in CI.
   Done when type check passes.
3. **Structure.** Package code; keep notebooks for exploration only.
   Done when logic is importable and tested.
4. **Tests.** pytest with fixtures; property tests for data transforms.
   Done when critical code covered.

## Best practices

- Pydantic models at boundaries.
- Avoid blocking calls in async code.

## Common mistakes

- Mutable default arguments.
- Unpinned dependencies.

## Example

FastAPI inference service with pydantic schemas, uv lockfile, pyright strict, pytest for preprocessing.

## Reusable prompt

```text
Apply the Python skill (.agents/skills/python/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Review or structure the Python code: environment locking, typing, packaging and tests.
Return: Typed code, locked dependencies, tests..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.