Communitygithub.com

CI/CD 排障专家

CI 变红?联系我们。管道消防队已就绪。在用户提及 CI 失败、构建错误、测试失败或管道问题时使用。不要用于:本地构建、标准实现工作、代码审查或环境设置。

CD 排障专家 是什么?

该技能专注于诊断和修复 CI/CD 管道失败,例如 GitHub Actions 失败、构建错误或测试未通过。它引导代理执行结构化决策流程:首先确定失败原因是实现错误、测试过时还是环境问题,并明确禁止篡改测试(如跳过测试、删除断言)。它还提供详细的 git 日志分析(在 Claude Code 2.1.49+ 中),用于识别导致失败的提交。对于复杂的多文件错误或修复后再次失败的循环,它可以自动启动一个名为 ci-cd-fixer 的子代理,该代理默认以 dry-run 模式运行以确保安全。该技能包含清晰的批准流程、针对 VibeCoder 的友好提示,以及防止测试作弊的坚实保护措施。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/bg-szy/TOP-SKILLS/tree/HEAD/skills/marketplace/ci

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

CI/CD 技能

解决 CI/CD 管道问题的技能集。


触发条件

  • 「CI 失败了」「GitHub Actions 失败了」
  • 「构建错误」「测试未通过」
  • 「修一下管道」

功能详情

功能详情触发词
失败分析参见 references/analyzing-failures.md「看日志」「查原因」
测试修复参见 references/fixing-tests.md「修测试」「给个修复方案」

执行步骤

  1. 测试 vs 实现判定(步骤 0)
  2. 对用户意图进行分类(分析或修复)
  3. 判定复杂度(见下文)
  4. 根据上述「功能详情」读取相应的参考文件,或启动 ci-cd-fixer 子代理
  5. 确认结果,必要时重新执行

步骤 0:测试 vs 实现判定(质量判定关卡)

CI 失败时,首先进行原因区分:

CI 失败报告
    ↓
┌─────────────────────────────────────────┐
│           测试 vs 实现判定               │
├─────────────────────────────────────────┤
│  分析错误原因:                          │
│  ├── 实现错误 → 修复实现                  │
│  ├── 测试过时 → 向用户确认                │
│  └── 环境问题 → 修复环境                  │
└─────────────────────────────────────────┘

禁止事项(防篡改)

⚠️ CI 失败时的禁止事项

以下「解决方案」是禁止的:

| 禁止 | 示例 | 正确的做法 |
|------|------|-------------|
| 跳过测试 | `it.skip(...)` | 修复实现 |
| 删除断言 | 删掉 `expect()` | 检查预期值 |
| 绕过 CI 检查 | `continue-on-error` | 修复根本原因 |
| 放宽 lint 规则 | `eslint-disable` | 修复代码 |

判断流程

🔴 CI 失败了

**需要判定**:

1. **实现错误** → 修复实现 ✅
2. **测试预期值过时** → 向用户确认
3. **环境问题** → 修复环境配置

⚠️ 禁止篡改测试(跳过测试、删除断言)

属于哪种情况?

需要批准的情况

如果不可避免地要修改测试/配置:

## 🚨 测试/配置变更审批请求

### 原因
[为什么需要这个变更]

### 变更内容
[差异]

### 替代方案评估
- [ ] 是否已确认可以通过修复实现解决

等待用户明确批准

Git log 扩展标志的运用(CC 2.1.49+)

在 CI 失败时,利用结构化日志定位原因提交。

定位原因提交

# 以结构化格式分析提交
$ git log --format="%h|%s|%an|%ad" --date=short -10

# 按拓扑顺序进行时序分析
$ git log --topo-order --oneline -20

# 关联变更文件与原因
$ git log --raw --oneline -5

主要应用场景

用途标志效果
定位失败原因`--format="%h%s"`
按时间追踪--topo-order考虑合并顺序的追踪
了解变更影响--raw详细显示文件变更
排除合并分析--cherry-pick --no-merges只提取实际提交

输出示例

🔍 CI 失败原因分析

最近的提交(结构化):
| Hash | Subject | Author | Date |
|------|---------|--------|------|
| a1b2c3d | feat: update API | Alice | 2026-02-04 |
| e4f5g6h | test: add tests | Bob | 2026-02-03 |

