# Code Formatter

> 格式化源代码文件，支持Python、JavaScript、JSON等语言，使用行业标准格式化工具。

格式化源代码文件，支持Python、JavaScript、JSON等语言，使用行业标准格式化工具。

- Page: https://ss33.ai/skills/aidotnet/code-formatter-17515908362
- Publisher: aidotnet
- Category: [Software Development](https://ss33.ai/skills/category/software-development-t44z8z) › [Developer docs & tooling](https://ss33.ai/skills/category/software-development-t44z8z/developer-docs-and-tooling-nich6w)
- License: MIT
- Source: https://github.com/aidotnet/moyucode/blob/9fa0412ff1d57ca3216835637773ac975cae1009/skills/tools/code-formatter/SKILL.md

## Skill

SKILL.md: https://ss33.ai/api/v1/ss33/download/aidotnet/code-formatter-17515908362

# Code Formatter Tool

## Description
Format source code files using industry-standard formatters like Black for Python, with support for multiple languages.

## Trigger
- `/format` command
- User needs to format code
- User wants consistent code style

## Usage

```bash
# Format Python file
python scripts/code_formatter.py file.py

# Format with specific line length
python scripts/code_formatter.py file.py --line-length 100

# Format JSON
python scripts/code_formatter.py config.json

# Check without modifying
python scripts/code_formatter.py file.py --check

# Format directory
python scripts/code_formatter.py ./src/ --recursive
```

## Tags
`format`, `code`, `python`, `black`, `style`

## Compatibility
- Codex: ✅
- Claude Code: ✅
