format-python

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 CodeCodex

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.

agentmods
npx agentmods add skills/jschobl/agentic-ai-learning-journey/format-python
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, Codex.

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. Scan, not verified.
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 $0.00041 $0.00407
Opus 5 $0.00020 $0.00204
Sonnet 5 $0.00008 $0.00081
Haiku 4.5 $0.00004 $0.00041

Measured 2d ago against content hash 9589df475d24, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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. 2d 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 1mo ago), licensed MIT. It adds 41 tokens to every session and 407 once invoked, about $0.0002 per session on Opus 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

swarm

Run a multi-agent audit of a codebase by spawning specialized parallel subagents (security, performance, tests, architecture, dead-code), then synthesize their findings into a single prioritized action plan. Use this whenever the user runs /swarm, asks to "audit the repo," "review this codebase," "find issues across…

Zintellix/Claude-Skills · 138 tokens

brainstorm

Guided game concept ideation — from zero idea to a structured game concept document. Uses professional studio ideation techniques, player psychology frameworks, and structured creative exploration.

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

self-review

Convergent multi-agent review of work you just produced — code, docs, configs, skills, plans, commit text, chat answers. Use after finishing any task that wrote or changed code, before reporting done (the Stop gate arms for code files only — prose, config, data and asset changes are reviewed on demand); whenever the…

HoussemDjeghri/self-review · 228 tokens

balance-check

Analyzes game balance data files, formulas, and configuration to identify outliers, broken progressions, degenerate strategies, and economy imbalances. Use after modifying any balance-related data or design. Use when user says 'balance report', 'check game balance', 'run a balance check'.

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

security-claude

Skill "security-claude" from rahozosman/security-claude, covering security architecture & threat modeling intelligence, how this skill is organized (progressive disclosure), 1. pick a mode, 2. core method (applies to every mode) and 3. doing a focused review.

rahozosman/security-claude · 0 tokens

bridger

Coordinate with another Claude Code session over the bridge — discover peers, ask them, answer their questions — INSTEAD of guessing or asking the user. Trigger this the moment the task depends on something another repo's session knows: a dependency/library that changed and this code consumes it, an API or schema…

HoussemDjeghri/bridger · 131 tokens