Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问clear审计提醒

starwards-ci-debuggingstarwards ci 调试

Agent Skill

starwards-ci-debugging 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

343

周安装

14

GitHub Stars

40

下载量

110
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:starwards-ci-debugging(starwards ci 调试)
来源仓库:https://github.com/starwards/starwards
仓库路径:skills/starwards-ci-debugging
安装命令:
npx skills add https://github.com/starwards/starwards --skill starwards-ci-debugging
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/starwards/starwards --skill starwards-ci-debugging

简介

starwards-ci-debugging 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 适用于持续集成(CI)调试与问题排查的信息支持,可协助定位构建失败原因。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 确认具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • 当前暂无原始 SKILL.md 内容摘录,建议进一步查阅来源仓库获取详细功能说明。

SKILL.md

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:

  1. Use github-api skill to install GitHub CLI
  2. Verify authentication: gh auth status
  3. 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 | tail -10

Local verification:

# Cannot test Docker image locally, must verify on CI
git add .github/workflows/ci-cd.yml
git commit -m "Update Playwright Docker image to v1.56.1"
git push

3. TypeScript: Type Errors

Symptoms:

modules/core/src/file.ts(42,15): error TS2322: Type 'string | undefined' is not assignable to type 'string'

Common error codes:

  • TS2322: Type mismatch - add type assertion or fix types
  • TS2532: Possibly undefined - add null check or ! assertion
  • TS2345: Argument type mismatch - check function signature
  • TS2339: Property doesn't exist - check interface/type definition

Local verification:

npm run test:types
# Expected: No errors

4. Jest: Flaky Colyseus Tests

Symptoms:

connection error: AggregateError
expect(received).toEqual(expected)
  "text": "err: "  // Expected "err: ECONNREFUSED"

Common causes:

  • Dependency update changed error message format
  • Race condition in async test
  • Port conflict (rare)
  • Timing issue in Colyseus state sync

Diagnosis:

# Check recent changes
git log --oneline -5
git diff HEAD~1 package.json

# Search for error in logs
grep -B 10 -A 10 "expect.*toEqual" /tmp/0_Test-Units.txt

# Look for timing issues
grep -i "timeout\|race\|async" /tmp/0_Test-Units.txt

Fix pattern:

  • Update expected error format to match new behavior
  • Add longer timeouts for flaky tests
  • Use waitFor helpers from @testing-library/react
  • Check Colyseus state sync timing

5. Build Failures

Symptoms:

error TS6059: File '...' is not under 'rootDir'
error TS5055: Cannot write file '...' because it would overwrite input file

Common causes:

  • Circular dependencies
  • Module import issues
  • Monorepo build order violation
  • Missing npm run build:core before dependent modules

Diagnosis:

# Check build order
grep "npm run build" .github/workflows/ci-cd.yml

# Check for circular deps
npm ls | grep "deduped"

# Verify module dependencies
cat modules/browser/package.json | jq '.dependencies'

Fix:

  • Use starwards-monorepo skill for build order issues
  • Check imports in affected files
  • Ensure core builds before browser/server

Complete CI Debug Workflow

Full Script

#!/bin/bash
set -e

# Setup (use github-api skill for this part)
GH="/tmp/gh-install/gh_2.62.0_linux_amd64/bin/gh"
REPO="starwards/starwards"
PR_NUMBER=$1

if [ -z "$PR_NUMBER" ]; then
  echo "Usage: $0 <PR_NUMBER>"
  exit 1
fi

echo "=== Step 1: Check PR Status ==="
$GH pr view $PR_NUMBER --repo $REPO

echo -e "\n=== Step 2: Get Check Results ==="
$GH pr checks $PR_NUMBER --repo $REPO

echo -e "\n=== Step 3: Identify Failed Jobs ==="
RUN_ID=$($GH pr checks $PR_NUMBER --repo $REPO | grep -oP 'runs/\K[0-9]+' | head -1)
echo "Run ID: $RUN_ID"

$GH api repos/$REPO/actions/runs/$RUN_ID/jobs \
  --jq '.jobs[] | select(.conclusion=="failure") | {
    name: .name,
    failed_steps: [.steps[] | select(.conclusion=="failure") | .name]
  }'

echo -e "\n=== Step 4: Download Logs ==="
$GH api repos/$REPO/actions/runs/$RUN_ID/logs --paginate > /tmp/run-logs.zip
cd /tmp && unzip -o -q run-logs.zip
echo "Logs extracted to /tmp/*.txt"

