Shfmt Formatting

🌐Community
by thebushidocollective · vlatest · Repository

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.

1

Run in terminal (recommended)

terminal
claude mcp add shfmt-formatting npx -- -y @trustedskills/shfmt-formatting
2

Or manually add to ~/.claude/settings.json

~/.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 shfmt to be installed and accessible in the environment.
  • The formatting is based on the default shfmt configuration; 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 HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
thebushidocollective
Installs
15

🌐 Community

Passed automated security scans.