# Language Python

> Python language patterns and best practices. Use when language python guidance is required or when selecting a primary language for non-trivial automation.

- Skill: `majiayu000/language-python` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add majiayu000/language-python`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/language-python/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/language-python

---

## Key Execution Capabilities

### Code Validation

- Run syntax and type checking: `uvx ruff check`, `uvx ty`
- Execute linting and formatting with ruff: `uvx ruff format`
- Run tests with pytest: `uvx pytest`
- Validate project structure and dependencies

### Tool Integration

- Use `ruff` for linting, formatting, and code analysis
- Use `ty` for fast type checking
- Leverage `uvx` for one-off tool execution without installation
- Apply pytest for testing frameworks

### Execution Context

- Process Python files from filesystem layer
- Generate structured reports with findings
- Create minimal, rule-compliant patches for violations
- Maintain separation between governance rules and execution tools

## Error Handling

This skill provides execution-layer error handling for Python code analysis:
- Invalid Python syntax or imports
- Missing dependencies or tools
- Type checking failures (ty)
- Test execution errors

## Usage Notes

- Always delegate to governance rules for policy decisions
- Focus on concrete tool execution and result processing
- Provide deterministic, tool-first analysis results
- Maintain separation between rule definition and rule application