变更文件(--raw):
├── src/api/endpoint.ts (Modified) ← 类型错误出现
├── tests/api.test.ts (Modified)
└── package.json (Modified)

→ a1b2c3d 这个提交极有可能是原因
  类型错误:src/api/endpoint.ts:42

子代理协作

满足以下条件时,使用 Task 工具启动 ci-cd-fixer:

  • 修复 → 再执行 → 失败的循环发生了 2次或以上
  • 或错误涉及多个文件的复杂情况

启动模式:

Task tool:
  subagent_type="ci-cd-fixer"
  prompt="请诊断并修复 CI 失败。错误日志:{error_log}"

ci-cd-fixer 以安全第一为原则运行(默认 dry-run 模式)。 详情参见 agents/ci-cd-fixer.md。


面向 VibeCoder

🔧 CI 坏了时的说法

1. **「CI 挂了」「变红了」**
   - 自动测试失败的状态

2. **「为什么失败了?」**
   - 希望调查原因

3. **「帮我修好」**
   - 自动尝试修复

💡 重要:禁止「敷衍了事」的修复
   - ❌ 删除测试、跳过测试
   - ⭕ 正确修复代码

如果你觉得「测试可能有问题」,
先确认再决定怎么处理吧

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

bg-szy/TOP-SKILLS

Brand-first landing page designer — runs a brand-identity interview (colors, typography, shape language), then generates and iterates on a polished landing page via Stitch with deployment-ready HTML. Use when the user asks to create, design, or build a landing page, homepage, or marketing page and has no established visual direction. Skip when they have a design mockup, need a dashboard or app UI, are working at component level, building a multi-page app, or restyling with known design tokens — use frontend-design instead.

bg-szy/TOP-SKILLS

Fill out Microsoft Azure Landing Zone (ALZ) Accelerator checklists by interviewing the user, mapping their Azure subscriptions, integrating IP addressing documentation, and applying Microsoft Cloud Adoption Framework best practices. Produces a completed Excel checklist (.xlsx) ready for ALZ deployment. Use this skill whenever the user mentions Azure Landing Zone, ALZ checklist, landing zone accelerator, platform landing zone configuration, ALZ bootstrap, hub-and-spoke setup, Azure network topology planning, or wants to fill out any ALZ-related checklist or configuration file. Also trigger when the user uploads an Excel file that contains tabs like "Accelerator - Bootstrap", "Accelerator - Bicep", or "Accelerator - Terraform".

bg-szy/TOP-SKILLS

Compose a premium, animated landing page section by section in Next.js + Tailwind + Motion (Framer Motion) — built on a real design system, with editorial copy and motion that feels human-crafted, not template-generated. Use when building or rebuilding a landing page, marketing site, or hero/feature/pricing/CTA sections that need to look production-ready and bespoke from day one.

bg-szy/TOP-SKILLS

Write high-converting landing page copy using proven frameworks like PAS (Problem-Agitate-Solution), AIDA, and StoryBrand. Creates headlines, value propositions, CTAs, and full page sections optimized for conversion. Use when users need landing page copy, sales page content, or marketing website text.

bg-szy/TOP-SKILLS

Optimize landing pages for conversions, performance, and SEO. Use when improving landing pages, increasing conversions, or optimizing page performance.

bg-szy/TOP-SKILLS

Review investment portfolios for risk, diversification, fees. Asset allocation recommendations, tax-loss harvesting, rebalancing.

bg-szy/TOP-SKILLS

Beads Viewer - Graph-aware triage engine for Beads projects. Computes PageRank, betweenness, critical path, and cycles. Use --robot-* flags for AI agents.

bg-szy/TOP-SKILLS

CASS Memory System - procedural memory for AI coding agents. Three-layer cognitive architecture with confidence decay, anti-pattern learning, cross-agent knowledge transfer, trauma guard safety system. Bun/TypeScript CLI.

bg-szy/TOP-SKILLS

