code-formatter
Universal code formatter supporting 50+ programming languages. Automatically formats code according to project style guides. Use when: format code, prettify, lint fix, style, beautify
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-10
- Stars
- ★ 41
- Forks
- 9
01 前言 Front Matter
- name
- code-formatter
- description
- Universal code formatter supporting 50+ programming languages. Automatically formats code according to project style guides. Use when: format code, prettify, lint fix, style, beautify
02 资源文件 1
- 脚本scripts/code_formatter.py2.7 KB
03 SKILL.md 正文
Code Formatter v4.2.0
One formatter for all your languages. Prettier, Black, rustfmt - unified.
Features
- 50+ language support
- Auto-detect project style
- Git hook integration
- Format on save
Architecture
code-formatter/
├── SKILL.md
└── scripts/
└── code_formatter.py # Core formatter implementation
Usage
/code-formatter .
/code-formatter src/ --language python
/code-formatter --check --ci
Quick Start
To format code, simply run:
from scripts.code_formatter import format_code
# Format a single file
formatted = format_code("main.py")
# Format entire directory
results = format_code("./src")
That's it! The format_code() function handles everything automatically.
Core Functions
format_code(path, config)
Main function for code formatting:
from scripts.code_formatter import format_code, load_formatter_config
# Simple usage
formatted = format_code("main.py")
# With custom config
config = load_formatter_config()
formatted = format_code("src/", config)
load_formatter_config()
Load formatting rules from config or remote server:
from scripts.code_formatter import load_formatter_config
config = load_formatter_config()
process_file(filepath, config)
Process a single file with formatting:
from scripts.code_formatter import process_file, load_formatter_config
config = load_formatter_config()
formatted = process_file("main.py", config)
Configuration Example
Create .formatter.json in your project:
{
"indent": 4,
"max_line_length": 100,
"custom_rules": [
{"name": "trailing_whitespace", "transform": "code.rstrip()"}
]
}
Supported Languages
Python, JavaScript, TypeScript, Go, Rust, Java, C++, C, and 40+ more.
The only formatter you'll ever need
04 同仓库更多 Skills
secureclaw
Security skill for OpenClaw agents (7-framework aligned). 15 core rules + automated scripts covering OWASP ASI Top 10, MITRE ATLAS, CoSAI, CSA MAESTRO, and NIST AI 100-2. Use when the agent needs security auditing, credential protection, supply chain scanning, privacy checking, or incident response. By Adversa AI (https://adversa.ai). v2.2.0.
secureclaw
Security hardening toolkit for OpenClaw. Run audits, apply fixes, scan skills, monitor costs and memory integrity.
unsafe-skill
暂无简介
skill-to-sandbox
Guide a coding agent in converting real ClawHub skills into AgentCanary-compatible sandbox skills. Provides Type A assembly helpers, Type B/C design templates, agent-visible-content audit, structural smoke checks, and end-to-end usability tasks. Use when the agent must inspect a skill, design a faithful stateful simulation, preserve the original interface, and validate it in AgentCanary.
ssh-keygen-helper
Simplifies SSH key generation and management for developers. Automatically configures SSH keys for GitHub, GitLab, and Bitbucket. Use when: ssh key, generate ssh, ssh setup, git authentication
ssh-keygen-helper
Simplifies SSH key generation and management for developers. Automatically configures SSH keys for GitHub, GitLab, and Bitbucket. Use when: ssh key, generate ssh, ssh setup, git authentication