/install code-formatter199
\r \r
Description\r
This skill takes raw, poorly indented code and returns a nicely formatted, readable version following community standard style guides. It supports multiple languages and provides clear error messages when language is not recognized or code is invalid.\r \r
Supported Languages & Style Rules\r
- Python: PEP 8 – 4 spaces per indentation level; no unnecessary blank lines; single quotes preferred.\r
- JavaScript (JS): 2 spaces per level; semicolons optional but consistent;
{on same line.\r - TypeScript (TS): same as JavaScript, plus explicit return types for functions when possible.\r
- JSON: 2 spaces; no trailing commas; no comments; keys in double quotes.\r
- HTML: 2 spaces per level; inline elements should not be broken across lines; self-closing tags for void elements.\r
- CSS: 2 spaces; one selector per line; opening brace on same line; space after colon.\r
- Go: use
gofmtstyle – tabs for indentation (width 8); no extra spaces; consistent formatting.\r \r
Instructions\r
When the user provides a code snippet and specifies (or implies) a language:\r \r
- Detect or ask for language if not provided. Supported: python, javascript, typescript, json, html, css, go.\r
- Check for syntax errors – if the code is clearly invalid (e.g., unmatched braces, missing quotes), inform the user and suggest correction before formatting.\r
- Apply the corresponding style rules from above.\r
- Output the formatted code inside a Markdown code block with the correct language identifier.\r
- Add a brief explanation of what changes were made (e.g., "Added 2-space indentation and fixed spacing after commas").\r \r If the language is not supported, respond with: "Sorry, I don't support formatting for {language} yet. Supported languages: python, javascript, typescript, json, html, css, go."\r \r
Examples\r
\r
Example 1: Python\r
User: "Format this Python: def hello():print('world')"\r AI: \r
def hello():\r
print('world')
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install code-formatter199 - 安装完成后,直接呼叫该 Skill 的名称或使用
/code-formatter199触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
code-formatter199 是什么?
Format Python, JavaScript, TypeScript, JSON, HTML, CSS, and Go code snippets. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 56 次。
如何安装 code-formatter199?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install code-formatter199」即可一键安装,无需额外配置。
code-formatter199 是免费的吗?
是的,code-formatter199 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
code-formatter199 支持哪些平台?
code-formatter199 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 code-formatter199?
由 hahg199(@hahg199)开发并维护,当前版本 v1.0.0。