code-formatter
About
This Claude Skill automatically formats code across multiple languages using opinionated configurations and popular style guides. It detects file types, respects existing project configs when available, and reports all formatting changes made. Use it to quickly standardize code style in projects supporting JavaScript, Python, Go, Rust, Java, and CSS.
Documentation
Code Formatter Skill
Automatically format code across multiple languages with opinionated configurations.
Instructions
You are a code formatting expert. When invoked:
-
Detect Languages: Identify all code file types in the current directory or specified path
-
Check for Configs: Look for existing formatting configurations (.prettierrc, .editorconfig, pyproject.toml, etc.)
-
Apply Formatting: Format code according to:
- Existing project configuration (if found)
- Language-specific best practices (if no config exists)
- Popular style guides (e.g., PEP 8 for Python, StandardJS, Google Style Guide)
-
Report Changes: Summarize what was formatted and any style decisions made
Supported Languages
- JavaScript/TypeScript (Prettier)
- Python (Black, autopep8)
- Go (gofmt)
- Rust (rustfmt)
- Java (Google Java Format)
- CSS/SCSS/LESS
- HTML
- JSON/YAML
- Markdown
Usage Examples
@code-formatter
@code-formatter src/
@code-formatter --check-only
@code-formatter --language python
Formatting Rules
- Use 2 spaces for JavaScript/TypeScript/CSS
- Use 4 spaces for Python
- Use tabs for Go
- Maximum line length: 100 characters (unless project config specifies otherwise)
- Always use semicolons in JavaScript (unless project uses StandardJS)
- Single quotes preferred for JavaScript (unless project config says otherwise)
- Trailing commas in multi-line structures
Notes
- Always respect existing project configuration files
- Ask before modifying configuration files
- Never format generated code or vendor directories
- Skip binary files and lock files
Quick Install
/plugin add https://github.com/CuriousLearner/devkit/tree/main/code-formatterCopy and paste this command in Claude Code to install this skill
GitHub 仓库
Related Skills
sglang
MetaSGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.
Algorithmic Art Generation
MetaThis skill helps developers create algorithmic art using p5.js, focusing on generative art, computational aesthetics, and interactive visualizations. It automatically activates for topics like "generative art" or "p5.js visualization" and guides you through creating unique algorithms with features like seeded randomness, flow fields, and particle systems. Use it when you need to build reproducible, code-driven artistic patterns.
business-rule-documentation
MetaThis skill provides standardized templates for systematically documenting business logic and domain knowledge following Domain-Driven Design principles. It helps developers capture business rules, process flows, decision trees, and terminology glossaries to maintain consistency between requirements and implementation. Use it when documenting domain models, creating business rule repositories, or bridging communication between business and technical teams.
huggingface-accelerate
DevelopmentHuggingFace Accelerate provides the simplest API for adding distributed training to PyTorch scripts with just 4 lines of code. It offers a unified interface for multiple distributed training frameworks like DeepSpeed, FSDP, and DDP while handling automatic device placement and mixed precision. This makes it ideal for developers who want to quickly scale their PyTorch training across multiple GPUs or nodes without complex configuration.
