starwards-ci-debugging
БесплатноБез исполняемых скриптовНе проверенDebug Starwards GitHub Actions CI failures - analyze logs for ESLint/TypeScript/E2E/Docker errors, identify root causes, and apply fixes locally before pushing
от starwards★ 44 звезды на GitHubОб этом скилле
CI Debugging for Starwards
Overview
Debug GitHub Actions CI failures independently by downloading logs and analyzing them locally.
Core principle: ALWAYS download CI logs before attempting to debug failures.
Prerequisites: Use the github-api skill to set up GitHub CLI access first.
The Iron Law
NO CI DEBUGGING WITHOUT LOG ACCESS FIRST
If you haven't downloaded logs, you cannot diagnose CI failures.
When to Use
Any Starwards GitHub Actions failure:
- Test-Static (TypeScript, ESLint, Prettier)
- Test-Units (Jest test failures)
- Test-E2e (Playwright test failures)
- Build failures
- Workflow configuration errors
Quick Start
Prerequisites:
- Use github-api skill to install GitHub CLI
- Verify authentication:
gh auth status - Set alias:
GH="/tmp/gh-install/gh_2.62.0_linux_amd64/bin/gh"
Quick Workflow:
# 1. Get PR checks
$GH pr checks <PR_NUMBER> --repo starwards/starwards
# 2. Extract run ID from URL
RUN_ID=$($GH pr checks <PR_NUMBER> --repo starwards/starwards | grep -oP 'runs/\K[0-9]+' | head -1)
# 3. Download logs
$GH api repos/starwards/starwards/actions/runs/$RUN_ID/logs --paginate > /tmp/run-logs.zip
cd /tmp && unzip -o -q run-logs.zip
# 4. Analyze failures (see sections below)
CI Log Analysis
Identify Failed Jobs
# Get failed jobs and steps
$GH api repos/starwards/starwards/actions/runs/<RUN_ID>/jobs \
--jq '.jobs[] | select(.conclusion=="failure") | {name, steps: [.steps[] | select(.conclusion=="failure") | .name]}'
Example output:
{
"name": "Test-Static",
"steps": ["Run npm run test:format"]
}
{
"name": "Test-E2e",
"steps": ["Run npm run test:e2e"]
}
Log File Organization
Downloaded logs are named by job:
/tmp/0_Test-Units.txt
/tmp/1_Build.txt
/tmp/2_Test-E2e.txt
/tmp/3_Test-Static.txt
Test-Static Analysis
# Find ESLint errors
grep "##\[error\]" /tmp/3_Test-Static.txt
# Find TypeScript errors
grep "error TS" /tmp/3_Test-Static.txt
# Find Prettier failures
grep -A 5 "Code style issues" /tmp/3_Test-Static.txt
# Group TypeScript errors by code
grep "error TS" /tmp/3_Test-Static.txt | grep -oP 'error TS\d+' | sort | uniq -c
Test-E2e Analysis
# Find Playwright errors
grep -E "FAIL|Error:" /tmp/2_Test-E2e.txt | head -50
# Find browser launch errors
grep "Executable doesn't exist" /tmp/2_Test-E2e.txt
# Find test assertion failures
grep -A 10 "Expected.*Received" /tmp/2_Test-E2e.txt
# Find timeout issues
grep -i "timeout" /tmp/2_Test-E2e.txt
Test-Units Analysis
# Find test failures
grep -A 20 "FAIL " /tmp/0_Test-Units.txt
# Find timeout errors
grep "Timeout" /tmp/0_Test-Units.txt
# Find assertion errors
grep -B 5 -A 10 "expect.*toEqual\|toBe\|toBeCloseTo" /tmp/0_Test-Units.txt
# Find connection errors (common in Colyseus tests)
grep -i "connection.*error\|ECONNREFUSED" /tmp/0_Test-Units.txt
Common Starwards CI Failures
1. ESLint: Unsafe any Type Usage
Symptoms:
##[error] 192:23 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
##[error] 192:61 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
Root cause: Using (e as any).code violates strict TypeScript rules.
Fix pattern:
// BEFORE (fails lint):
const hasCode = typeof (e as any).code === 'string' && (e as any).code;
const code = String((e as any).code);
// AFTER (passes lint):
function hasStringCode(e: unknown): e is { code: string } {
return typeof (e as { code?: unknown })?.code === 'string'
&& !!(e as { code?: string }).code;
}
if (hasStringCode(e)) {
const code = e.code; // Type-safe!
}
Local verification:
npm run lint
# Expected: No errors
2. Playwright: Browser Executable Not Found
Symptoms:
Error: browserType.launch: Executable doesn't exist at /ms-playwright/chromium_headless_shell-1194/chrome-linux/headless_shell
Root cause: Docker image version doesn't match installed Playwright version.
Diagnosis:
# Check package version
grep '"@playwright/test"' package.json
# Example: "@playwright/test": "^1.56.1"
# Check exact installed version
grep -A 15 'node_modules/@playwright/test"' package-lock.json | grep '"version"' | head -1
# Example: "version": "1.56.1"
# Check CI workflow Docker image
grep "mcr.microsoft.com/playwright" .github/workflows/ci-cd.yml
# Example: image: mcr.microsoft.com/playwright:v1.42.1-jammy
# ^^^^^^^ MISMATCH!
Fix:
# .github/workflows/ci-cd.yml
Test-E2e:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.56.1-jammy # Match package version exactly
options: --user 1001
Find available versions:
curl -s https://mcr.microsoft.com/v2/playwright/tags/list | jq -r '.tags[] | select(startswith("v1.5"))' | sort -V |
Установить starwards-ci-debugging в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл starwards-ci-debugging?
Debug Starwards GitHub Actions CI failures - analyze logs for ESLint/TypeScript/E2E/Docker errors, identify root causes, and apply fixes locally before pushing
Как установить скилл starwards-ci-debugging?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл starwards-ci-debugging запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic