npx skills add ...
npx skills add github/gh-aw-firewall --skill awf-debug-tools
Practical Python scripts for debugging awf - parse logs, diagnose issues, inspect containers, test domains
npx skills add github/gh-aw-firewall --skill awf-debug-tools
A collection of practical Python scripts that help agents efficiently debug and operate the awf firewall. These scripts reduce verbose Docker/log output by 80%+ and provide actionable insights instead of raw data dumps.
Problem: Docker commands and log files are verbose and hard for agents to parse. Diagnosing issues requires 10+ manual commands and produces noisy output that wastes tokens.
Solution: One script replaces 5-10 manual commands with clean, filtered output optimized for agent consumption. All scripts support JSON format for easy parsing.
All scripts are located in .claude/skills/awf-debug-tools/scripts/:
When a command fails due to blocked domain:
When containers aren't starting or behaving unexpectedly:
For agents to diagnose issues without human intervention:
All scripts support two output formats:
Use --format json to get structured output that's easy to parse programmatically.
All scripts use consistent exit codes:
All scripts use Python 3.8+ stdlib only. No pip install required. They work out of the box on any system with Python 3.8+.
Purpose: Extract blocked domains from Squid logs with counts and statistics.
Key Options:
--blocked-only - Show only blocked domains--domain DOMAIN - Filter by specific domain--top N - Show top N domains by request count--format {table,json} - Output formatAuto-discovers logs from running containers, preserved logs, or work directories.
Purpose: Run automated diagnostic checks and report issues with fixes.
Checks:
Key Options:
--verbose - Show detailed check output--format {text,json} - Output formatPurpose: Show concise container status without verbose docker output.
Shows:
Key Options:
--container NAME - Inspect specific container only--logs-only - Show only recent logs--tail N - Number of log lines (default: 5)--format {text,json} - Output formatPurpose: Test if domain is reachable through the firewall.
Checks:
Key Options:
--check-allowlist - Only check allowlist, don't check logs--suggest-fix - Show suggested --allow-domains flag--format {text,json} - Output formatdebug-firewall skillawf-mcp-gateway skilldocs/troubleshooting.mdAll scripts are designed for fast execution:
parse-squid-logs.py: <2 seconds for typical log filesdiagnose-awf.py: <3 seconds for all checksinspect-containers.py: <2 seconds for both containerstest-domain.py: <1 second for domain check--format json | jq .Script not found:
Permission denied on logs:
No logs found:
Planned scripts for future versions:
analyze-traffic.py - Analyze traffic patterns over timegenerate-allowlist.py - Auto-generate allowlist from logscleanup-awf.py - Clean up orphaned resourcesbenchmark-awf.py - Performance testing utilities