[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F1MFP7JD777SZRDF7S116F":3,"skill-same:01M6F1MFP7JD777SZRDF7S116F":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":54,"ownerHtmlUrl":55,"ownerBlogUrl":6,"ownerDescription":56,"updatedAt":57,"install":58,"resources":71},"01M6F1MFP7JD777SZRDF7S116F","shellcheck-configuration",null,"Master ShellCheck static analysis configuration and usage for shell script quality. Use when setting up linting infrastructure, fixing code issues, or ensuring script portability.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",66,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fwshobson\u002Fshellcheck-configuration\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"configuration","shellcheck configuration","ShellCheck","static analysis","infrastructure","code","issues","analysis","shell","quality","use","up","master","linting","script","2026-11-10 10:12:30",false,"---\nname: shellcheck-configuration\ndescription: Master ShellCheck static analysis configuration and usage for shell script quality. Use when setting up linting infrastructure, fixing code issues, or ensuring script portability.\n---\n\n# ShellCheck Configuration and Static Analysis\n\nComprehensive guidance for configuring and using ShellCheck to improve shell script quality, catch common pitfalls, and enforce best practices through static code analysis.\n\n## When to Use This Skill\n\n- Setting up linting for shell scripts in CI\u002FCD pipelines\n- Analyzing existing shell scripts for issues\n- Understanding ShellCheck error codes and warnings\n- Configuring ShellCheck for specific project requirements\n- Integrating ShellCheck into development workflows\n- Suppressing false positives and configuring rule sets\n- Enforcing consistent code quality standards\n- Migrating scripts to meet quality gates\n\n## ShellCheck Fundamentals\n\n### What is ShellCheck?\n\nShellCheck is a static analysis tool that analyzes shell scripts and detects problematic patterns. It supports:\n- Bash, sh, dash, ksh, and other POSIX shells\n- Over 100 different warnings and errors\n- Configuration for target shell and flags\n- Integration with editors and CI\u002FCD systems\n\n### Installation\n\n```bash\n# macOS with Homebrew\nbrew install shellcheck\n\n# Ubuntu\u002FDebian\napt-get install shellcheck\n\n# From source\ngit clone https:\u002F\u002Fgithub.com\u002Fkoalaman\u002Fshellcheck.git\ncd shellcheck\nmake build\nmake install\n\n# Verify installation\nshellcheck --version\n```\n\n## Configuration Files\n\n### .shellcheckrc (Project Level)\n\nCreate `.shellcheckrc` in your project root:\n\n```\n# Specify target shell\nshell=bash\n\n# Enable optional checks\nenable=avoid-nullary-conditions\nenable=require-variable-braces\n\n# Disable specific warnings\ndisable=SC1091\ndisable=SC2086\n```\n\n### Environment Variables\n\n```bash\n# Set default shell target\nexport SHELLCHECK_SHELL=bash\n\n# Enable strict mode\nexport SHELLCHECK_STRICT=true\n\n# Specify configuration file location\nexport SHELLCHECK_CONFIG=~\u002F.shellcheckrc\n```\n\n## Common ShellCheck Error Codes\n\n### SC1000-1099: Parser Errors\n```bash\n# SC1004: Backslash continuation not followed by newline\necho hello\\\nworld  # Error - needs line continuation\n\n# SC1008: Invalid data for operator `=='\nif [[ $var =  \"value\" ]]; then  # Space before ==\n    true\nfi\n```\n\n### SC2000-2099: Shell Issues\n\n```bash\n# SC2009: Consider using pgrep or pidof instead of grep|grep\nps aux | grep -v grep | grep myprocess  # Use pgrep instead\n\n# SC2012: Use `ls` only for viewing. Use `find` for reliable output\nfor file in $(ls -la)  # Better: use find or globbing\n\n# SC2015: Avoid using && and || instead of if-then-else\n[[ -f \"$file\" ]] && echo \"found\" || echo \"not found\"  # Less clear\n\n# SC2016: Expressions don't expand in single quotes\necho '$VAR'  # Literal $VAR, not variable expansion\n\n# SC2026: This word is non-standard. Set POSIXLY_CORRECT\n# when using with scripts for other shells\n```\n\n### SC2100-2199: Quoting Issues\n\n```bash\n# SC2086: Double quote to prevent globbing and word splitting\nfor i in $list; do  # Should be: for i in $list or for i in \"$list\"\n    echo \"$i\"\ndone\n\n# SC2115: Literal tilde in path not expanded. Use $HOME instead\n~\u002F.bashrc  # In strings, use \"$HOME\u002F.bashrc\"\n\n# SC2181: Check exit code directly with `if`, not indirectly in a list\nsome_command\nif [ $? -eq 0 ]; then  # Better: if some_command; then\n\n# SC2206: Quote to prevent word splitting or set IFS\narray=( $items )  # Should use: array=( $items )\n```\n\n### SC3000-3999: POSIX Compliance Issues\n\n```bash\n# SC3010: In POSIX sh, use 'case' instead of 'cond && foo'\n[[ $var == \"value\" ]] && do_something  # Not POSIX\n\n# SC3043: In POSIX sh, use 'local' is undefined\nfunction my_func() {\n    local var=value  # Not POSIX in some shells\n}\n```\n\n## Practical Configuration Examples\n\n### Minimal Configuration (Strict POSIX)\n\n```bash\n#!\u002Fbin\u002Fbash\n# Configure for maximum portability\n\nshellcheck \\\n  --shell=sh \\\n  --external-sources \\\n  --check-sourced \\\n  script.sh\n```\n\n### Development Configuration (Bash with Relaxed Rules)\n\n```bash\n#!\u002Fbin\u002Fbash\n# Configure for Bash development\n\nshellcheck \\\n  --shell=bash \\\n  --exclude=SC1091,SC2119 \\\n  --enable=all \\\n  script.sh\n```\n\n### CI\u002FCD Integration Configuration\n\n```bash\n#!\u002Fbin\u002Fbash\nset -Eeuo pipefail\n\n# Analyze all shell scripts and fail on issues\nfind . -type f -name \"*.sh\" | while read -r script; do\n    echo \"Checking: $script\"\n    shellcheck \\\n        --shell=bash \\\n        --format=gcc \\\n        --exclude=SC1091 \\\n        \"$script\" || exit 1\ndone\n```\n\n### .shellcheckrc for Project\n\n```\n# Shell dialect to analyze against\nshell=bash\n\n# Enable optional checks\nenable=avoid-nullary-conditions,require-variable-braces,check-unassigned-uppercase\n\n# Disable specific warnings\n# SC1091: Not following sourced files (many false positives)\ndisable=SC1091\n\n# SC2119: Use function_name instead of function_name -- (arguments)\ndisable=SC2119\n\n# External files to source for context\nexternal-sources=true\n```\n\n## Integration Patterns\n\n### Pre-commit Hook Configuration\n\n```bash\n#!\u002Fbin\u002Fbash\n# .git\u002Fhooks\u002Fpre-commit\n\n#!\u002Fbin\u002Fbash\nset -e\n\n# Find all shell scripts changed in this commit\ngit diff --cached --name-only | grep '\\.sh$' | while read -r script; do\n    echo \"Linting: $script\"\n\n    if ! shellcheck \"$script\"; then\n        echo \"ShellCheck failed on $script\"\n        exit 1\n    fi\ndone\n```\n\n### GitHub Actions Workflow\n\n```yaml\nname: ShellCheck\n\non: [push, pull_request]\n\njobs:\n  shellcheck:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions\u002Fcheckout@v3\n\n      - name: Run ShellCheck\n        run: |\n          sudo apt-get install shellcheck\n          find . -type f -name \"*.sh\" -exec shellcheck {} \\;\n```\n\n### GitLab CI Pipeline\n\n```yaml\nshellcheck:\n  stage: lint\n  image: koalaman\u002Fshellcheck-alpine\n  script:\n    - find . -type f -name \"*.sh\" -exec shellcheck {} \\;\n  allow_failure: false\n```\n\n## Handling ShellCheck Violations\n\n### Suppressing Specific Warnings\n\n```bash\n#!\u002Fbin\u002Fbash\n\n# Disable warning for entire line\n# shellcheck disable=SC2086\nfor file in $(ls -la); do\n    echo \"$file\"\ndone\n\n# Disable for entire script\n# shellcheck disable=SC1091,SC2119\n\n# Disable multiple warnings (format varies)\ncommand_that_fails() {\n    # shellcheck disable=SC2015\n    [ -f \"$1\" ] && echo \"found\" || echo \"not found\"\n}\n\n# Disable specific check for source directive\n# shellcheck source=.\u002Fhelper.sh\nsource helper.sh\n```\n\n### Common Violations and Fixes\n\n#### SC2086: Double quote to prevent word splitting\n\n```bash\n# Problem\nfor i in $list; do done\n\n# Solution\nfor i in $list; do done  # If $list is already quoted, or\nfor i in \"${list[@]}\"; do done  # If list is an array\n```\n\n#### SC2181: Check exit code directly\n\n```bash\n# Problem\nsome_command\nif [ $? -eq 0 ]; then\n    echo \"success\"\nfi\n\n# Solution\nif some_command; then\n    echo \"success\"\nfi\n```\n\n#### SC2015: Use if-then instead of && ||\n\n```bash\n# Problem\n[ -f \"$file\" ] && echo \"exists\" || echo \"not found\"\n\n# Solution - clearer intent\nif [ -f \"$file\" ]; then\n    echo \"exists\"\nelse\n    echo \"not found\"\nfi\n```\n\n#### SC2016: Expressions don't expand in single quotes\n\n```bash\n# Problem\necho 'Variable value: $VAR'\n\n# Solution\necho \"Variable value: $VAR\"\n```\n\n#### SC2009: Use pgrep instead of grep\n\n```bash\n# Problem\nps aux | grep -v grep | grep myprocess\n\n# Solution\npgrep -f myprocess\n```\n\n## Performance Optimization\n\n### Checking Multiple Files\n\n```bash\n#!\u002Fbin\u002Fbash\n\n# Sequential checking\nfor script in *.sh; do\n    shellcheck \"$script\"\ndone\n\n# Parallel checking (faster)\nfind . -name \"*.sh\" -print0 | \\\n    xargs -0 -P 4 -n 1 shellcheck\n```\n\n### Caching Results\n\n```bash\n#!\u002Fbin\u002Fbash\n\nCACHE_DIR=\".shellcheck_cache\"\nmkdir -p \"$CACHE_DIR\"\n\ncheck_script() {\n    local script=\"$1\"\n    local hash\n    local cache_file\n\n    hash=$(sha256sum \"$script\" | cut -d' ' -f1)\n    cache_file=\"$CACHE_DIR\u002F$hash\"\n\n    if [[ ! -f \"$cache_file\" ]]; then\n        if shellcheck \"$script\" > \"$cache_file\" 2>&1; then\n            touch \"$cache_file.ok\"\n        else\n            return 1\n        fi\n    fi\n\n    [[ -f \"$cache_file.ok\" ]]\n}\n\nfind . -name \"*.sh\" | while read -r script; do\n    check_script \"$script\" || exit 1\ndone\n```\n\n## Output Formats\n\n### Default Format\n\n```bash\nshellcheck script.sh\n\n# Output:\n# script.sh:1:3: warning: foo is referenced but not assigned. [SC2154]\n```\n\n### GCC Format (for CI\u002FCD)\n\n```bash\nshellcheck --format=gcc script.sh\n\n# Output:\n# script.sh:1:3: warning: foo is referenced but not assigned.\n```\n\n### JSON Format (for parsing)\n\n```bash\nshellcheck --format=json script.sh\n\n# Output:\n# [{\"file\": \"script.sh\", \"line\": 1, \"column\": 3, \"level\": \"warning\", \"code\": 2154, \"message\": \"...\"}]\n```\n\n### Quiet Format\n\n```bash\nshellcheck --format=quiet script.sh\n\n# Returns non-zero if issues found, no output otherwise\n```\n\n## Best Practices\n\n1. **Run ShellCheck in CI\u002FCD** - Catch issues before merging\n2. **Configure for your target shell** - Don't analyze bash as sh\n3. **Document exclusions** - Explain why violations are suppressed\n4. **Address violations** - Don't just disable warnings\n5. **Enable strict mode** - Use `--enable=all` with careful exclusions\n6. **Update regularly** - Keep ShellCheck current for new checks\n7. **Use pre-commit hooks** - Catch issues locally before pushing\n8. **Integrate with editors** - Get real-time feedback during development\n\n## Resources\n\n- **ShellCheck GitHub**: https:\u002F\u002Fgithub.com\u002Fkoalaman\u002Fshellcheck\n- **ShellCheck Wiki**: https:\u002F\u002Fwww.shellcheck.net\u002Fwiki\u002F\n- **Error Code Reference**: https:\u002F\u002Fwww.shellcheck.net\u002F\n","# ShellCheck Configuration and Static Analysis\n\nComprehensive guidance for configuring and using ShellCheck to improve shell script quality, catch common pitfalls, and enforce best practices through static code analysis.\n\n## When to Use This Skill\n\n- Setting up linting for shell scripts in CI\u002FCD pipelines\n- Analyzing existing shell scripts for issues\n- Understanding ShellCheck error codes and warnings\n- Configuring ShellCheck for specific project requirements\n- Integrating ShellCheck into development workflows\n- Suppressing false positives and configuring rule sets\n- Enforcing consistent code quality standards\n- Migrating scripts to meet quality gates\n\n## ShellCheck Fundamentals\n\n### What is ShellCheck?\n\nShellCheck is a static analysis tool that analyzes shell scripts and detects problematic patterns. It supports:\n- Bash, sh, dash, ksh, and other POSIX shells\n- Over 100 different warnings and errors\n- Configuration for target shell and flags\n- Integration with editors and CI\u002FCD systems\n\n### Installation\n\n```bash\n# macOS with Homebrew\nbrew install shellcheck\n\n# Ubuntu\u002FDebian\napt-get install shellcheck\n\n# From source\ngit clone https:\u002F\u002Fgithub.com\u002Fkoalaman\u002Fshellcheck.git\ncd shellcheck\nmake build\nmake install\n\n# Verify installation\nshellcheck --version\n```\n\n## Configuration Files\n\n### .shellcheckrc (Project Level)\n\nCreate `.shellcheckrc` in your project root:\n\n```\n# Specify target shell\nshell=bash\n\n# Enable optional checks\nenable=avoid-nullary-conditions\nenable=require-variable-braces\n\n# Disable specific warnings\ndisable=SC1091\ndisable=SC2086\n```\n\n### Environment Variables\n\n```bash\n# Set default shell target\nexport SHELLCHECK_SHELL=bash\n\n# Enable strict mode\nexport SHELLCHECK_STRICT=true\n\n# Specify configuration file location\nexport SHELLCHECK_CONFIG=~\u002F.shellcheckrc\n```\n\n## Common ShellCheck Error Codes\n\n### SC1000-1099: Parser Errors\n```bash\n# SC1004: Backslash continuation not followed by newline\necho hello\\\nworld  # Error - needs line continuation\n\n# SC1008: Invalid data for operator `=='\nif [[ $var =  \"value\" ]]; then  # Space before ==\n    true\nfi\n```\n\n### SC2000-2099: Shell Issues\n\n```bash\n# SC2009: Consider using pgrep or pidof instead of grep|grep\nps aux | grep -v grep | grep myprocess  # Use pgrep instead\n\n# SC2012: Use `ls` only for viewing. Use `find` for reliable output\nfor file in $(ls -la)  # Better: use find or globbing\n\n# SC2015: Avoid using && and || instead of if-then-else\n[[ -f \"$file\" ]] && echo \"found\" || echo \"not found\"  # Less clear\n\n# SC2016: Expressions don't expand in single quotes\necho '$VAR'  # Literal $VAR, not variable expansion\n\n# SC2026: This word is non-standard. Set POSIXLY_CORRECT\n# when using with scripts for other shells\n```\n\n### SC2100-2199: Quoting Issues\n\n```bash\n# SC2086: Double quote to prevent globbing and word splitting\nfor i in $list; do  # Should be: for i in $list or for i in \"$list\"\n    echo \"$i\"\ndone\n\n# SC2115: Literal tilde in path not expanded. Use $HOME instead\n~\u002F.bashrc  # In strings, use \"$HOME\u002F.bashrc\"\n\n# SC2181: Check exit code directly with `if`, not indirectly in a list\nsome_command\nif [ $? -eq 0 ]; then  # Better: if some_command; then\n\n# SC2206: Quote to prevent word splitting or set IFS\narray=( $items )  # Should use: array=( $items )\n```\n\n### SC3000-3999: POSIX Compliance Issues\n\n```bash\n# SC3010: In POSIX sh, use 'case' instead of 'cond && foo'\n[[ $var == \"value\" ]] && do_something  # Not POSIX\n\n# SC3043: In POSIX sh, use 'local' is undefined\nfunction my_func() {\n    local var=value  # Not POSIX in some shells\n}\n```\n\n## Practical Configuration Examples\n\n### Minimal Configuration (Strict POSIX)\n\n```bash\n#!\u002Fbin\u002Fbash\n# Configure for maximum portability\n\nshellcheck \\\n  --shell=sh \\\n  --external-sources \\\n  --check-sourced \\\n  script.sh\n```\n\n### Development Configuration (Bash with Relaxed Rules)\n\n```bash\n#!\u002Fbin\u002Fbash\n# Configure for Bash development\n\nshellcheck \\\n  --shell=bash \\\n  --exclude=SC1091,SC2119 \\\n  --enable=all \\\n  script.sh\n```\n\n### CI\u002FCD Integration Configuration\n\n```bash\n#!\u002Fbin\u002Fbash\nset -Eeuo pipefail\n\n# Analyze all shell scripts and fail on issues\nfind . -type f -name \"*.sh\" | while read -r script; do\n    echo \"Checking: $script\"\n    shellcheck \\\n        --shell=bash \\\n        --format=gcc \\\n        --exclude=SC1091 \\\n        \"$script\" || exit 1\ndone\n```\n\n### .shellcheckrc for Project\n\n```\n# Shell dialect to analyze against\nshell=bash\n\n# Enable optional checks\nenable=avoid-nullary-conditions,require-variable-braces,check-unassigned-uppercase\n\n# Disable specific warnings\n# SC1091: Not following sourced files (many false positives)\ndisable=SC1091\n\n# SC2119: Use function_name instead of function_name -- (arguments)\ndisable=SC2119\n\n# External files to source for context\nexternal-sources=true\n```\n\n## Integration Patterns\n\n### Pre-commit Hook Configuration\n\n```bash\n#!\u002Fbin\u002Fbash\n# .git\u002Fhooks\u002Fpre-commit\n\n#!\u002Fbin\u002Fbash\nset -e\n\n# Find all shell scripts changed in this commit\ngit diff --cached --name-only | grep '\\.sh$' | while read -r script; do\n    echo \"Linting: $script\"\n\n    if ! shellcheck \"$script\"; then\n        echo \"ShellCheck failed on $script\"\n        exit 1\n    fi\ndone\n```\n\n### GitHub Actions Workflow\n\n```yaml\nname: ShellCheck\n\non: [push, pull_request]\n\njobs:\n  shellcheck:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions\u002Fcheckout@v3\n\n      - name: Run ShellCheck\n        run: |\n          sudo apt-get install shellcheck\n          find . -type f -name \"*.sh\" -exec shellcheck {} \\;\n```\n\n### GitLab CI Pipeline\n\n```yaml\nshellcheck:\n  stage: lint\n  image: koalaman\u002Fshellcheck-alpine\n  script:\n    - find . -type f -name \"*.sh\" -exec shellcheck {} \\;\n  allow_failure: false\n```\n\n## Handling ShellCheck Violations\n\n### Suppressing Specific Warnings\n\n```bash\n#!\u002Fbin\u002Fbash\n\n# Disable warning for entire line\n# shellcheck disable=SC2086\nfor file in $(ls -la); do\n    echo \"$file\"\ndone\n\n# Disable for entire script\n# shellcheck disable=SC1091,SC2119\n\n# Disable multiple warnings (format varies)\ncommand_that_fails() {\n    # shellcheck disable=SC2015\n    [ -f \"$1\" ] && echo \"found\" || echo \"not found\"\n}\n\n# Disable specific check for source directive\n# shellcheck source=.\u002Fhelper.sh\nsource helper.sh\n```\n\n### Common Violations and Fixes\n\n#### SC2086: Double quote to prevent word splitting\n\n```bash\n# Problem\nfor i in $list; do done\n\n# Solution\nfor i in $list; do done  # If $list is already quoted, or\nfor i in \"${list[@]}\"; do done  # If list is an array\n```\n\n#### SC2181: Check exit code directly\n\n```bash\n# Problem\nsome_command\nif [ $? -eq 0 ]; then\n    echo \"success\"\nfi\n\n# Solution\nif some_command; then\n    echo \"success\"\nfi\n```\n\n#### SC2015: Use if-then instead of && ||\n\n```bash\n# Problem\n[ -f \"$file\" ] && echo \"exists\" || echo \"not found\"\n\n# Solution - clearer intent\nif [ -f \"$file\" ]; then\n    echo \"exists\"\nelse\n    echo \"not found\"\nfi\n```\n\n#### SC2016: Expressions don't expand in single quotes\n\n```bash\n# Problem\necho 'Variable value: $VAR'\n\n# Solution\necho \"Variable value: $VAR\"\n```\n\n#### SC2009: Use pgrep instead of grep\n\n```bash\n# Problem\nps aux | grep -v grep | grep myprocess\n\n# Solution\npgrep -f myprocess\n```\n\n## Performance Optimization\n\n### Checking Multiple Files\n\n```bash\n#!\u002Fbin\u002Fbash\n\n# Sequential checking\nfor script in *.sh; do\n    shellcheck \"$script\"\ndone\n\n# Parallel checking (faster)\nfind . -name \"*.sh\" -print0 | \\\n    xargs -0 -P 4 -n 1 shellcheck\n```\n\n### Caching Results\n\n```bash\n#!\u002Fbin\u002Fbash\n\nCACHE_DIR=\".shellcheck_cache\"\nmkdir -p \"$CACHE_DIR\"\n\ncheck_script() {\n    local script=\"$1\"\n    local hash\n    local cache_file\n\n    hash=$(sha256sum \"$script\" | cut -d' ' -f1)\n    cache_file=\"$CACHE_DIR\u002F$hash\"\n\n    if [[ ! -f \"$cache_file\" ]]; then\n        if shellcheck \"$script\" > \"$cache_file\" 2>&1; then\n            touch \"$cache_file.ok\"\n        else\n            return 1\n        fi\n    fi\n\n    [[ -f \"$cache_file.ok\" ]]\n}\n\nfind . -name \"*.sh\" | while read -r script; do\n    check_script \"$script\" || exit 1\ndone\n```\n\n## Output Formats\n\n### Default Format\n\n```bash\nshellcheck script.sh\n\n# Output:\n# script.sh:1:3: warning: foo is referenced but not assigned. [SC2154]\n```\n\n### GCC Format (for CI\u002FCD)\n\n```bash\nshellcheck --format=gcc script.sh\n\n# Output:\n# script.sh:1:3: warning: foo is referenced but not assigned.\n```\n\n### JSON Format (for parsing)\n\n```bash\nshellcheck --format=json script.sh\n\n# Output:\n# [{\"file\": \"script.sh\", \"line\": 1, \"column\": 3, \"level\": \"warning\", \"code\": 2154, \"message\": \"...\"}]\n```\n\n### Quiet Format\n\n```bash\nshellcheck --format=quiet script.sh\n\n# Returns non-zero if issues found, no output otherwise\n```\n\n## Best Practices\n\n1. **Run ShellCheck in CI\u002FCD** - Catch issues before merging\n2. **Configure for your target shell** - Don't analyze bash as sh\n3. **Document exclusions** - Explain why violations are suppressed\n4. **Address violations** - Don't just disable warnings\n5. **Enable strict mode** - Use `--enable=all` with careful exclusions\n6. **Update regularly** - Keep ShellCheck current for new checks\n7. **Use pre-commit hooks** - Catch issues locally before pushing\n8. **Integrate with editors** - Get real-time feedback during development\n\n## Resources\n\n- **ShellCheck GitHub**: https:\u002F\u002Fgithub.com\u002Fkoalaman\u002Fshellcheck\n- **ShellCheck Wiki**: https:\u002F\u002Fwww.shellcheck.net\u002Fwiki\u002F\n- **Error Code Reference**: https:\u002F\u002Fwww.shellcheck.net\u002F\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fwshobson\u002Fshellcheck-configuration",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill shellcheck-configuration",{"tool":64,"command":65},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill shellcheck-configuration",{"tool":67,"command":68},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill shellcheck-configuration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fwshobson\u002Fshellcheck-configuration\u002FSKILL.md",true,[72],{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"skill-report.json","REFERENCE","参考文档",17368,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fwshobson\u002Fshellcheck-configuration\u002Fskill-report.json",[79,89,99,108,114,121],{"skillNo":80,"name":81,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":85,"publishedAt":44},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[84],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[86,87,88],"model","model hierarchy","model hierarchy skill",{"skillNo":90,"name":91,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":95,"publishedAt":44},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[94],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[96,97,98],"MCP","zoom","zoom mcp",{"skillNo":100,"name":101,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":44},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[105,106,107,97],"sdk","zoom apps sdk","apps",{"skillNo":109,"name":110,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":44},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[110],{"skillNo":115,"name":116,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":120,"publishedAt":44},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[119],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[116],{"skillNo":122,"name":123,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":44},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[123]]