← Back to list

ruff-formatter
by frizzle-chan
MUDD: Multi User Dungeon (Discord)
⭐ 2🍴 0📅 Jan 24, 2026
SKILL.md
name: ruff-formatter description: >- Fix Python code formatting issues using the Ruff formatter. Use when: (1) Formatting errors are detected by ruff format --check, (2) Python files need to be formatted to match project style, (3) Pre-commit hooks or CI fail due to formatting issues.
Ruff Formatter
Fast Python code formatter, drop-in replacement for Black with >99.9% compatibility.
Quick Reference
# Format all files in current directory
ruff format .
# Format specific file(s)
ruff format path/to/file.py
# Check without modifying (CI/pre-commit)
ruff format --check .
# Show diff of what would change
ruff format --diff .
Fixing Formatting Issues
When ruff format --check fails:
- Run
ruff format .to auto-fix all formatting - Review changes with
git diff - Commit the formatted code
For import sorting issues, run linter first:
ruff check --select I --fix . # Sort imports
ruff format . # Then format
Format Suppression
Disable formatting for specific code:
# fmt: off
matrix = [
[1, 0, 0],
[0, 1, 0],
[0, 0, 1],
]
# fmt: on
x = 1 # fmt: skip
Configuration
In pyproject.toml or ruff.toml:
[tool.ruff.format]
quote-style = "double" # or "single"
indent-style = "space" # or "tab"
line-length = 88 # default
docstring-code-format = true
Exit Codes
- 0: Success (files formatted or already formatted)
- 1: With
--check: files need formatting - 2: Error (invalid config, CLI error)
Score
Total Score
65/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
1ヶ月以内に更新
+10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon
