Code Format
Automatically formats code snippets to improve readability and adhere to specified style guides.
Install on your platform
We auto-selected Claude Code based on this skillβs supported platforms.
Run in terminal (recommended)
claude mcp add code-format npx -- -y @trustedskills/code-format
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"code-format": {
"command": "npx",
"args": [
"-y",
"@trustedskills/code-format"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill automatically formats code snippets provided to it, ensuring consistent style and readability. It can handle various programming languages and apply specific formatting rules based on user instructions or default configurations. The resulting formatted code is presented in a clean and organized manner, ready for use or further processing.
When to use it
- You have a block of code that needs to be reformatted to adhere to a particular style guide.
- You want to quickly clean up messy or inconsistently formatted code snippets.
- When sharing code with others and need to ensure everyone follows the same formatting conventions.
- To automatically format code generated by another AI agent, ensuring consistency across different tools.
Key capabilities
- Code Formatting
- Language Support (unspecified languages)
- Style Guide Application (unspecified styles)
Example prompts
- "Format this Python code:
def my_function(a,b): return a+ b" - "Please format the following JavaScript snippet." [followed by Javascript code]
- βCan you reformat this code to follow PEP8 guidelines?β [followed by Python code]
Tips & gotchas
The specific languages and formatting styles supported are not explicitly defined. Ensure that the AI agent has access to any necessary configuration files or style guides for optimal results.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates β what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
π Community
Passed automated security scans.