dockerfmt
БесплатноБез исполняемых скриптовНе проверенUse this skill when the user wants to format Dockerfiles, check Dockerfile formatting, or apply consistent style to Docker build files.
от javimosch★ 58 звёзд на GitHubОб этом скилле
dockerfmt Plugin
Modern Dockerfile formatter written in Go. Format Dockerfiles with configurable indentation, trailing newlines, and redirect spacing. Compatible with pre-commit hooks and CI pipelines.
Commands
Formatting
dockerfmt format file— Format Dockerfile(s)
Utility
dockerfmt self version— Print dockerfmt versiondockerfmt _ _— Passthrough to dockerfmt CLI
Usage Examples
- "Format this Dockerfile"
- "Check if all Dockerfiles are properly formatted"
- "Format all Dockerfiles in the project"
- "Apply consistent indentation to Dockerfiles"
Installation
go install github.com/reteps/dockerfmt@latest
Or use the Docker image:
docker run --rm -v $(pwd):/data reteps/dockerfmt Dockerfile
Examples
# Format a Dockerfile and print to stdout
dockerfmt format file Dockerfile
# Format in place (overwrite the file)
dockerfmt format file Dockerfile -w
# Format multiple Dockerfiles in place
dockerfmt format file Dockerfile.dev Dockerfile.prod -w
# Check if a Dockerfile is already formatted (CI-friendly)
dockerfmt format file Dockerfile -c
# Read from stdin and format
cat Dockerfile | dockerfmt _ _
# Format with 2-space indentation
dockerfmt format file Dockerfile -w -i 2
# Add trailing newline
dockerfmt format file Dockerfile -w -n
# Add spaces after redirect operators
dockerfmt format file Dockerfile -w -s
# Combine options: indent 2, newline, space redirects
dockerfmt format file Dockerfile -w -i 2 -n -s
Key Features
- Fast formatting — Written in Go for speed
- In-place editing —
-wflag to overwrite files - CI-friendly checking —
-cflag exits non-zero if not formatted - Configurable indentation —
-iflag for custom tab size (default: 4) - Trailing newline —
-nflag to end files with a newline - Redirect spacing —
-sflag for spaces after redirect operators - Pre-commit compatible — Works with pre-commit hooks
- Docker image available — Run without installing locally
- EditorConfig support — Respects EditorConfig settings
Notes
dockerfmtis a modern alternative todockfmt- Supports ignoring directives via comments in Dockerfiles
- Use
-cin CI pipelines to enforce formatting without modifying files - The formatter respects existing Dockerfile structure while applying consistent style
- Shell completions are available via
dockerfmt completion <shell>
Установить dockerfmt в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл dockerfmt?
Use this skill when the user wants to format Dockerfiles, check Dockerfile formatting, or apply consistent style to Docker build files.
Как установить скилл dockerfmt?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dockerfmt запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub