Code Formatting Assistant
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @user_e5701557/code-auto-formatter.
About this skill
Problem it addresses
Inconsistent style, messy indentation, and basic syntax issues slow down review and maintenance. @user_e5701557/code-auto-formatter is aimed at explicitly targeted project files, combining formatting, style normalization, and initial checks in one workflow.
How it works
The skill operates from a file path or a clear formatting request:
- Language detection: identifies Java, Python, C++, SQL, and applies the matching rules.
- Style normalization: adjusts indentation, line breaks, spacing, aligns brackets and comments, and standardizes naming.
- Basic checks: points out syntax errors, undefined variables, redundant statements, and suggests fixes.
- Report output: provides before/after comparison, a style score, and a list of optimization items for review.
Boundaries
It runs only when the user gives a path or explicit instruction, and confirms the language and style requirements first. It is not a bulk auto-scan tool for arbitrary directories and should not be used on critical system code. Edits produce backup files and logs for easier rollback and verification.
Use Cases
- Normalize desktop Java files for indentation, spacing, comments, and naming before handoff.
- Confirm language and style rules first, then fix Python script indentation and comment formatting.
- Review C++ module readability and locate inconsistent brackets, spacing, naming, and redundant lines.
- Check basic SQL syntax, undefined variables, and redundant statements, then compare before/after edits.
Best For
- Java backend engineers who need consistent indentation, naming, and comment style before committing.
- Engineers taking over Python scripts who need quick indentation, comment, and basic issue checks.
- C++ engineers responsible for module readability who need bracket, spacing, and naming alignment.
- Engineers reviewing SQL scripts who need to locate syntax issues, undefined variables, and redundant lines.
Related Skills
A one-shot coding agent built on Claude Code CLI that runs non-interactively, supports a specified workdir, and can be monitored in the foreground or background.
Preview and confirm file sorting by extension, with recursive cleanup, ignore rules, and transactional rollback.
An engineering assistant for static HTML/CSS/JS pages, design-token extraction, IE8-compatible review, and structured delivery.
An engineering workflow for requirement analysis, scenario modeling, risk planning, quality gates, testing, and knowledge capture, with lightweight, standard, and full modes.