lint

GitHub

对项目中变更的 Shell 脚本和 GitHub Actions 工作流执行 lint 检查,修复发现的问题并报告结果。

.claude/skills/lint/SKILL.md aaddrick/claude-desktop-debian

Trigger Scenarios

Shell 脚本代码审查 GitHub Actions 工作流检查 提交前代码质量验证

Install

npx skills add aaddrick/claude-desktop-debian --skill lint -g -y
More Options

Non-standard path

npx skills add https://github.com/aaddrick/claude-desktop-debian/tree/main/.claude/skills/lint -g -y

Use without installing

npx skills use aaddrick/claude-desktop-debian@lint

指定 Agent (Claude Code)

npx skills add aaddrick/claude-desktop-debian --skill lint -a claude-code -g -y

安装 repo 全部 skill

npx skills add aaddrick/claude-desktop-debian --all -g -y

预览 repo 内 skill

npx skills add aaddrick/claude-desktop-debian --list

SKILL.md

Frontmatter
{
    "name": "lint",
    "description": "Run shellcheck and actionlint on shell scripts and GitHub Actions workflows. Use before pushing or when fixing lint issues."
}

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

Version History

  • 55478e3 Current 2026-08-20 14:08

Same Skill Collection

.claude/skills/setup-build-tools/SKILL.md
.claude/skills/simplify/SKILL.md

Metadata

Files
0
Version
55478e3
Hash
feca7500
Indexed
2026-08-20 14:08

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-26 03:56
浙ICP备14020137号-1 $방문자$