echo -e "\n=== Step 5: Analyze Failures ==="
echo "TypeScript errors:"
grep -h "error TS" /tmp/*.txt | head -10 || echo "None found"

echo -e "\nESLint errors:"
grep -h "##\[error\]" /tmp/*.txt | head -10 || echo "None found"

echo -e "\nTest failures:"
grep -h "FAIL.*spec\." /tmp/*.txt | head -10 || echo "None found"

echo -e "\nBrowser errors:"
grep -h "Executable doesn't exist" /tmp/*.txt || echo "None found"

echo -e "\n=== Step 6: Next Steps ==="
echo "1. Review errors above"
echo "2. Fix issues locally"
echo "3. Run: npm run lint && npm test && npm run build"
echo "4. Commit and push"
echo "5. Monitor new CI run with: $GH pr checks $PR_NUMBER --repo $REPO"

Save and Use

# Save script
cat > /tmp/debug-ci.sh << 'EOF'
[paste script above]
EOF

chmod +x /tmp/debug-ci.sh

# Run
/tmp/debug-ci.sh 1826

Local Verification Checklist

Before pushing CI fixes:

# ☐ Lint passes
npm run lint

# ☐ Type check passes
npm run test:types

# ☐ Unit tests pass
npm test

# ☐ Build succeeds
npm run build

# ☐ E2E tests pass (if applicable)
npm run test:e2e

# ☐ Format is correct
npm run test:format

Monitoring After Push

# Wait for CI to start
sleep 30

# Check new run status
$GH pr checks <PR_NUMBER> --repo starwards/starwards

# If still failing, download new logs and repeat
RUN_ID=$($GH pr checks <PR_NUMBER> --repo starwards/starwards | grep -oP 'runs/\K[0-9]+' | head -1)
$GH api repos/starwards/starwards/actions/runs/$RUN_ID/logs --paginate > /tmp/run-logs-retry.zip

Integration with Other Skills

  • github-api - Setup GitHub CLI, download logs, query API
  • starwards-debugging - Systematic debugging for local reproduction
  • starwards-verification - Run verification commands before push
  • starwards-monorepo - Understand build dependencies and order
  • starwards-workflow - Terminal commands for local testing

Quick Reference

GitHub CLI Commands

See github-api skill for:

  • Installation and setup
  • Authentication
  • API access patterns
  • Rate limiting

CI-Specific Commands

# Get PR checks
$GH pr checks <PR> --repo starwards/starwards

# Get run details
$GH run view <RUN_ID> --repo starwards/starwards

# Download logs
$GH api repos/starwards/starwards/actions/runs/<RUN_ID>/logs --paginate > /tmp/logs.zip

# Get failed jobs
$GH api repos/starwards/starwards/actions/runs/<RUN_ID>/jobs \
  --jq '.jobs[] | select(.conclusion=="failure")'

Log Analysis Patterns

# ESLint errors
grep "##\[error\]" /tmp/*.txt

# TypeScript errors
grep "error TS" /tmp/*.txt

# Test failures
grep "FAIL " /tmp/*.txt

# Playwright errors
grep "Executable doesn't exist" /tmp/*.txt

# Assertion failures
grep -A 10 "Expected.*Received" /tmp/*.txt

Tips

  1. Download logs first - Always get complete context before debugging
  2. Check run ID - Ensure you're analyzing the correct workflow run
  3. Group errors - Use sort | uniq -c to identify patterns
  4. Verify locally - Run all checks before pushing
  5. Monitor after push - Watch new CI run to confirm fix
  6. Check dependencies - Build order matters in monorepos
  7. Save scripts - Keep debug workflow script for repeated use

Real-World Example

Scenario: PR #1826 failing with Test-Static and Test-E2e

# Setup (github-api skill)
GH="/tmp/gh-install/gh_2.62.0_linux_amd64/bin/gh"

# Check status
$GH pr checks 1826 --repo starwards/starwards
# Test-Static: FAIL
# Test-E2e: FAIL

# Download logs
RUN_ID=19084760492
$GH api repos/starwards/starwards/actions/runs/$RUN_ID/logs --paginate > /tmp/run-logs.zip
cd /tmp && unzip -o -q run-logs.zip

# Analyze Test-Static
grep "##\[error\]" /tmp/3_Test-Static.txt
# Found: 7 ESLint errors about unsafe `any` usage
# File: modules/core/src/client/connection-manager.ts line 192

# Analyze Test-E2e
grep "Executable doesn't exist" /tmp/2_Test-E2e.txt
# Found: Playwright browser missing
# Cause: Docker image v1.42.1 vs package v1.56.1

# Fix: Add type guard for ESLint
# Fix: Update .github/workflows/ci-cd.yml to use playwright:v1.56.1-jammy

# Verify locally
npm run lint      # ✓ Passes
npm run test:types # ✓ Passes

# Push
git add -A
git commit -m "Fix CI failures: eslint errors and Playwright version mismatch"
git push

# Monitor
sleep 30
$GH pr checks 1826 --repo starwards/starwards
# Result: All CI checks pass ✅

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

26.75%
按下载量换算29

windsurf

23.3%
按下载量换算26

trae

17.4%
按下载量换算19

OpenCode

14.15%
按下载量换算16

Codex

7.42%
按下载量换算8

Antigravity

3.38%
按下载量换算4

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills