addressing-pr-review-c…
Address all valid review comments on a PR for the current branch in the streamlit/streamlit repo. Covers both inline review comments and general PR (issue)…
Analyze and fix failed GitHub Actions CI jobs for the current branch/PR. Use when CI checks fail, PR checks show failures, or you need to diagnose lint/type/test errors and verify fixes locally.
$ npx -y skills add streamlit/streamlit --skill fixing-streamlit-ci --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/fixing-streamlit-ciContext preview
The summary Claude sees to decide when to auto-load this skill.
Analyze and fix failed GitHub Actions CI jobs for the current branch/PR. Use when CI checks fail, PR checks show failures, or you need to diagnose lint/type/test errors and verify fixes locally.
name: fixing-streamlit-ci description: Analyze and fix failed GitHub Actions CI jobs for the current branch/PR. Use when CI checks fail, PR checks show failures, or you need to diagnose lint/type/test errors and verify fixes locally.
Diagnose and fix failed GitHub Actions CI jobs for the current branch/PR using [`gh` CLI](https://cli.github.com/manual/) and `git` commands.
Copy this checklist to track progress:
- [ ] Verify authentication - [ ] Gather context & find failed jobs - [ ] Download & analyze logs - [ ] Present diagnosis to user - [ ] Apply fix & verify locally - [ ] Push & recheck CI
gh auth status
If authentication fails, prompt user to run `gh auth login` with appropriate scopes.
# Get PR for current branch gh pr view --json number,title,url,headRefName # Get PR description and metadata gh pr view --json title,body,labels,author # List changed files gh pr diff --name-only # All changes gh pr diff
# List all checks (shows pass/fail status) gh pr checks # Get detailed check info gh pr checks --json name,state,conclusion,detailsUrl,startedAt,completedAt # List only failed runs gh run list --branch $(git branch --show-current) --status failure --limit 10 # Check if CI is still running gh run list --branch $(git branch --show-current) --status in_progress
# View run details (get RUN_ID from previous step)
gh run view {RUN_ID}
# List failed jobs with IDs
gh run view {RUN_ID} --json jobs --jq '.jobs[] | select(.conclusion == "failure") | {id: .databaseId, name: .name}'
# List failed jobs with their failed steps
gh run view {RUN_ID} --json jobs --jq '.jobs[] | select(.conclusion == "failure") | {name: .name, steps: [.steps[] | select(.conclusion == "failure") | .name]}'**Primary method:**
# Get failed logs (last 250 lines usually contains the error)
gh run view {RUN_ID} --log-failed 2>&1 | tail -250
# Target a specific failed job by ID
gh run view {RUN_ID} --job {JOB_ID} --log-failed 2>&1 | tail -100**Fallback for pending logs:**
REPO=$(gh repo view --json nameWithOwner --jq '.nameWithOwner')
gh api "/repos/${REPO}/actions/jobs/{JOB_ID}/logs"**Smart log extraction (examples):**
# Context around failure markers
gh run view {RUN_ID} --log-failed 2>&1 | grep -B 5 -A 10 -iE "error|fail|exception|traceback|panic|fatal" | head -100
# Python tests - pytest summary
gh run view {RUN_ID} --log-failed 2>&1 | grep -E -A 50 "FAILED|ERROR|short test summary"
# TypeScript/ESLint errors
gh run view {RUN_ID} --log-failed 2>&1 | grep -E -B 2 -A 5 "error TS|error "
# E2E snapshot mismatches
gh run view {RUN_ID} --log-failed 2>&1 | grep -E -B 2 -A 5 "Missing snapshot for|Snapshot mismatch for"Identify:
**Common CI failure categories:**
| Category | Workflow | Make Command | Auto-fix | |----------|----------|--------------|----------| | Python lint | `python-tests.yml` | `make python-lint` | ✅ `make autofix` | | Python types | `python-tests.yml` | `make python-types` | ❌ Manual | | Python tests | `python-tests.yml` | `make python-tests` | ❌ Manual | | Frontend lint | `js-tests.yml` | `make frontend-lint` | ✅ `make autofix` | | Frontend types | `js-tests.yml` | `make frontend-types` | ❌ Manual | | Frontend tests | `js-tests.yml` | `make frontend-tests` | ❌ Manual | | E2E tests | `playwright.yml` | `make run-e2e-test <file>` | ❌ Manual | | E2E snapshots | `playwright.yml` | `make run-e2e-test <file>` | ✅ `make update-snapshots` | | NOTICES | `js-tests.yml` | `make update-notices` | ✅ `make update-notices` | | Min constraints | `python-tests.yml` | `make update-min-deps` | ✅ `make update-min-deps` | | Pre-commit | `enforce-pre-commit.yml` | `uv run pre-commit run --all-files` | ✅ Mostly auto-fix | | Relative imports | `ensure-relative-imports.yml` | Check script output | ❌ Manual | | **PR Labels** | `require-labels.yml` | N/A | ⏭️ **Ignore** |
> 💡 **Quick win:** Run `make autofix` first for lint/formatting failures.
**For multiple failures**, list all and let user choose:
CI Failure Analysis for PR #{NUMBER}: {TITLE}
═══════════════════════════════════════════════════════════════
Found {N} failed jobs/checks:
─────────────────────────────────────────────────────────────────
1. [LINT] Python Unit Tests → Run Linters
Workflow: python-tests.yml (GitHub Actions)
Error: Ruff formatting error in lib/streamlit/elements/foo.py
Auto-fix: ✅ `make autofix`
2. [TYPE] Javascript Unit Tests → Run type checks
Workflow: js-tests.yml (GitHub Actions)
Error: TS2322: Type 'string' is not assignable to type 'number'
File: frontend/lib/src/components/Bar.tsx:42
Auto-fix: ❌ Manual fix required
─────────────────────────────────────────────────────────────────
Which failures should I address?
Recommended: "1" (auto-fixable)
Options: "1" | "1,2" | "1-2" | "all" | "only auto-fixable"**For single failure**, show detailed analysis:
───────────────────────────────────────────────────────────────── Analyzing: [TYPE] Javascript Unit Tests → Run type checks ───────────────────────────────────────────────────────────────── Category: TYPE Workflow: js-tests.yml Job: js-unit-tests (ID: 12345678) Step: Run type checks Error snippet: frontend/lib/src/components/Bar.tsx:42:5 error TS2322: Type 'string' is not assignable to type 'number'. Proposed Fix: Change type annotation or fix
Repo: streamlit/streamlit
Address all valid review comments on a PR for the current branch in the streamlit/streamlit repo. Covers both inline review comments and general PR (issue)…
Assesses whether branch or PR changes are high-risk for externally hosted or embedded Streamlit usage and recommends whether external e2e coverage with…
Validates all code changes before committing by running format, lint, type, and unit test checks. Use after making backend (Python) or frontend (TypeScript)…
Creates a draft pull request on GitHub with proper labels, branch naming, and description formatting. Use when changes are ready to be submitted as a PR to the…
Debug Streamlit frontend and backend changes using make debug with hot-reload. Use when testing code changes, investigating bugs, checking UI behavior, or…
Lists available make commands for Streamlit development. Use for build, test, lint, or format tasks.