🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Scripting Utils

by @kikikari

Universal scripting utilities supporting 8+ languages (Bash, PowerShell, Python, Perl/Raku, JavaScript, Tcl), IRC bot frameworks (pbot, Limnoria), system man...

Versionv1.0.0
Downloads421
TERMINAL
clawhub install scripting-utils

πŸ“– About This Skill


name: scripting-utils description: Universal scripting utilities supporting 8+ languages (Bash, PowerShell, Python, Perl/Raku, JavaScript, Tcl), IRC bot frameworks (pbot, Limnoria), system management (systemd, Ubuntu/CentOS), and WebSearch integration. Provides syntax validation, code generation, best-practice linting, and cross-platform compatibility checks. Use when (1) Writing or validating scripts in any supported language, (2) Needing IRC bot command syntax, (3) Managing systemd services across Ubuntu/CentOS, (4) Validating JSON/API responses from web searches, (5) Converting between shell dialects, or (6) Batch-processing script validation.

Scripting Utils

Universal scripting utilities with WebSearch integration for 8+ languages and IRC bot frameworks.

Supported Languages

| Language | Command | Validation | Linting | WebSearch Docs | |----------|---------|------------|---------|----------------| | Bash | bash | βœ… shellcheck | βœ… | βœ… | | sh (POSIX) | sh | βœ… shellcheck | βœ… | βœ… | | Python | python3 | βœ… pylint/mypy | βœ… | βœ… | | Perl 5 | perl | βœ… perlcritic | βœ… | βœ… | | Raku | raku | βœ… | βœ… | βœ… | | PowerShell | pwsh | βœ… PSScriptAnalyzer | βœ… | βœ… | | JavaScript | node | βœ… eslint | βœ… | βœ… | | Tcl | tclsh | βœ… | βœ… | βœ… |

IRC Bot Frameworks

| Framework | Language | Docs Source | Status | |-----------|----------|-------------|--------| | pbot | Perl 5 | https://github.com/pragma-/pbot | βœ… | | Limnoria | Python | https://docs.limnoria.net/ | βœ… | | Eggdrop | Tcl | https://docs.eggheads.org/ | βœ… |

System Management

| System | Ubuntu | CentOS 8 | Command Matrix | |--------|--------|----------|----------------| | systemd | βœ… | βœ… | βœ… | | packages (apt/yum) | βœ… | βœ… | βœ… | | services | βœ… | βœ… | βœ… | | networking | βœ… | βœ… | βœ… |

WebSearch Integration

All modules support automatic documentation lookup:

from scripting_utils import LanguageValidator

validator = LanguageValidator("powershell")

Auto-fetches syntax from Microsoft docs if needed

result = validator.validate("$var = Get-Process")

Modules

| Module | Purpose | |--------|---------| | language_validator.py | Multi-language syntax validation | | irc_bot_syntax.py | pbot, Limnoria, Eggdrop command syntax | | system_manager.py | systemd, Ubuntu/CentOS abstraction | | json_websearch.py | JSON-Utils + WebSearch combination | | script_converter.py | Cross-language script conversion | | batch_validator.py | Batch validation of script directories |

Quick Start

Validate a script:

python scripts/language_validator.py script.ps1 --lang powershell
python scripts/language_validator.py script.pl --lang perl

Get IRC bot command syntax:

python scripts/irc_bot_syntax.py --bot pbot --command "keyword add"
python scripts/irc_bot_syntax.py --bot limnoria --command "config channel"

System command (Ubuntu vs CentOS):

python scripts/system_manager.py --action install --package nginx --os ubuntu
python scripts/system_manager.py --action install --package nginx --os centos

JSON from WebSearch + Validate:

from json_websearch import validate_search_result
from scripting_utils import WebSearchJSON

Search API docs, validate response

result = WebSearchJSON.search_and_validate( query="github api repos endpoint", schema="github_api_schema.json" )

Integration with json-utils

The json_websearch.py module extends json-utils with WebSearch capabilities:

  • Fetch API schemas from documentation
  • Validate real API responses
  • Batch-validate multiple endpoints
  • Auto-repair common API response errors
  • See: ../json-utils/ for core JSON functionality.

    πŸ’‘ Examples

    Validate a script:

    python scripts/language_validator.py script.ps1 --lang powershell
    python scripts/language_validator.py script.pl --lang perl
    

    Get IRC bot command syntax:

    python scripts/irc_bot_syntax.py --bot pbot --command "keyword add"
    python scripts/irc_bot_syntax.py --bot limnoria --command "config channel"
    

    System command (Ubuntu vs CentOS):

    python scripts/system_manager.py --action install --package nginx --os ubuntu
    python scripts/system_manager.py --action install --package nginx --os centos
    

    JSON from WebSearch + Validate:

    from json_websearch import validate_search_result
    from scripting_utils import WebSearchJSON

    Search API docs, validate response

    result = WebSearchJSON.search_and_validate( query="github api repos endpoint", schema="github_api_schema.json" )