home / skills / oimiragieo / agent-studio / prioritize-python-3-10-features

prioritize-python-3-10-features skill

/.claude/skills/prioritize-python-3-10-features

This skill helps you prioritize Python 3.12+ features by auditing code, suggesting modern syntax, and refactoring for forward compatibility.

npx playbooks add skill oimiragieo/agent-studio --skill prioritize-python-3-10-features

Review the files below or copy the command above to add this skill to your agents.

Files (12)
SKILL.md
1.4 KB
---
name: prioritize-python-3-10-features
description: Prioritizes the use of new features available in Python 3.12 and later versions.
version: 1.0.0
model: sonnet
invoked_by: both
user_invocable: true
tools: [Read, Write, Edit]
globs: '**/*.py'
best_practices:
  - Follow the guidelines consistently
  - Apply rules during code review
  - Use as reference when writing new code
error_handling: graceful
streaming: supported
---

# Prioritize Python 3 10 Features Skill

<identity>
You are a coding standards expert specializing in prioritize python 3 10 features.
You help developers write better code by applying established guidelines and best practices.
</identity>

<capabilities>
- Review code for guideline compliance
- Suggest improvements based on best practices
- Explain why certain patterns are preferred
- Help refactor code to meet standards
</capabilities>

<instructions>
When reviewing or writing code, apply these guidelines:

- **Prioritize new features in Python 3.12+**.
  </instructions>

<examples>
Example usage:
```
User: "Review this code for prioritize python 3 10 features compliance"
Agent: [Analyzes code against guidelines and provides specific feedback]
```
</examples>

## Memory Protocol (MANDATORY)

**Before starting:**

```bash
cat .claude/context/memory/learnings.md
```

**After completing:** Record any new patterns or exceptions discovered.

> ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Overview

This skill helps developers prioritize and apply modern language features from Python 3.12 and later when reviewing or writing code. It focuses on promoting clearer, safer, and more idiomatic code by recommending newer syntax, standard-library enhancements, and typing improvements. The goal is actionable guidance that accelerates adoption of current Python capabilities without breaking existing compatibility constraints.

How this skill works

The skill analyzes Python source to identify places where newer constructs would simplify code or improve correctness, such as pattern matching, improved typing, new stdlib APIs, and performance-minded changes. It suggests replacements, explains trade-offs, and provides short refactor examples. It also flags compatibility risks and recommends minimal migration steps when necessary.

When to use it

  • When modernizing legacy Python codebases to take advantage of recent language improvements
  • During code reviews to encourage idiomatic use of Python 3.12+ features
  • When writing new modules where future-maintainability and clarity matter
  • When converting dynamic code to stronger typed interfaces using recent typing features
  • To evaluate trade-offs between convenience and backward compatibility

Best practices

  • Prefer clearer, standard constructs (e.g., structural pattern matching) over complex conditional chains when appropriate
  • Use new typing features and stdlib helpers to document intent and catch errors earlier
  • Recommend progressive migration: apply non-breaking enhancements first, delay breaking changes
  • Provide short, testable refactor examples and include compatibility notes
  • Prefer library and stdlib APIs introduced in recent versions for reliability and performance

Example use cases

  • Replace nested if/else logic with structural pattern matching to improve readability
  • Swap custom ad-hoc parsing code for newer stdlib utilities to reduce bugs
  • Migrate type comments and legacy annotations to modern typing syntax and features
  • Suggest using new context manager or high-performance APIs introduced in recent Python releases
  • Refactor format or f-string usage for clearer interpolation and safer localization

FAQ

Will recommendations break support for older Python versions?

Recommendations include compatibility notes; the skill favors progressive, non-breaking changes first and calls out when a change requires a minimum Python version.

Do you provide code examples for suggested refactors?

Yes. Each suggestion includes concise before/after snippets and a short rationale to help implement changes quickly.