format-python

format-python is a skill for Claude Code from JSchOBL/agentic-ai-learning-journey. It costs 41 tokens per session (407 once invoked), scanned A, original, MIT.

A Python code-formatting guide that uses Black and isort to apply consistent spacing, line breaks, and import ordering.

In plain words
What is it for?
Use it to format selected Python files or a project’s Python files, then optionally run Ruff to report remaining code-quality issues.
Why use it?
It removes manual style cleanup and keeps formatting consistent with the project. It also separates safe formatting from potentially meaning-changing lint fixes.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to format selected Python files or a project’s Python files, then optionally run Ruff to report remaining code-quality issues.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jschobl/agentic-ai-learning-journey/format-python
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add JSchOBL/agentic-ai-learning-journey --skill format-python
Clone the repo
git clone --depth 1 https://github.com/JSchOBL/agentic-ai-learning-journey

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for format-python

README.md
[![agentmods](https://agentmods.dev/badge/skills/jschobl/agentic-ai-learning-journey/format-python/github.svg)](https://agentmods.dev/skills/jschobl/agentic-ai-learning-journey/format-python)
Your own site
<a href="https://agentmods.dev/skills/jschobl/agentic-ai-learning-journey/format-python"><img src="https://agentmods.dev/badge/skills/jschobl/agentic-ai-learning-journey/format-python/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for format-python

Your own site · 80×15
<a href="https://agentmods.dev/skills/jschobl/agentic-ai-learning-journey/format-python"><img src="https://agentmods.dev/badge/skills/jschobl/agentic-ai-learning-journey/format-python.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 407 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.00407
Opus 5.5 $0.00016 $0.00163
Sonnet 5.5 $0.00008 $0.00081
Haiku 4.5 $0.00004 $0.00041

Measured 1mo ago against content hash 9589df475d24, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

format-python scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

samples/skills/format-python/SKILL.md · 45 lines

What it actually says

Format Python Code

Format Python files to the project's style: Black with line length 88, isort using the Black profile.

Steps

  1. Determine scope. If the user named files, use those. If they said "the project" or gave no scope, use Glob with **/*.py, excluding .venv/, build/, and dist/.

  2. Check the tools exist before doing anything else:

    black --version && isort --version
    

    If either is missing, tell the user to run pip install black isort and stop. Do not format by hand-editing files — that defeats the purpose and produces inconsistent results.

  3. Sort imports first, then format. Order matters: Black reformats what isort produces, not the reverse.

    isort <paths> --profile black --line-length 88
    black <paths> --line-length 88
    
  4. Report what changed. Black prints a summary; pass it through rather than paraphrasing it.

  5. If the user asked about code quality rather than just formatting, add a lint pass:

    ruff check <paths>
    

    Report findings. Do not auto-fix lint issues unless asked — formatting is mechanical and safe, lint fixes are semantic and are not.

Constraints

  • Never format files outside the project directory.
  • Never format a file with unstaged changes without telling the user first. Black rewrites in place and there is no undo.
  • If Black fails on a file it is almost always a syntax error. Report the parse error rather than retrying.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 45 lines · 41 tokens per session scan A 9589df475d24

Subscribe to this mod's changes

format-python is a skill published in the GitHub repository JSchOBL/agentic-ai-learning-journey (3 stars, last pushed 2mo ago), licensed MIT. It adds 41 tokens to every session and 407 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

qector-architecture

QECTOR architecture overview: the Rust core / Python layer FFI boundary, the module map, the threading and memory models, the layering of services, and the bit-determinism guarantee. Load for any question about the engine's internals, where a class lives, how the GIL interacts with the decode call, or why batch decode…

GuillaumeLessard/qector-claude-plugin · 80 tokens

qector-pymatching-compat

The PyMatching-compatible shim in qector-decoder-v3 (manual 17.1). Covers qectordecoderv3.pymatchingcompat.Matching as a drop-in for pymatching.Matching, the supported methods (fromcheckmatrix, fromdetectorerrormodel, addedge, addboundaryedge, decode, decodebatch, decodetoedgesarray), the fact that it is backed by the…

GuillaumeLessard/qector-claude-plugin · 142 tokens

fix-unicode-decode

Diagnose and fix UnicodeDecodeError, UnicodeEncodeError, mojibake, and corrupted Chinese text in Codex coding tasks. Use when Python or another tool cannot decode a file or subprocess stream; Chinese text displays as replacement characters or strings such as "中文" or "涓枃"; file, terminal, CSV, JSON, HTTP, Git, or…

hachiwar/codex-skills · 104 tokens

unity-scripting

Unity 6 C# scripting guide. Use when writing MonoBehaviour scripts, handling lifecycle events (Awake, Start, Update, FixedUpdate), using coroutines or async/await (Awaitable), working with ScriptableObjects, events, delegates, or core APIs like Vector3, Quaternion, Time, Debug. Based on Unity 6.3 LTS documentation.

IdoCohen560/claude-unity-game-studio · 78 tokens

cloudflare-workers-multi-lang

Multi-language Workers development with Rust, Python, and WebAssembly. Use when building Workers in languages other than JavaScript/TypeScript, or when integrating WASM modules for performance-critical code.

secondsky/claude-skills · 45 tokens

ai-ml-development

AI and machine learning development with PyTorch, TensorFlow, and LLM integration. Use when building ML models, training pipelines, fine-tuning LLMs, or implementing AI features.

travisjneuman/.claude · 43 tokens