clean

Lint and format shell scripts with shellcheck and shfmt.

2|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/SukbeomH/HExoskeleton --skill clean-sukbeomh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean
Source: https://github.com/SukbeomH/HExoskeleton/tree/main/.claude/skills/clean
Command: npx skills add https://github.com/SukbeomH/HExoskeleton --skill clean-sukbeomh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the need for consistent code quality and formatting across shell scripts, preventing errors and improving readability.

Core Features & Use Cases

  • Static Analysis: Utilizes shellcheck to identify potential bugs, syntax errors, and stylistic issues in shell scripts.
  • Code Formatting: Employs shfmt to automatically format shell scripts according to a consistent style (4-space indentation).
  • Use Case: Before committing new scripts or making significant changes, run this Skill to automatically catch and fix linting and formatting errors, ensuring a clean codebase.

Quick Start

Run the clean skill to check and fix all shell scripts in the current directory.

Frequently Asked Questions about clean

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check shell script quality and formatting across my codebase?

You can check shell script quality by running static analysis with shellcheck and formatting with shfmt across your codebase. This process identifies potential bugs, syntax errors, and ensures consistent 4-space indentation for improved readability.

What is the best way to lint shell scripts before a commit?

The best way to lint shell scripts before a commit is to run automated static analysis using shellcheck. This catches potential bugs and syntax errors early, ensuring a clean codebase and preventing formatting issues from reaching your repository.

Do I need shellcheck and shfmt installed to format shell scripts?

Yes, you need both shellcheck and shfmt installed for full functionality. Shellcheck handles static analysis to find bugs, while shfmt automatically formats your shell scripts according to a consistent style with 4-space indentation.

Can I use shfmt to automatically fix shell script formatting errors?

Yes, you can use shfmt to automatically format shell scripts and fix styling errors. It enforces consistent code formatting with 4-space indentation, addressing stylistic issues and improving readability across your project.

Why does shellcheck report syntax errors in my shell scripts?

Shellcheck reports syntax errors because it performs static analysis to identify potential bugs and stylistic issues in shell scripts. Running this check helps address code quality problems and prevents errors before committing new scripts.

When do I need to run shell script quality checks?

You need to run shell script quality checks before committing new scripts or making significant changes. This pre-commit quality gate uses shellcheck and shfmt to automatically catch and fix linting and formatting errors.