python

Enforce Python coding conventions using ruff, type hints, pathlib, and defusedxml.

20|5|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/tale-project/tale --skill python-tale-project
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python
Source: https://github.com/tale-project/tale/tree/main/.claude/skills/python
Command: npx skills add https://github.com/tale-project/tale --skill python-tale-project

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The repository contains Python usage that is inconsistent and hard to maintain. This Skill defines and enforces the project's Python conventions, including formatting, typing discipline, and safe XML handling, to reduce bugs and improve readability.

Core Features & Use Cases

  • Consistent formatting: Enforces style via ruff for all Python code, with strict linting and formatting rules.
  • Strong typing: Promotes full type hints and modern typing practices to catch errors early.
  • Safe file handling: Encourages pathlib over os.path and uses defusedxml when parsing untrusted XML.
  • Examples & guidance: Applies rules to Python files under examples/default/skills/pptx/scripts and related sandbox code.

Quick Start

Run a quick check on a new or modified Python module to validate adherence to the repo's conventions.

Frequently Asked Questions about python

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce Python coding conventions for ruff formatting and type hints?

To enforce Python coding conventions, apply ruff-based linting and formatting rules to all Python sources, ensuring strict style adherence and full type hints across the codebase to catch errors early and improve readability.

What is the best way to replace os.path with pathlib in my Python code?

The best way to replace os.path is to enforce pathlib usage for safe file handling, promoting modern path manipulation practices over legacy os.path calls to maintain a consistent Python codebase.

How does defusedxml protect against untrusted XML parsing vulnerabilities?

Defusedxml protects against vulnerabilities by enforcing safe XML handling when parsing untrusted XML, mitigating external entity attacks and other security risks within your Python scripts.

Can I use this to validate Python scripts in a sandbox runtime?

Yes, you can validate Python scripts in a sandbox runtime by applying these convention rules to Python files under sandbox runtime usage and specific script directories to ensure adherence.

How do I check a modified Python module for repository convention compliance?

To check a modified Python module for repository convention compliance, run a quick validation on the file to ensure it meets formatting, typing, and safe XML handling requirements.