Skip to content

Add portable Python best-practices AI skill#1

Draft
dongnt97 wants to merge 1 commit into
mainfrom
cursor/python-best-practices-skill-12cf
Draft

Add portable Python best-practices AI skill#1
dongnt97 wants to merge 1 commit into
mainfrom
cursor/python-best-practices-skill-12cf

Conversation

@dongnt97

@dongnt97 dongnt97 commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a single, tool-agnostic AI skill that teaches any AI IDE/agent to write modern, idiomatic Python 3.10+.

The skill is plain Markdown with YAML front matter (Anthropic Agent Skills SKILL.md format), so it is portable across Claude/Claude Code, Cursor, GitHub Copilot, Windsurf, Codeium, Cline, Aider, and any agent that reads Markdown.

Files

  • skills/python-best-practices/SKILL.md — the skill content
  • skills/python-best-practices/README.md — how to enable it per tool

Topics covered

  • Type hints (PEP 484/585/604), Protocol, ParamSpec, generics
  • Dataclasses vs. Pydantic v2 (internal structs vs. validation boundaries)
  • Context managers (contextlib, ExitStack, async)
  • Generators / iterators / itertools
  • Decorator pattern (with functools.wraps + ParamSpec)
  • async/await with asyncio (TaskGroup, to_thread, timeouts)
  • Structural pattern matching (3.10+) with exhaustiveness checks
  • src/ project layout + py.typed
  • Dependency management with uv and Poetry (pyproject.toml, lock files)
  • PEP 8 + Black + Ruff + mypy + pre-commit config
  • General do/avoid anti-patterns checklist

Notes

  • Documentation-only change; no source code or build affected.
Open in Web Open in Cursor 

Co-authored-by: dongnt97 <dongnt97@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 90dd339d-dbb7-489c-92b3-5292ac6962d1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/python-best-practices-skill-12cf

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants