[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AD9TTKQEWT03YCAPEK28HK":3,"skill-same:01M6AD9TTKQEWT03YCAPEK28HK":96},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":62,"ownerHtmlUrl":63,"ownerBlogUrl":64,"ownerDescription":65,"updatedAt":66,"install":67,"resources":79},"01M6AD9TTKQEWT03YCAPEK28HK","debugging-workflows","GitHub Actions 工作流调试","Debug GitHub Actions workflows by downloading logs, analyzing summaries, and understanding how agentic workflows and the AWF firewall work together.","通过下载日志、分析摘要，并理解智能体工作流（agentic workflows）与 AWF 防火墙如何协同工作，来调试 GitHub Actions 工作流。","github\u002Fgh-aw-firewall","github","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9919?v=4","01M6AC83DS133TPXFSP1DHNCC6","GitHub","01M6AD985Y1G0AQ64JV7KPQWZ4",160,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw-firewall\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fdebugging-workflows\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRSRYQ3M8N5063NNQPF2B1","调试与故障排查","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,10,45,46,47,48,49,50],"workflows","debugging","debugging workflows","analyzing","ls","cat","npx","read","node","work","gh","Bash","how","firewall","github actions","actions","logs","debug","agentic workflows","agentic","2026-11-10 10:12:30",false,"---\nname: debugging-workflows\ndescription: Debug GitHub Actions workflows by downloading logs, analyzing summaries, and understanding how agentic workflows and the AWF firewall work together.\nallowed-tools: Bash(gh:*), Bash(curl:*), Bash(npx:*), Bash(node:*), Bash(cat:*), Bash(ls:*), Bash(grep:*), Bash(jq:*), Read\n---\n\n# Debugging Workflows Skill\n\nUse this skill when you need to debug GitHub Actions workflows, download workflow logs or summaries, or understand how agentic workflows and the AWF firewall work together.\n\n## Quick Start\n\n### Download Workflow Logs\n\nUse the `download-workflow-logs.ts` script to download logs from a workflow run:\n\n```bash\n# Download logs from the latest workflow run\nnpx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-logs.ts\n\n# Download logs from a specific run ID\nnpx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-logs.ts --run-id 1234567890\n\n# Download logs from a specific workflow\nnpx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-logs.ts --workflow test-integration.yml\n\n# Save logs to a specific directory\nnpx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-logs.ts --output .\u002Fmy-logs\n```\n\n### Download Workflow Summary\n\nUse the `download-workflow-summary.ts` script to get a summary of workflow runs:\n\n```bash\n# Get summary of latest workflow runs\nnpx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-summary.ts\n\n# Get summary for a specific workflow run\nnpx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-summary.ts --run-id 1234567890\n\n# Get summary for a specific workflow file\nnpx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-summary.ts --workflow test-integration.yml\n\n# Get summary as JSON\nnpx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-summary.ts --format json\n```\n\n## GitHub CLI Commands\n\nThe `gh` CLI is essential for debugging workflows. Here are the most useful commands:\n\n### List Workflow Runs\n\n```bash\n# List recent workflow runs\ngh run list --limit 10\n\n# List runs for a specific workflow\ngh run list --workflow test-integration.yml --limit 10\n\n# List only failed runs\ngh run list --status failure --limit 10\n\n# List runs in JSON format for parsing\ngh run list --json databaseId,name,status,conclusion,createdAt --limit 10\n```\n\n### View Workflow Run Details\n\n```bash\n# View a specific run\ngh run view \u003Crun-id>\n\n# View run with job details\ngh run view \u003Crun-id> --verbose\n\n# View run as JSON\ngh run view \u003Crun-id> --json jobs,conclusion,status\n```\n\n### Download Run Logs\n\n```bash\n# Download all logs for a run\ngh run download \u003Crun-id>\n\n# Download specific artifact\ngh run download \u003Crun-id> --name \u003Cartifact-name>\n\n# Download to specific directory\ngh run download \u003Crun-id> --dir .\u002Flogs\n```\n\n### Watch a Running Workflow\n\n```bash\n# Watch a workflow run in real-time\ngh run watch \u003Crun-id>\n\n# Watch with exit code (useful for CI)\ngh run watch \u003Crun-id> --exit-status\n```\n\n### Re-run Failed Jobs\n\n```bash\n# Re-run failed jobs only\ngh run rerun \u003Crun-id> --failed\n\n# Re-run all jobs\ngh run rerun \u003Crun-id>\n```\n\n## Understanding Agentic Workflows\n\n### What are Agentic Workflows?\n\nAgentic workflows are GitHub Actions workflows that use AI agents (like GitHub Copilot or Claude) to perform tasks. They are defined using **markdown + YAML frontmatter** format in `.github\u002Fworkflows\u002F*.md` files and compiled to GitHub Actions YAML (`.lock.yml` files).\n\n### Key Components\n\n1. **Workflow File Format**: `.github\u002Fworkflows\u002F\u003Cname>.md`\n   - YAML frontmatter for configuration\n   - Markdown body for AI instructions\n   - Compiles to `.github\u002Fworkflows\u002F\u003Cname>.lock.yml`\n\n2. **Triggers** (`on:` field):\n   - Standard GitHub events: `issues`, `pull_request`, `push`, `schedule`\n   - Command triggers: `\u002Fmention` in issues\u002Fcomments\n   - `workflow_dispatch` for manual triggers\n\n3. **Safe Outputs**: Controlled way for AI to create GitHub entities\n   - `create-issue:` - Create GitHub issues\n   - `create-pull-request:` - Create PRs with git patches\n   - `add-comment:` - Add comments to issues\u002FPRs\n   - `add-labels:` - Add labels to issues\u002FPRs\n   - `create-discussion:` - Create GitHub discussions\n\n4. **Tools Configuration** (`tools:` field):\n   - `github:` - GitHub API tools\n   - `agentic-workflows:` - Workflow introspection tools\n   - `edit:` - File editing tools\n   - `web-fetch:` \u002F `web-search:` - Web access tools\n   - `bash:` - Shell command tools\n\n### Compiling Workflows\n\n```bash\n# Compile all workflows\ngh aw compile\n\n# Compile a specific workflow\ngh aw compile \u003Cworkflow-name>\n\n# Compile with strict security checks\ngh aw compile --strict\n```\n\n### Debugging Agentic Workflows\n\n```bash\n# View status of all agentic workflows\ngh aw status\n\n# Download and analyze logs from previous runs\ngh aw logs \u003Cworkflow-name> --json\n\n# Audit a specific run for issues\ngh aw audit \u003Crun-id> --json\n```\n\n### Common Issues\n\n1. **Missing Tool Calls**: Check `missing_tools` in audit output\n2. **Safe Output Failures**: Review `safe_outputs.jsonl` artifact\n3. **Permission Issues**: Verify `permissions:` block in frontmatter\n4. **Network Blocked**: Check `network:` configuration for allowed domains\n\n## Understanding the AWF Firewall\n\n### What is AWF?\n\nAWF (Agent Workflow Firewall) is a tool that provides L7 (HTTP\u002FHTTPS) egress control for GitHub Copilot CLI and other agents. It restricts network access to a whitelist of approved domains using Squid proxy and Docker containers.\n\n### Architecture Overview\n\n```\n┌─────────────────────────────────────────┐\n│  Host (GitHub Actions Runner \u002F Local)   │\n│                                          │\n│  ┌────────────────────────────────────┐ │\n│  │   Firewall CLI (awf)              │ │\n│  │   - Parse arguments                │ │\n│  │   - Generate Squid config          │ │\n│  │   - Start Docker Compose           │ │\n│  └────────────────────────────────────┘ │\n│           │                              │\n│           ▼                              │\n│  ┌──────────────────────────────────┐   │\n│  │   Docker Compose                 │   │\n│  │  ┌────────────────────────────┐  │   │\n│  │  │  Squid Proxy Container     │  │   │\n│  │  │  - Domain ACL filtering    │  │   │\n│  │  │  - HTTP\u002FHTTPS proxy        │  │   │\n│  │  └────────────────────────────┘  │   │\n│  │           ▲                       │   │\n│  │  ┌────────┼───────────────────┐  │   │\n│  │  │ Agent Container            │  │   │\n│  │  │ - Full filesystem access   │  │   │\n│  │  │ - iptables redirect        │  │   │\n│  │  │ - All traffic → Squid      │  │   │\n│  │  └────────────────────────────┘  │   │\n│  └──────────────────────────────────┘   │\n└─────────────────────────────────────────┘\n```\n\n### Key Containers\n\n- **`awf-squid`** - Squid proxy container (IP: 172.30.0.10)\n  - Filters HTTP\u002FHTTPS traffic based on domain allowlist\n  - Logs all traffic decisions\n\n- **`awf-agent`** - Agent execution container (IP: 172.30.0.20)\n  - Runs the actual command\u002Fagent\n  - Has iptables rules to redirect traffic to Squid\n  - Full filesystem access via `\u002Fhost` mount\n\n### Traffic Flow\n\n1. Command runs in agent container\n2. All HTTP\u002FHTTPS traffic → iptables DNAT → Squid proxy\n3. Squid checks domain against allowlist\n4. Allowed → forward to destination\n5. Blocked → return 403 Forbidden\n\n### Squid Log Analysis\n\n```bash\n# View Squid access log (shows traffic decisions)\ndocker exec awf-squid cat \u002Fvar\u002Flog\u002Fsquid\u002Faccess.log\n\n# Find blocked domains\ndocker exec awf-squid grep \"TCP_DENIED\" \u002Fvar\u002Flog\u002Fsquid\u002Faccess.log | awk '{print $3}' | sort -u\n\n# Count blocked by domain\ndocker exec awf-squid grep \"TCP_DENIED\" \u002Fvar\u002Flog\u002Fsquid\u002Faccess.log | awk '{print $3}' | sort | uniq -c | sort -rn\n\n# Real-time blocked traffic\ndocker exec awf-squid tail -f \u002Fvar\u002Flog\u002Fsquid\u002Faccess.log | grep --line-buffered TCP_DENIED\n```\n\n### Squid Decision Codes\n\n- `TCP_TUNNEL:HIER_DIRECT` = **ALLOWED** (HTTPS)\n- `TCP_MISS:HIER_DIRECT` = **ALLOWED** (HTTP)\n- `TCP_DENIED:HIER_NONE` = **BLOCKED**\n\n### Running Commands Through Firewall\n\n```bash\n# Basic usage\nsudo awf --allow-domains github.com 'curl https:\u002F\u002Fapi.github.com'\n\n# With debug logging\nsudo awf --allow-domains github.com --log-level debug 'your-command'\n\n# Keep containers for inspection\nsudo awf --allow-domains github.com --keep-containers 'your-command'\n```\n\n### Preserved Logs Locations\n\n**With `--keep-containers`:**\n- Squid: `\u002Ftmp\u002Fawf-\u003Ctimestamp>\u002Fsquid-logs\u002Faccess.log`\n- Agent: `\u002Ftmp\u002Fawf-\u003Ctimestamp>\u002Fagent-logs\u002F`\n\n**Normal execution (after cleanup):**\n- Squid: `\u002Ftmp\u002Fsquid-logs-\u003Ctimestamp>\u002Faccess.log`\n- Agent: `\u002Ftmp\u002Fawf-agent-logs-\u003Ctimestamp>\u002F`\n\n```bash\n# Find preserved logs\nls -ldt \u002Ftmp\u002Fawf-* \u002Ftmp\u002Fsquid-logs-* 2>\u002Fdev\u002Fnull | head -5\n\n# View preserved Squid logs\nsudo cat $(ls -t \u002Ftmp\u002Fsquid-logs-*\u002Faccess.log 2>\u002Fdev\u002Fnull | head -1)\n```\n\n## Debugging Workflow Failures\n\n### Step-by-Step Process\n\n1. **Identify the failing workflow run**\n   ```bash\n   gh run list --status failure --limit 5\n   ```\n\n2. **Get run details**\n   ```bash\n   gh run view \u003Crun-id> --verbose\n   ```\n\n3. **Download logs**\n   ```bash\n   gh run download \u003Crun-id> --dir .\u002Flogs\n   # Or use the script:\n   npx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-logs.ts --run-id \u003Crun-id>\n   ```\n\n4. **Analyze the failure**\n   - Check job logs for error messages\n   - Look for timeout issues\n   - Check for permission errors\n   - Review network-related errors\n\n5. **For agentic workflows, audit the run**\n   ```bash\n   gh aw audit \u003Crun-id> --json\n   ```\n\n6. **If firewall-related, check Squid logs**\n   ```bash\n   # If containers are still running\n   docker exec awf-squid cat \u002Fvar\u002Flog\u002Fsquid\u002Faccess.log\n   \n   # Or check preserved logs\n   sudo cat \u002Ftmp\u002Fsquid-logs-*\u002Faccess.log\n   ```\n\n### Common Failure Patterns\n\n#### Permission Denied\n```\nError: Resource not accessible by integration\n```\n**Fix:** Check `permissions:` in workflow frontmatter\n\n#### Domain Blocked\n```\ncurl: (56) Recv failure: Connection reset by peer\n```\n**Fix:** Add domain to `--allow-domains` or `network:` configuration\n\n#### Timeout\n```\nError: The operation was canceled.\n```\n**Fix:** Increase `timeout-minutes` in workflow configuration\n\n#### Missing Tool\n```\nTool 'xyz' not found\n```\n**Fix:** Add tool to `tools:` configuration in workflow frontmatter\n\n## Related Documentation\n\n- [Architecture](..\u002F..\u002F..\u002Fdocs\u002Farchitecture.md) - System architecture details\n- [Troubleshooting](..\u002F..\u002F..\u002Fdocs\u002Ftroubleshooting.md) - Common issues and solutions\n- [GitHub Actions Integration](..\u002F..\u002F..\u002Fdocs\u002Fgithub_actions.md) - CI\u002FCD setup\n- [Logging Documentation](..\u002F..\u002F..\u002FLOGGING.md) - Comprehensive logging guide\n- [Debug Firewall Skill](..\u002Fdebug-firewall\u002FSKILL.md) - Firewall-specific debugging\n\n## Start here for diagnosis\n\nIf you are diagnosing a failure rather than exploring, enter through the\n[`diagnose-awf`](..\u002Fdiagnose-awf\u002FSKILL.md) skill and the canonical diagnosis registry in\n[`docs\u002Fdiagnostics\u002FREADME.md`](..\u002F..\u002F..\u002Fdocs\u002Fdiagnostics\u002FREADME.md). This skill is one of the\nspecialist references it routes to.\n","# Debugging Workflows Skill\n\nUse this skill when you need to debug GitHub Actions workflows, download workflow logs or summaries, or understand how agentic workflows and the AWF firewall work together.\n\n## Quick Start\n\n### Download Workflow Logs\n\nUse the `download-workflow-logs.ts` script to download logs from a workflow run:\n\n```bash\n# Download logs from the latest workflow run\nnpx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-logs.ts\n\n# Download logs from a specific run ID\nnpx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-logs.ts --run-id 1234567890\n\n# Download logs from a specific workflow\nnpx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-logs.ts --workflow test-integration.yml\n\n# Save logs to a specific directory\nnpx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-logs.ts --output .\u002Fmy-logs\n```\n\n### Download Workflow Summary\n\nUse the `download-workflow-summary.ts` script to get a summary of workflow runs:\n\n```bash\n# Get summary of latest workflow runs\nnpx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-summary.ts\n\n# Get summary for a specific workflow run\nnpx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-summary.ts --run-id 1234567890\n\n# Get summary for a specific workflow file\nnpx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-summary.ts --workflow test-integration.yml\n\n# Get summary as JSON\nnpx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-summary.ts --format json\n```\n\n## GitHub CLI Commands\n\nThe `gh` CLI is essential for debugging workflows. Here are the most useful commands:\n\n### List Workflow Runs\n\n```bash\n# List recent workflow runs\ngh run list --limit 10\n\n# List runs for a specific workflow\ngh run list --workflow test-integration.yml --limit 10\n\n# List only failed runs\ngh run list --status failure --limit 10\n\n# List runs in JSON format for parsing\ngh run list --json databaseId,name,status,conclusion,createdAt --limit 10\n```\n\n### View Workflow Run Details\n\n```bash\n# View a specific run\ngh run view \u003Crun-id>\n\n# View run with job details\ngh run view \u003Crun-id> --verbose\n\n# View run as JSON\ngh run view \u003Crun-id> --json jobs,conclusion,status\n```\n\n### Download Run Logs\n\n```bash\n# Download all logs for a run\ngh run download \u003Crun-id>\n\n# Download specific artifact\ngh run download \u003Crun-id> --name \u003Cartifact-name>\n\n# Download to specific directory\ngh run download \u003Crun-id> --dir .\u002Flogs\n```\n\n### Watch a Running Workflow\n\n```bash\n# Watch a workflow run in real-time\ngh run watch \u003Crun-id>\n\n# Watch with exit code (useful for CI)\ngh run watch \u003Crun-id> --exit-status\n```\n\n### Re-run Failed Jobs\n\n```bash\n# Re-run failed jobs only\ngh run rerun \u003Crun-id> --failed\n\n# Re-run all jobs\ngh run rerun \u003Crun-id>\n```\n\n## Understanding Agentic Workflows\n\n### What are Agentic Workflows?\n\nAgentic workflows are GitHub Actions workflows that use AI agents (like GitHub Copilot or Claude) to perform tasks. They are defined using **markdown + YAML frontmatter** format in `.github\u002Fworkflows\u002F*.md` files and compiled to GitHub Actions YAML (`.lock.yml` files).\n\n### Key Components\n\n1. **Workflow File Format**: `.github\u002Fworkflows\u002F\u003Cname>.md`\n   - YAML frontmatter for configuration\n   - Markdown body for AI instructions\n   - Compiles to `.github\u002Fworkflows\u002F\u003Cname>.lock.yml`\n\n2. **Triggers** (`on:` field):\n   - Standard GitHub events: `issues`, `pull_request`, `push`, `schedule`\n   - Command triggers: `\u002Fmention` in issues\u002Fcomments\n   - `workflow_dispatch` for manual triggers\n\n3. **Safe Outputs**: Controlled way for AI to create GitHub entities\n   - `create-issue:` - Create GitHub issues\n   - `create-pull-request:` - Create PRs with git patches\n   - `add-comment:` - Add comments to issues\u002FPRs\n   - `add-labels:` - Add labels to issues\u002FPRs\n   - `create-discussion:` - Create GitHub discussions\n\n4. **Tools Configuration** (`tools:` field):\n   - `github:` - GitHub API tools\n   - `agentic-workflows:` - Workflow introspection tools\n   - `edit:` - File editing tools\n   - `web-fetch:` \u002F `web-search:` - Web access tools\n   - `bash:` - Shell command tools\n\n### Compiling Workflows\n\n```bash\n# Compile all workflows\ngh aw compile\n\n# Compile a specific workflow\ngh aw compile \u003Cworkflow-name>\n\n# Compile with strict security checks\ngh aw compile --strict\n```\n\n### Debugging Agentic Workflows\n\n```bash\n# View status of all agentic workflows\ngh aw status\n\n# Download and analyze logs from previous runs\ngh aw logs \u003Cworkflow-name> --json\n\n# Audit a specific run for issues\ngh aw audit \u003Crun-id> --json\n```\n\n### Common Issues\n\n1. **Missing Tool Calls**: Check `missing_tools` in audit output\n2. **Safe Output Failures**: Review `safe_outputs.jsonl` artifact\n3. **Permission Issues**: Verify `permissions:` block in frontmatter\n4. **Network Blocked**: Check `network:` configuration for allowed domains\n\n## Understanding the AWF Firewall\n\n### What is AWF?\n\nAWF (Agent Workflow Firewall) is a tool that provides L7 (HTTP\u002FHTTPS) egress control for GitHub Copilot CLI and other agents. It restricts network access to a whitelist of approved domains using Squid proxy and Docker containers.\n\n### Architecture Overview\n\n```\n┌─────────────────────────────────────────┐\n│  Host (GitHub Actions Runner \u002F Local)   │\n│                                          │\n│  ┌────────────────────────────────────┐ │\n│  │   Firewall CLI (awf)              │ │\n│  │   - Parse arguments                │ │\n│  │   - Generate Squid config          │ │\n│  │   - Start Docker Compose           │ │\n│  └────────────────────────────────────┘ │\n│           │                              │\n│           ▼                              │\n│  ┌──────────────────────────────────┐   │\n│  │   Docker Compose                 │   │\n│  │  ┌────────────────────────────┐  │   │\n│  │  │  Squid Proxy Container     │  │   │\n│  │  │  - Domain ACL filtering    │  │   │\n│  │  │  - HTTP\u002FHTTPS proxy        │  │   │\n│  │  └────────────────────────────┘  │   │\n│  │           ▲                       │   │\n│  │  ┌────────┼───────────────────┐  │   │\n│  │  │ Agent Container            │  │   │\n│  │  │ - Full filesystem access   │  │   │\n│  │  │ - iptables redirect        │  │   │\n│  │  │ - All traffic → Squid      │  │   │\n│  │  └────────────────────────────┘  │   │\n│  └──────────────────────────────────┘   │\n└─────────────────────────────────────────┘\n```\n\n### Key Containers\n\n- **`awf-squid`** - Squid proxy container (IP: 172.30.0.10)\n  - Filters HTTP\u002FHTTPS traffic based on domain allowlist\n  - Logs all traffic decisions\n\n- **`awf-agent`** - Agent execution container (IP: 172.30.0.20)\n  - Runs the actual command\u002Fagent\n  - Has iptables rules to redirect traffic to Squid\n  - Full filesystem access via `\u002Fhost` mount\n\n### Traffic Flow\n\n1. Command runs in agent container\n2. All HTTP\u002FHTTPS traffic → iptables DNAT → Squid proxy\n3. Squid checks domain against allowlist\n4. Allowed → forward to destination\n5. Blocked → return 403 Forbidden\n\n### Squid Log Analysis\n\n```bash\n# View Squid access log (shows traffic decisions)\ndocker exec awf-squid cat \u002Fvar\u002Flog\u002Fsquid\u002Faccess.log\n\n# Find blocked domains\ndocker exec awf-squid grep \"TCP_DENIED\" \u002Fvar\u002Flog\u002Fsquid\u002Faccess.log | awk '{print $3}' | sort -u\n\n# Count blocked by domain\ndocker exec awf-squid grep \"TCP_DENIED\" \u002Fvar\u002Flog\u002Fsquid\u002Faccess.log | awk '{print $3}' | sort | uniq -c | sort -rn\n\n# Real-time blocked traffic\ndocker exec awf-squid tail -f \u002Fvar\u002Flog\u002Fsquid\u002Faccess.log | grep --line-buffered TCP_DENIED\n```\n\n### Squid Decision Codes\n\n- `TCP_TUNNEL:HIER_DIRECT` = **ALLOWED** (HTTPS)\n- `TCP_MISS:HIER_DIRECT` = **ALLOWED** (HTTP)\n- `TCP_DENIED:HIER_NONE` = **BLOCKED**\n\n### Running Commands Through Firewall\n\n```bash\n# Basic usage\nsudo awf --allow-domains github.com 'curl https:\u002F\u002Fapi.github.com'\n\n# With debug logging\nsudo awf --allow-domains github.com --log-level debug 'your-command'\n\n# Keep containers for inspection\nsudo awf --allow-domains github.com --keep-containers 'your-command'\n```\n\n### Preserved Logs Locations\n\n**With `--keep-containers`:**\n- Squid: `\u002Ftmp\u002Fawf-\u003Ctimestamp>\u002Fsquid-logs\u002Faccess.log`\n- Agent: `\u002Ftmp\u002Fawf-\u003Ctimestamp>\u002Fagent-logs\u002F`\n\n**Normal execution (after cleanup):**\n- Squid: `\u002Ftmp\u002Fsquid-logs-\u003Ctimestamp>\u002Faccess.log`\n- Agent: `\u002Ftmp\u002Fawf-agent-logs-\u003Ctimestamp>\u002F`\n\n```bash\n# Find preserved logs\nls -ldt \u002Ftmp\u002Fawf-* \u002Ftmp\u002Fsquid-logs-* 2>\u002Fdev\u002Fnull | head -5\n\n# View preserved Squid logs\nsudo cat $(ls -t \u002Ftmp\u002Fsquid-logs-*\u002Faccess.log 2>\u002Fdev\u002Fnull | head -1)\n```\n\n## Debugging Workflow Failures\n\n### Step-by-Step Process\n\n1. **Identify the failing workflow run**\n   ```bash\n   gh run list --status failure --limit 5\n   ```\n\n2. **Get run details**\n   ```bash\n   gh run view \u003Crun-id> --verbose\n   ```\n\n3. **Download logs**\n   ```bash\n   gh run download \u003Crun-id> --dir .\u002Flogs\n   # Or use the script:\n   npx tsx .github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-logs.ts --run-id \u003Crun-id>\n   ```\n\n4. **Analyze the failure**\n   - Check job logs for error messages\n   - Look for timeout issues\n   - Check for permission errors\n   - Review network-related errors\n\n5. **For agentic workflows, audit the run**\n   ```bash\n   gh aw audit \u003Crun-id> --json\n   ```\n\n6. **If firewall-related, check Squid logs**\n   ```bash\n   # If containers are still running\n   docker exec awf-squid cat \u002Fvar\u002Flog\u002Fsquid\u002Faccess.log\n   \n   # Or check preserved logs\n   sudo cat \u002Ftmp\u002Fsquid-logs-*\u002Faccess.log\n   ```\n\n### Common Failure Patterns\n\n#### Permission Denied\n```\nError: Resource not accessible by integration\n```\n**Fix:** Check `permissions:` in workflow frontmatter\n\n#### Domain Blocked\n```\ncurl: (56) Recv failure: Connection reset by peer\n```\n**Fix:** Add domain to `--allow-domains` or `network:` configuration\n\n#### Timeout\n```\nError: The operation was canceled.\n```\n**Fix:** Increase `timeout-minutes` in workflow configuration\n\n#### Missing Tool\n```\nTool 'xyz' not found\n```\n**Fix:** Add tool to `tools:` configuration in workflow frontmatter\n\n## Related Documentation\n\n- [Architecture](..\u002F..\u002F..\u002Fdocs\u002Farchitecture.md) - System architecture details\n- [Troubleshooting](..\u002F..\u002F..\u002Fdocs\u002Ftroubleshooting.md) - Common issues and solutions\n- [GitHub Actions Integration](..\u002F..\u002F..\u002Fdocs\u002Fgithub_actions.md) - CI\u002FCD setup\n- [Logging Documentation](..\u002F..\u002F..\u002FLOGGING.md) - Comprehensive logging guide\n- [Debug Firewall Skill](..\u002Fdebug-firewall\u002FSKILL.md) - Firewall-specific debugging\n\n## Start here for diagnosis\n\nIf you are diagnosing a failure rather than exploring, enter through the\n[`diagnose-awf`](..\u002Fdiagnose-awf\u002FSKILL.md) skill and the canonical diagnosis registry in\n[`docs\u002Fdiagnostics\u002FREADME.md`](..\u002F..\u002F..\u002Fdocs\u002Fdiagnostics\u002FREADME.md). This skill is one of the\nspecialist references it routes to.\n",{"name":5,"description":7,"allowed-tools":56},"Bash(gh:*), Bash(curl:*), Bash(npx:*), Bash(node:*), Bash(cat:*), Bash(ls:*), Bash(grep:*), Bash(jq:*), Read","main","564491e648e022be04aa96b73c1681f13f7544f8",".github\u002Fskills\u002Fdebugging-workflows",83,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw-firewall","https:\u002F\u002Fgithub.github.com\u002Fgh-aw-firewall\u002F","https:\u002F\u002Fgithub.com\u002Fgithub","https:\u002F\u002Fgithub.com\u002Fabout","How people build software.","2026-11-15 06:13:56",{"source":9,"skillName":5,"commands":68,"prompt":77,"zipAvailable":78},[69,71,74],{"tool":37,"command":70},"npx skills add github\u002Fgh-aw-firewall --skill debugging-workflows",{"tool":72,"command":73},"bunx","bunx skills add github\u002Fgh-aw-firewall --skill debugging-workflows",{"tool":75,"command":76},"pnpm","pnpm dlx skills add github\u002Fgh-aw-firewall --skill debugging-workflows","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw-firewall\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fdebugging-workflows\u002FSKILL.md",true,[80,86,90],{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"download-workflow-logs.ts","SCRIPT","脚本",10542,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw-firewall\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-logs.ts",{"path":87,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":88,"sourceHtmlUrl":89},"download-workflow-summary.ts",13678,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw-firewall\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fdebugging-workflows\u002Fdownload-workflow-summary.ts",{"path":91,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":94,"sourceHtmlUrl":95},"routing-eval.jsonl","OTHER","其他",666,"https:\u002F\u002Fgithub.com\u002Fshengdabai\u002FTony-Claude-Code-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgbrain-archive-crawler\u002Frouting-eval.jsonl",[97,129,141,164,198,222],{"skillNo":98,"name":99,"nameZh":100,"description":101,"descriptionZh":102,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":103,"categories":104,"keywords":111,"publishedAt":51},"01M6AD9DV31R7XRJ0QZR1MYQPS","awf-skill","AWF 网络隔离与域名白名单","Use the AWF (Agentic Workflow Firewall) to run commands with network isolation and domain whitelisting. Provides L7 HTTP\u002FHTTPS egress control for AI agents.","使用 AWF（Agentic Workflow Firewall，智能体工作流防火墙）运行带网络隔离和域名白名单的命令。为 AI 智能体提供 L7 层 HTTP\u002FHTTPS 出站流量控制。","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw-firewall\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fawf-skill\u002FSKILL.md",[105,108],{"categoryNo":106,"categoryName":107,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BR4MYFKGCC4WCWVJ50KJ2C","安全工程师",{"categoryNo":109,"categoryName":110,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C664K3JQN4CNXKYKQEDRQK","云平台安全加固",[112,113,114,115,116,50,117,118,119,44,38,120,121,122,123,124,125,42,126,127,128],"awf skill","agentic workflow","docker","http","workflow","ai agents","run","https","sudo","isolation","domain","for","use","false","commands","network","with",{"skillNo":130,"name":99,"nameZh":131,"description":101,"descriptionZh":132,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":133,"sourceHtmlUrl":134,"categories":135,"keywords":140,"publishedAt":51},"01M6ADA1AXWT8GAAAZ2MJV1YF1","AWF 智能体网络隔离与出口控制","使用 AWF（Agentic Workflow Firewall，智能体工作流防火墙）在网络隔离与域名白名单机制下运行命令。为 AI 智能体提供 L7 层 HTTP\u002FHTTPS 出口（egress）控制。","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw-firewall\u002Fblob\u002Fmain\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw-firewall\u002Fblob\u002Fmain\u002Fskill.md",[136,137],{"categoryNo":106,"categoryName":107,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":138,"categoryName":139,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BS500GKZYSCKH93NWY5MDS","云合规与数据边界管理",[112,113,114,115,116,50,117,118,119,44,38,120,121,122,123,124,125,42,126,127,128],{"skillNo":142,"name":143,"nameZh":144,"description":145,"descriptionZh":146,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":147,"categories":148,"keywords":153,"publishedAt":51},"01M6AD9ZKQJBHWBVNQEERBCT0V","sandbox-filesystem-access","AWF 沙箱文件系统访问配置","Configure or diagnose file and directory access, mounts, and host ACLs for AWF sandboxes.","为 AWF 沙箱配置文件与目录访问权限、挂载（mounts）及主机 ACL，或对这些内容进行诊断排查。","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw-firewall\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fsandbox-filesystem-access\u002FSKILL.md",[149,150],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":151,"categoryName":152,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSTR9G4A4GZ0VB2DFN9490","开发环境与工具链管理",[154,155,156,157,158,159,160,123,161,162,163],"sandbox","sandbox filesystem access","filesystem","access","diagnose","file","directory","sandboxes","host","configure",{"skillNo":165,"name":166,"nameZh":167,"description":168,"descriptionZh":169,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":170,"categories":171,"keywords":178,"publishedAt":51},"01M6AD9XDE32KBEV4V8SXVXQ0D","pr-finisher","PR 合并就绪准备","Prepare an open pull request for merge from a GitHub Copilot cloud agent. Drives Reviews, local validation, and Mergeable to a ready state. Does not merge, and cannot trigger CI.","为来自 GitHub Copilot 云端智能体的待合并 Pull Request 做好合并准备。推动代码审查（Reviews）、本地验证（local validation）以及 Mergeable（可合并）状态达到就绪。不执行合并操作，也无法触发 CI。","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw-firewall\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fpr-finisher\u002FSKILL.md",[172,175],{"categoryNo":173,"categoryName":174,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师",{"categoryNo":176,"categoryName":177,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理",[179,180,181,182,183,10,184,185,186,187,188,189,190,191,192,193,123,194,195,196,197],"pr finisher","pr","pull","state","github copilot","pull request","merge","ci","validation","copilot","open pull request","cloud","prepare","ready","reviews","trigger","local","open","request",{"skillNo":199,"name":200,"nameZh":201,"description":202,"descriptionZh":203,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":204,"categories":205,"keywords":212,"publishedAt":51},"01M6AD9S2GXF6T58BMN1X7PRHM","agentic-workflows","智能体工作流请求路由","Route gh-aw design, creation, diagnosis, patching, active debugging, upgrades, and local SDLC issue requests to the right strategies.","将 gh-aw 的设计、创建、诊断、修补、主动调试、升级以及本地 SDLC 问题请求路由到相应的策略。","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw-firewall\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fagentic-workflows\u002FSKILL.md",[206,209],{"categoryNo":207,"categoryName":208,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",{"categoryNo":210,"categoryName":211,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSAA4FBTWZP6X98STEHG99","智能体开发",[49,31,50,213,32,214,215,216,217,218,219,41,220,221],"design","route","strategies","requests","creation","active","diagnosis","upgrade","patching",{"skillNo":223,"name":224,"nameZh":225,"description":226,"descriptionZh":227,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":228,"categories":229,"keywords":232,"publishedAt":51},"01M6AD9Q293GYDF752HBPYX0VF","add-llm-provider","新增 LLM 提供商支持","Decide and implement how to support a new LLM provider or agent engine in AWF - either as a proxied provider (api-proxy adapter) or a direct-API engine (domain allowlist only), e.g. Cursor, Aider, or any tool that calls its own endpoint.","决定并实现如何在 AWF 中支持新的 LLM 提供商或智能体引擎 —— 既可作为代理式提供商（api-proxy 适配器），也可作为直连 API 引擎（仅限域名白名单），例如 Cursor、Aider 或任何调用自身端点的工具。","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw-firewall\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fadd-llm-provider\u002FSKILL.md",[230,231],{"categoryNo":207,"categoryName":208,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":210,"categoryName":211,"taxonomyType":28,"taxonomyTypeDesc":29},[233,234,235,236,237,238,239,122,240,241,242,243,244,245,246,247,248,249,250,43],"add llm provider","provider","add","proxy","support","implement","as","decide","tool","aider","calls","how to","only","new","adapter","either","api","engine"]