# python-stinger

python-stinger is a skill for reviewing and refactoring Python code in modern projects using Django and FastAPI.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 96 repo stars
- Author: Legion Code Inc.
- License: AGPL-3.0-or-later · policy=link-only · description only; the file stays with the author
- Source: https://github.com/legioncodeinc/vibe-coding-tools/tree/HEAD/plugins/backend-and-desktop-tools/skills/python-stinger/SKILL.md
- Updated: 2026-10-18
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/python-stinger

## What it does

python-stinger steps in when you need help with Python code: reviewing a Django app, auditing ORM queries for N+1 problems, migrating from DRF to Django Ninja, configuring Celery and Channels, adopting types (Pydantic v2, pyright), setting up Ruff, or moving to uv. The skill embeds a set of principles—which tools to pick, which patterns to follow, where not to compromise.

On every invocation, it reads `pyproject.toml` (or `setup.cfg` / `requirements.txt` if uv hasn't landed yet), identifies the framework and project composition, then picks the matching guide from the stack. Hard rules: Django Ninja for new APIs (not DRF), Pydantic v2 at every boundary (requests, responses, webhooks), pyright on new code in strict mode, Ruff as a single tool replacing Black + isort + flake8, uv for dependency management. N+1 in queries is fixed via `select_related` and `prefetch_related`. Migrations are sacred: never edit an applied migration; for schema-with-data changes, use expand → backfill → contract. Async only where I/O-bound and ASGI is running; not by default. For outbound HTTP, use httpx, not `requests` or `aiohttp`.

## Install

### Claude Code (native platform)

1. **Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin marketplace add legioncodeinc/vibe-coding-tools
```
In the agent chat (not a shell):
```text
/plugin install backend-and-desktop-tools@wasp-nest
```
This installs the whole backend-and-desktop-tools plugin with all its skills

2. **Skills CLI (Vercel)**
```bash
npx skills add legioncodeinc/vibe-coding-tools --skill python-stinger -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/python-stinger/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/python-stinger/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add legioncodeinc/vibe-coding-tools --skill python-stinger -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/python-stinger/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add legioncodeinc/vibe-coding-tools --skill python-stinger -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/python-stinger/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install legioncodeinc/vibe-coding-tools plugins/backend-and-desktop-tools/skills/python-stinger
```

2. **Manually: put the files in place**
- File: `.github/skills/python-stinger/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add legioncodeinc/vibe-coding-tools --skill python-stinger -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/legioncodeinc/vibe-coding-tools --path plugins/backend-and-desktop-tools/skills/python-stinger
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/python-stinger/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/legioncodeinc/vibe-coding-tools/tree/HEAD/plugins/backend-and-desktop-tools/skills/python-stinger/SKILL.md

## When to use it
- spot N+1 queries and fix them with `select_related` or `prefetch_related`
- migrate an API from Django REST framework to Django Ninja
- set up Celery with task retries and idempotency
- review a Django application architecture and test suite
- plan type adoption (Pydantic v2, pyright) across an existing codebase

## Example prompts
- Audit this Django app for N+1 queries and memory overhead
- Help me migrate from DRF to Django Ninja: what's the order, what do I check
- Set up pytest with factory_boy and correct database state between tests

## Similar
- [django-python](https://affpapa.org/en/nevibecode/skills/django-python.md) — skill · 991 installs
- [Python Security Scan](https://affpapa.org/en/nevibecode/skills/python-security-scan.md) — skill · 553 installs
- [python-django-best-practices-cursorrules-prompt-fi](https://affpapa.org/en/nevibecode/rules/python-django-best-practices-cursorrules-prompt-fi.md) — rule · ★ 41178 repo stars
- [gravitas-python](https://affpapa.org/en/nevibecode/skills/gravitas-python.md) — skill · 419 installs
- [python-scaffold](https://affpapa.org/en/nevibecode/commands/python-scaffold.md) — command · ★ 42780 repo stars
- [python-development](https://affpapa.org/en/nevibecode/plugins/seth-hobson-python-development.md) — plugin · ★ 126 repo stars

From the same set: [legioncodeinc/vibe-coding-tools](https://affpapa.org/en/nevibecode/by/legioncodeinc/vibe-coding-tools.md) — 172 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
