Updated Oct 16, 2026

Utilities

Format one Python file with Black

black-format is a single-file Python formatting node powered by Black with fixed stable defaults.

Agent

overview

What black-format does

Read one Python source file and return a separate file formatted by Black with stable default style and an AST safety check. The default line-length target is 88; project configuration and the formatter cache are disabled. The Python input is parsed rather than executed.

Input is limited to 1 MiB and formatting to 60 seconds. Normalized .txt filenames work. Empty Python source is accepted; syntax/formatting errors fail without partial output. Notebooks and typing stubs are outside this contract.

Input or native processing failures fail the operation. The operation keeps the supplied source unchanged.

This operation uses 26.5.1. Upstream license: MIT. The source link identifies the program used by this node.

source github.com/psf/black/tree/26.5.1

use cases

Where black-format fits

Format a Python snippet

Return a formatted copy of one Python file.

Preserve the original source

Keep the original bytes while reviewing Black output.

Apply a fixed formatting style

Use stable defaults without importing a repository pyproject.toml.

reference

black-format inputs and flags

1 inputs
NameTypeFlagDescription
inputFILE--inputPython source file up to 1 MiB. Filename extension is irrelevant. Uses default 88-column style, ignores project config, and has a 60-second timeout.

Showing key inputs. black-format exposes 1 inputs in total.

example

Run black-format

black-format · command
/app/run.sh --input ./input.txt ./output
sample output
# Fixture café
def add(a, b=1):
    return a + b


values = {"a": 1, "b": [2, 3]}

guidance

Choosing black-format

Use Black for a formatted source artifact. The published ruff-check node reports Python lint diagnostics and does not expose Ruff format. Runtime tests require a test runner.

ruff-check

Reports Python lint diagnostics without formatting files.

faq

black-format questions

input: Python source file up to 1 MiB. Filename extension is irrelevant. Uses default 88-column style, ignores project config, and has a 60-second timeout.

Formatted Python. Native processing must succeed before an output artifact is returned.

Input is limited to 1 MiB and formatting to 60 seconds. Normalized .txt filenames work. Empty Python source is accepted; syntax/formatting errors fail without partial output. Notebooks and typing stubs are outside this contract.

Use Black for a formatted source artifact. The published ruff-check node reports Python lint diagnostics and does not expose Ruff format. Runtime tests require a test runner.

The image repository also contains a digest-bound source/notices artifact. Download it with oras pull docker.io/nenadzaric/skills-intel-black-format@sha256:443e9b45ef77d212be95c04112d36ab19b49b53b48b1e17291cfa614b11e28f3. The bundle includes the build recipe, licenses, copied notices and component-source directions. Bundle SHA256: a8a3493620c84696eb083caf6c7b14133be7279ee4bb9205900ae9db2f7caaa1. Follow its source directions for upstream archives and patches. Image and source/notices repository.

Run black-format yourself

The synthetic run checks formatted python. The excerpt shows exact text asserted by saved passing platform verifier; recovered from fixture assertion, not a newly downloaded artifact. The command shown is the container entrypoint with example paths, not a host-installed CLI command.

Facts on this page come from the live Trickest tool library.