code-formatter
Multi-language code formatting and style enforcement with automatic linting fixes
Security Assessment
About code-formatter
The Code Formatter Skill is designed to automatically format and lint code across multiple programming languages, ensuring consistent style and adherence to project-specific guidelines. It solves the common problem of inconsistent code formatting in teams and legacy codebases, which can lead to reduced readability, higher maintenance costs, and integration challenges during collaboration. By automating formatting and linting, the skill minimizes the need for manual intervention and helps maintain a clean, standardized codebase, improving overall developer productivity and reducing friction in code reviews.
This skill offers a range of capabilities, including language detection based on file extensions, enforcement of popular style guides, and automatic linting fixes. It supports multiple languages such as JavaScript, TypeScript, Python, Go, Rust, JSON, YAML, Markdown, CSS/SCSS, and HTML. The skill integrates widely used formatters and linters, like Prettier, ESLint, Black, isort, autopep8, gofmt, rustfmt, and Clippy, applying automated fixes for common issues such as import sorting, semicolons, quotes, line length, and indentation. Additionally, it generates detailed reports of files modified, lines changed, and remaining issues requiring manual attention, ensuring transparency and traceability of formatting operations.
Target users include software developers, QA engineers, and DevOps teams looking to enforce consistent code style across projects. It is particularly useful before committing code, during pull request preparation, after code generation, or when adopting team-wide style standards. The skill also supports batch formatting of legacy code, making it suitable for large codebases. By integrating with other skills for PR authoring, memory hygiene, and test-first changes, it helps teams maintain coding standards, track adoption, and ensure test files remain consistent, ultimately fostering a more maintainable and collaborative development environment.
FAQ
Which programming languages are supported by this skill?
The skill supports JavaScript, TypeScript, Python, Go, Rust, JSON, YAML, Markdown, CSS/SCSS, and HTML.
Can I use this skill to check code formatting without modifying files?
Yes, the 'check' mode allows you to validate formatting and linting issues without changing the code, suitable for CI/CD pipelines.
Does the skill automatically fix all linting issues?
It applies safe automated fixes for common issues, but some manual intervention may still be required for complex or project-specific rules.
How does the skill determine formatting rules for a project?
It checks project-specific configuration files such as .prettierrc, .eslintrc, pyproject.toml, setup.cfg, .rustfmt.toml, or uses memory-stored preferences and sensible defaults.
Is the skill suitable for legacy codebases?
Yes, it can perform batch formatting and linting on legacy code to enforce consistent style across large projects.
Install code-formatter
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
benreceveur/claude-workflow-engine