with one click
python-foundational
Foundational Python best practices, idioms, and code quality fundamentals
Menu
Foundational Python best practices, idioms, and code quality fundamentals
WAI-ARIA Authoring Practices Guide (APG) design pattern knowledge base for accessibility assessment
W3C Making Content Usable for People with Cognitive and Learning Disabilities (COGA) knowledge base for accessibility assessment
European EN 301 549 V3.2.1 ICT Accessibility Standard knowledge base for accessibility assessment
US Section 508 ICT Accessibility Standards (revised 2017) knowledge base for accessibility assessment
WCAG 2.2 success criteria knowledge base for accessibility assessment
Shared work-item templates and conventions for ADO and GitHub backlog handoff across the RAI, Security, SSSC, and Accessibility planners
| name | python-foundational |
| description | Foundational Python best practices, idioms, and code quality fundamentals |
| license | MIT |
| user-invocable | false |
| metadata | {"authors":"microsoft/hve-core","spec_version":"1.0","last_updated":"2026-03-23"} |
Foundational Python excellence that every diff must satisfy. This skill is loaded first for any .py change. All higher-order skills build on it.
This content is a skill rather than an instructions file for three reasons: skills are distributed through the CLI plugin and VS Code extension without requiring consumers to copy files into their repo; new language skills can be added without modifying the review agent itself; and skills are loaded on demand, keeping the context window small when the diff contains no Python.
PascalCase classes, snake_case functions/variables, UPPER_SNAKE_CASE constants, _ private members.with for files, locks, DB connections.dataclass / NamedTuple / Enum for data holders.pathlib over os.path; timezone-aware datetime when relevant.* keyword-only arguments for multi-optional functions.global/nonlocal unless strictly required.TypeVar for generics.Any except in thin wrappers.except: (broad except Exception: only at app boundaries with logging).eval, exec, or pickle on untrusted data.print.| File | Covers | Purpose |
|---|---|---|
| design-principles.md | Section 9 | Rationale and examples for the design principles |
| code-style-patterns.md | Sections 1–5 | Concrete code examples for style, idioms, type safety, class design, and error handling |
| Severity | Definition |
|---|---|
| High | Causes incorrect behavior, data loss, or security exposure at runtime |
| Medium | Degrades maintainability, readability, or violates a project convention with no immediate runtime impact |
| Low | Cosmetic, stylistic, or minor improvement opportunity |
| Symptom | Check |
|---|---|
| Skill not loaded | Confirm the diff contains .py files. The agent selects skills by matching file types in the changed files against skill descriptions. |
| No findings generated | Verify the Skills Loaded footer in the review output lists python-foundational. If listed but no findings appear, the diff may already satisfy the checklist. |
| Severity seems miscalibrated | Compare against the Severity Rubric above. High requires runtime impact; medium is maintainability-only. |
Follow these conventions when extending this skill:
references/ and provide examples or rationale for the covered checklist items. Each reference file covers a contiguous range of sections. Update the References table when adding a new file.async-patterns.md). Include a frontmatter description that states which sections the file supports. Add a row to the References table in SKILL.md.🤖 Crafted with precision by ✨Copilot following brilliant human instruction, then carefully refined by our team of discerning human reviewers.