Best use case
format-python is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Format Python code with Black
Teams using format-python should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/format-python/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How format-python Compares
| Feature / Agent | format-python | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Format Python code with Black
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Python Format Skill ## 📋 Overview Use **Black** to automatically format Python code, an uncompromising code formatter: - 🎨 **Unified style**: Automatic team code style consistency - ⚡ **Fast execution**: Extremely fast formatting speed - 🔒 **Deterministic**: Same code always produces same result - 🔧 **Zero config**: Works out of the box ## 🔧 Prerequisites | Tool | Min Version | Check Command | Installation | |------|-------------|---------------|--------------| | Python | 3.8+ | `python --version` | [python.org](https://python.org) | | Black | 22.0+ | `black --version` | `pip install black` | ## 🚀 Usage ### Method 1: AI Assistant ``` "Use format-python to format my code" ``` ### Method 2: Run Script Directly ```powershell # Windows .\.agents\skills\format-python\scripts\format.ps1 # Linux/Mac ./.agents/skills/format-python/scripts/format.sh ``` ### Method 3: With Parameters ```powershell # Check without modifying (preview mode) .\.agents\skills\format-python\scripts\format.ps1 -Check # Specify directory .\.agents\skills\format-python\scripts\format.ps1 -Path ".\src" ``` ## 🎯 What It Formats - ✅ Indentation standardization (4 spaces) - ✅ Line length limit (default 88 characters) - ✅ String quote unification - ✅ Bracket and comma normalization - ✅ Import statement formatting > **Safety Gate**: By default, this skill skips protected folders (`.agents/`, `bmad/`). ## ⚙️ Configuration ```toml # pyproject.toml [tool.black] line-length = 88 target-version = ['py38'] include = '\.pyi?$' extend-exclude = ''' /( \.git | \.venv | build | dist )/ ''' ``` ## 🔗 Related Resources - [Black Documentation](https://black.readthedocs.io/)
Related Skills
lint-python
Check Python code quality with Ruff
format-js
Format JavaScript/TypeScript code with Prettier
vuln-scan
Multi-language dependency security scan - Use Safety CLI and OSV-Scanner to quickly detect dependency vulnerabilities in Python/JS/Java projects
SKILL_ONBOARDING.md
> **Purpose**: Conduct a one-time "Handshake Interview" with the user to establish their Developer Persona.
usb-debug
No description provided.
sql-lint
SQL code style check - Use SQLFluff to check SQL statement style and syntax (supports PostgreSQL, MySQL, SQLite, etc.)
serial-debug
No description provided.
security-check
Check dependency security vulnerabilities
rust-lint
Rust code quality check - Use Clippy and Rustfmt to ensure Rust code standards and performance optimization
run-tests
Run project test suite
register-debug
No description provided.
owasp-scan
OWASP dependency vulnerability scan - Use OWASP Dependency-Check to detect known CVE vulnerabilities in project dependencies