# Lint

> Run shellcheck and actionlint on shell scripts and GitHub Actions workflows. Use before pushing or when fixing lint issues. Use when this capability is needed.

- Skill: `tomevault-io/lint-9` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/lint-9`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/lint-9/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/lint-9

---


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)

```bash
# 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)

```bash
# 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:
   ```bash
   # shellcheck disable=SC2034  # Variable used by sourcing script
   ```
3. **Report what was fixed** - Summarize the changes made

## Optional Guidance

$ARGUMENTS

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/aaddrick) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

