mcpField
L
lint

lint

github.com/aaddrickTesting & quality5.5k50 installsUpdated 1d ago
Repository

About lint

A project skill for linting changed shell scripts and GitHub Actions workflows. It runs ShellCheck and actionlint, guides fixes, and asks for a concise report of changes.

Key features

  1. 01Check changed shell scripts with ShellCheck
  2. 02Check changed workflows with actionlint
  3. 03Fix reported lint issues
  4. 04Use disable directives only as a last resort
  5. 05Summarize fixes

Use cases

  1. 01Review shell scripts changed from main
  2. 02Validate modified GitHub Actions workflows
  3. 03Resolve lint findings before reporting work

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aaddrick/claude-desktop-debian --skill lint

After installing, type/lintin Claude Code to confirm it loaded.

Details

From the project README

Run linting tools on shell scripts and GitHub Actions workflows in this project.

Your Task

Run the following checks on changed files (relative to main branch):

1. Shell Scripts (shellcheck)
# Find changed shell scripts
changed_scripts=$(git diff --name-only main...HEAD 2>/dev/null | grep -E '\.sh$')

# Run shellcheck on each
for script in $changed_scripts; do
    if [[ -f "$script" ]]; then
        shellcheck -f gcc "$script"
    fi
done
2. GitHub Actions Workflows (actionlint)
# Find changed workflow files
changed_workflows=$(git diff --name-only main...HEAD 2>/dev/null | grep -E '\.github/workflows/.*\.ya?ml$')

# Run actionlint on each
for workflow in $changed_workflows; do
    if [[ -f "$workflow" ]]; then
        actionlint "$workflow"
    fi
done

Handling Issues

When lint issues are found:

  1. Fix the issues - Correct the code to resolve warnings/errors
  2. Only use disable directives as a last resort - If a warning is a false positive or truly unavoidable, add a disable comment with explanation:
    # shellcheck disable=SC2034  # Variable used by sourcing script
    
  3. Report what was fixed - Summarize the changes made

Optional Guidance

$ARGUMENTS

Comments

Markdown supported