Mandatory entry point: read this first for any request to make, create, edit, animate, or render a video, animation, or motion graphic, including a promo, explainer, captioned clip, title card, overlay, slideshow or interactive deck, Remotion port, or any HyperFrames HTML composition. Also use it to inspect, diagnose, validate, preview, publish, or batch-render an existing HyperFrames project. Inputs may be a website URL, GitHub PR, Figma design or URL, text or brief, existing footage, or music. It resumes project state, captures intent when applicable, selects and installs the owning workflow, and routes domain capabilities. HyperFrames is the default output framework unless the user explicitly chooses another framework for the deliverable or asks only to record a browser session.

bg-szy/TOP-SKILLS

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

bg-szy/TOP-SKILLS

Use when the user asks to "pre-launch check the landing page", "run a Quality-Score preflight", or "verify ad-to-page message match before launch"; produces an ad↔page continuity report — message-match gaps, above-the-fold check, page-speed read, form-friction count, mobile-render flags — as a pass/fix punch list. Not for redesigning or rewriting the page — use landing-optimizer; not for scoring the account or the RQS — use ad-account-auditor. 落地页体验预检/广告落地页一致性检查

bg-szy/TOP-SKILLS

Use when the user asks to "optimize our landing page for influencer traffic", "fix our promo-code landing page", or "improve conversion from a creator campaign"; produces a message-match audit, page-structure and social-proof recommendations, a promo-code/CTA conversion plan, and an A/B test roadmap. Not for measuring campaign results after launch — use performance-analyzer.

bg-szy/TOP-SKILLS

Audit a landing page, sales page or checkout page for conversion leaks and return a fix list ordered by expected revenue impact. Use when asked to review, critique or improve a landing page, sales page, opt-in page, product page or checkout flow, when conversion rate is low, when paid traffic is not converting, or when someone asks "why isn't this page converting" or wants a CRO / landing page review.

bg-szy/TOP-SKILLS

Landing page conversion optimization with layout rules, hero section design, and CTA psychology. Covers above-the-fold formula, social proof placement, mobile design, and F-pattern reading. Use for: startup landing pages, product pages, SaaS marketing, conversion optimization. Triggers: landing page, hero section, above the fold, conversion optimization, landing page design, cta button, hero image, landing page layout, saas landing page, product page design, conversion rate, landing page best practices

bg-szy/TOP-SKILLS

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

bg-szy/TOP-SKILLS

Landing page conversion optimization with layout rules, hero section design, and CTA psychology. Covers above-the-fold formula, social proof placement, mobile design, and F-pattern reading. Use for: startup landing pages, product pages, SaaS marketing, conversion optimization. Triggers: landing page, hero section, above the fold, conversion optimization, landing page design, cta button, hero image, landing page layout, saas landing page, product page design, conversion rate, landing page best practices

bg-szy/TOP-SKILLS

Account assets, equity and fund positions, P&L, cash flow records, account statements, margin ratios, buy-power estimates, order management, and DCA recurring investments via Longbridge (most require Trade permission). Frameworks: portfolio diagnosis, rebalancing, asset allocation, risk analysis (VaR/CVaR), performance attribution, and tax-loss harvesting. Triggers: "持仓", "账户", "盈亏", "资产", "对账单", "下单", "买入", "卖出", "撤单", "定投", "组合诊断", "再平衡", "资产配置", "风险分析", "绩效归因", "税损收割", "持倉", "賬戶", "盈虧", "對賬單", "下單", "買入", "賣出", "組合診斷", "再平衡", "稅損收割", "positions", "portfolio", "P&L", "order", "buy", "sell", "DCA", "statement", "risk analysis", "rebalancing", "tax harvesting", "我的风险", "持仓风险", "风险敞口", "資產", "資產配置", "風險分析", "績效歸因", "撤單

bg-szy/TOP-SKILLS

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

bg-szy/TOP-SKILLS

Process video files with audio extraction, format conversion (mp4, webm), and Whisper transcription. Use when user mentions video conversion, audio extraction, transcription, mp4, webm, ffmpeg, or whisper transcription.

bg-szy/TOP-SKILLS

Using the Wonda CLI to generate images, videos, music, and audio from the terminal — plus LinkedIn, Reddit, and X/Twitter research and automation

相关技能