mastering-python-skill
Modern Python coaching covering language foundations through advanced production patterns. Use when asked to "write Python code", "explain Python concepts"…
by SpillwaveSolutions★ 46 GitHub stars
Install mastering-python-skill in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Mastering Python Skill
Production-ready Python patterns with runnable code examples.
Contents
Workflow
Phase 1: Setup
Verify Python version
python --version # Require 3.10+, prefer 3.12+Create and activate virtual environment
python -m venv .venv && source .venv/bin/activateInstall dependencies
poetry install # or: pip install -r requirements.txt
Phase 2: Develop
Reference appropriate patterns:
- Types → type-systems.md
- Async → async-programming.md
- APIs → fastapi-patterns.md
- DB → database-access.md
Follow project structure from project-structure.md
Phase 3: Validate
Run quality checks
ruff check . && ruff format --check . mypy src/Run tests with coverage
pytest -v --cov=src --cov-report=term-missing
Phase 4: Deploy
Build and verify package
python -m build && twine check dist/*Deploy per docker-deployment.md or ci-cd-pipelines.md
Pre-Completion Checklist:
- [ ] All tests pass
- [ ] mypy reports no errors
- [ ] ruff check clean
- [ ] Coverage ≥80%
- [ ] No security warnings in dependencies
Reference Files
| Category | Files | Key Topics |
|---|---|---|
| Foundations | syntax-essentials, type-systems, project-structure, code-quality | Variables, type hints, generics, src layout, ruff, mypy |
| Patterns | async-programming, error-handling, decorators, context-managers, generators | async/await, exceptions, Result type, with statements, yield |
| Testing | pytest-essentials, mocking-strategies, property-testing | Fixtures, parametrize, unittest.mock, Hypothesis |
| Web APIs | fastapi-patterns, pydantic-validation, database-access | Dependencies, middleware, validators, SQLAlchemy async |
| Packaging | poetry-workflow, pyproject-config, docker-deployment | Lock files, PEP 621, multi-stage builds |
| Production | ci-cd-pipelines, monitoring, security | GitHub Actions, OpenTelemetry, OWASP, JWT |
See TOC.md for detailed topic lookup.
Sample CLI Tools
Runnable examples demonstrating production patterns:
| Tool | Demonstrates | Reference |
|---|---|---|
| async_fetcher.py | Async HTTP, rate limiting, error handling | async-programming.md |
| config_loader.py | Pydantic settings, .env files, validation | pydantic-validation.md |
| db_cli.py | SQLAlchemy async CRUD, repository pattern | database-access.md |
| code_validator.py | Run→check→fix with ruff and mypy | code-quality.md |
# Test examples
python sample-cli/async_fetcher.py https://httpbin.org/get
python sample-cli/config_loader.py --show-env
python sample-cli/db_cli.py init --sample-data && python sample-cli/db_cli.py list
python sample-cli/code_validator.py src/
When NOT to Use
- Non-Python languages: Use language-specific skills
- ML/AI model internals: Use PyTorch/TensorFlow skills
- Cloud infrastructure: Use AWS/GCP skills for infra (this covers code)
- Legacy Python 2: Focus is Python 3.10+
Allowed tools
Tools this skill is permitted to call.
- 01
Read - 02
Write - 03
Bash - 04
Edit
Bundled files
- .skilz-manifest.yaml
- TOC.md
- references/foundations/code-quality.md
- references/foundations/project-structure.md
- references/foundations/syntax-essentials.md
- references/foundations/type-systems.md
- references/packaging/docker-deployment.md
- references/packaging/poetry-workflow.md
- references/packaging/pyproject-config.md
- references/patterns/async-programming.md
- references/patterns/context-managers.md
- references/patterns/decorators.md
- references/patterns/error-handling.md
- references/patterns/generators.md
- references/production/ci-cd-pipelines.md
- references/production/monitoring.md
- references/production/security.md
- references/testing/mocking-strategies.md
- references/testing/property-testing.md
- references/testing/pytest-essentials.md
- references/web-apis/database-access.md
- references/web-apis/fastapi-patterns.md
- references/web-apis/pydantic-validation.md
- sample-cli/README.md
- sample-cli/async_fetcher.py
- sample-cli/code_validator.py
- sample-cli/config_loader.py
- sample-cli/db_cli.py
FAQ
What does the mastering-python-skill skill do?
Modern Python coaching covering language foundations through advanced production patterns. Use when asked to "write Python code", "explain Python concepts", "set up a Python project", "configure Poetry or PDM", "write pytest tests", "create a FastAPI endpoint", "run uvicorn server", "configure alembic migrations", "set up logging", "process data with pandas", or "debug Python errors". Triggers on "Python best practices", "type hints", "async Python", "packaging", "virtual environments", "Pydantic validation", "dependency injection", "SQLAlchemy models".
How do I install the mastering-python-skill skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the mastering-python-skill skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…