Shell scripts often contain subtle bugs and portability issues that are hard to catch manually. This skill provides comprehensive guidance on configuring and using ShellCheck to automatically detect and fix shell script problems.
تنزيل ZIP المهارة
رفع في Claude
اذهب إلى Settings → Capabilities → Skills → Upload skill
فعّل وابدأ الاستخدام
اختبرها
استخدام "shellcheck-configuration". How do I fix SC2086 in: for i in $list; do echo $i; done
النتيجة المتوقعة:
SC2086 warns about unquoted variables causing word splitting. Fix: use "$list" or "${list[@]}" for arrays. Corrected: for i in "$list"; do echo "$i"; done
استخدام "shellcheck-configuration". Create a .shellcheckrc for strict Bash validation
النتيجة المتوقعة:
Configuration that sets shell=bash, enables optional checks like require-variable-braces, and disables SC1091 (sourced files not found) as a project default.
استخدام "shellcheck-configuration". What are the most common ShellCheck errors to fix?
النتيجة المتوقعة:
Top 5: SC2086 (unquoted variables), SC1091 (sourced files), SC2154 (unset variables), SC2148 (tips), SC2164 (use cd with || exit). Each has specific fixes detailed in the skill.
التدقيق الأمني
آمنAll 111 static findings are false positives. The skill contains shell command examples used to demonstrate ShellCheck error codes (SC2086, SC1091, etc.). The scanner misidentified 'SC' as 'C2' keywords. URLs point to legitimate ShellCheck project resources. References to ~/.shellcheckrc and ~/.bashrc are standard config file paths, not malicious file access. The skill is purely educational documentation for ShellCheck static analysis tool.
مشكلات عالية المخاطر (1)
مشكلات متوسطة المخاطر (3)
مشكلات منخفضة المخاطر (1)
درجة الجودة
ماذا يمكنك بناءه
DevOps Engineer: CI/CD Pipeline Setup
Set up automated shell script linting in GitHub Actions, GitLab CI, or other CI/CD systems to catch issues before deployment.
Software Developer: Script Quality Improvement
Fix existing shell script errors and improve portability across different Unix/Linux environments using ShellCheck guidance.
System Administrator: Team Code Standards
Enforce consistent code quality standards across team scripts with project-level configuration and pre-commit validation.
جرّب هذه الموجهات
How do I install ShellCheck on macOS, Ubuntu, or from source?
What does ShellCheck error SC2086 mean and how do I fix it in my script?
Create a .shellcheckrc configuration file for a Bash project that enables strict checking but disables SC1091 and SC2119.
Show me how to integrate ShellCheck into a GitHub Actions workflow that checks all .sh files and fails the build if any issues are found.
أفضل الممارسات
- Run ShellCheck in CI/CD pipelines to catch issues before merging
- Configure the target shell correctly - do not analyze Bash scripts as POSIX sh
- Document why specific warnings are suppressed using inline directives
تجنب
- Disabling warnings without understanding why they appear
- Analyzing scripts for wrong shell dialect (Bash as sh)
- Ignoring ShellCheck output without addressing the underlying issue
الأسئلة المتكررة
What is ShellCheck?
How do I install ShellCheck?
What do ShellCheck error codes mean?
How do I suppress specific warnings?
Can ShellCheck catch security issues?
How do I integrate ShellCheck with my editor?
تفاصيل المطور
المؤلف
sickn33الترخيص
MIT
المستودع
https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/shellcheck-configurationمرجع
main
بنية الملفات
📄 SKILL.md