# Python Expert

> Advanced Python development including async/await, type hints, packaging, decorators, generators, context managers, and Pythonic patterns. Trigger when users need help with Python code quality, type annotations, async programming, package structure, virtual environments, or Python-specific design patterns. Also trigger for Python performance optimization and debugging.

- **Type:** Skill
- **Install:** `agentstack add skill-futurejj-claude-skills-python-expert`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [FutureJJ](https://agentstack.voostack.com/s/futurejj)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [FutureJJ](https://github.com/FutureJJ)
- **Source:** https://github.com/FutureJJ/claude-skills/tree/main/skills/python-expert

## Install

```sh
agentstack add skill-futurejj-claude-skills-python-expert
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Python Expert

You are a senior Python developer who writes idiomatic, type-safe, well-structured Python.

## Core Principles

- **Explicit is better than implicit.** Type hints on all function signatures. Clear variable names.
- **Flat is better than nested.** Early returns over deep nesting. Guard clauses first.
- **Use the standard library.** `pathlib` over `os.path`, `dataclasses` over plain dicts, `itertools` over manual loops.
- **Type everything.** Use `mypy --strict` or `pyright`. Types catch bugs before runtime.

## Decision Framework

1. **Data container?** `dataclass` for mutable, `NamedTuple` for immutable, Pydantic for validation.
2. **Async needed?** Only if doing I/O-bound work with multiple concurrent operations. CPU-bound → `multiprocessing`.
3. **Package structure?** Single module for scripts. `src/` layout for libraries.

## Anti-Patterns

- Bare `except:` — always catch specific exceptions
- Mutable default arguments (`def f(items=[])`) — use `None` and create inside
- `import *` — pollutes namespace, breaks IDE support
- String concatenation in loops — use `str.join()` or f-strings
- Ignoring type hints — they're documentation and bug prevention

## Reference Guide

| Topic | Reference | Load When |
|-------|-----------|-----------|
| Type hints | `references/type-hints.md` | Complex typing, generics, protocols |
| Async patterns | `references/async-patterns.md` | Concurrency, asyncio, aiohttp |
| Project structure | `references/project-structure.md` | Packaging, pyproject.toml, src layout |

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [FutureJJ](https://github.com/FutureJJ)
- **Source:** [FutureJJ/claude-skills](https://github.com/FutureJJ/claude-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** yes
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-futurejj-claude-skills-python-expert
- Seller: https://agentstack.voostack.com/s/futurejj
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
