Shfmt Formatting
Automatically formats Go code using `shfmt` to ensure consistent style and readability.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add shfmt-formatting npx -- -y @trustedskills/shfmt-formatting
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"shfmt-formatting": {
"command": "npx",
"args": [
"-y",
"@trustedskills/shfmt-formatting"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill provides Go code formatting using shfmt, a tool that formats shell scripts. It ensures consistent and readable shell script style, automatically applying standard formatting rules. The formatted output can be used to improve code quality and collaboration within projects involving shell scripting.
When to use it
- Automating Shell Script Formatting: When you need to quickly format a large number of shell scripts to adhere to a specific style guide.
- Ensuring Code Consistency: In team environments, this skill can be used to enforce consistent formatting across all shell scripts.
- Improving Readability: To make existing shell scripts easier to understand and maintain by applying clean and standardized formatting.
- Integrating into CI/CD Pipelines: Automatically format shell scripts as part of a continuous integration or continuous delivery process.
Key capabilities
- Formats Go code using
shfmt. - Enforces consistent shell script style.
- Provides formatted output for improved readability.
Example prompts
- "Format this shell script: [paste shell script here]"
- "Run shfmt on the following file: /path/to/my_script.sh"
- "Can you format this Go code?"
Tips & gotchas
- The skill requires
shfmtto be installed and accessible in the environment. - The formatting is based on the default
shfmtconfiguration; customization options might not be directly supported through prompts.
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.