luckyonetwothree/vibe-skill-study/release-gradual

Claude Code and agent skill by luckyonetwothree/vibe-skill-study

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

当需要执行灰度发布时使用。灰度发布自动执行,执行渐进式灰度发布,从1%到10%到50%到100%,各阶段自动监控指标并判断是否进入下一阶段,支持P0指标恶化时自动回滚。🤖 AI自动执行。关键词:灰度发布、渐进式发布、Feature Flag、自动回滚、发布策略、金丝雀发布、小流量、逐步放量。

Install

npx vskill@latest install luckyonetwothree/vibe-skill-study/release-gradual

SKILL.md

The same SKILL.md was published earlier as luckyonetwothree/vibe-skill-study/release-gradual.

灰度发布自动执行

核心原则

  1. 触发器驱动:由质量门禁通过事件自动触发灰度发布,指标恶化自动触发回滚
  2. 自动化验收:各阶段指标自动监控,阶段转换自动判定,回滚自动执行
  3. 持续部署:灰度策略配合Feature Flag,实现渐进式部署和即时回滚
  4. 实时复盘:各阶段指标实时汇总,发布完成后即时生成复盘输入

交互模式

🤖 AI自动执行

触发条件:

  • 质量门禁通过
  • 手动触发(发布负责人确认)

输入

输入项类型必填来源说明
发布内容JSON是发布管理系统待发布的版本和变更内容
Feature Flag配置JSON是Feature Flag系统灰度开关配置
监控指标定义JSON是监控系统各阶段监控指标
灰度策略配置JSON是发布策略库各阶段流量比例和持续时间
发布内容结构示例
json
{
"release_id": "release_2024_0125_001",
"version": "v2.1.0",
"build_ref": "abc123def",
"change_summary": "新增微信登录功能,优化登录流程",
"affected_services": ["auth-service", "user-service"],
"rollback_version": "v2.0.9",
"rollback_strategy": "feature_flag_offline"
}

灰度阶段配置

标准灰度阶段
阶段流量比例持续时间最小持续时间通过条件
Stage 00% (验证)-10分钟构建验证通过
Stage 11%30分钟30分钟核心指标无异常
Stage 210%2小时1小时P0指标稳定
Stage 350%4小时2小时无新增异常
Stage 4100%--所有条件通过
护栏指标配置
json
{
"guardrail_metrics": {
"p0_metrics": [
{
"name": "error_rate",
"description": "5xx错误率",
"unit": "percentage",
"warning_threshold": 0.01,
"rollback_threshold": 0.03,
"comparison": "vs_baseline"
},
{
"name": "latency_p99",
"description": "P99响应时间",
"unit": "milliseconds",
"warning_threshold": 500,
"rollback_threshold": 1000,
"comparison": "vs_baseline"
},
{
"name": "availability",
"description": "服务可用性",
"unit": "percentage",
"warning_threshold": 99.9,
"rollback_threshold": 99.0,
"comparison": "absolute"
}
],
"p1_metrics": [
{
"name": "api_success_rate",
"description": "API成功率",
"unit": "percentage",
"warning_threshold": 99,
"rollback_threshold": 97
},
{
"name": "error_count",
"description": "错误次数",
"unit": "count",
"warning_threshold": 100,
"rollback_threshold": 500
}
],
"p2_metrics": [
{
"name": "conversion_rate",
"description": "业务转化率",
"unit": "percentage",
"warning_threshold": -10,
"rollback_threshold": -30,
"comparison": "vs_previous_phase"
}
]
}
}

执行步骤

Step 1: 灰度计划生成
1.1 发布前验证

验证清单:

验证项检查内容失败处理
构建产物验证构建产物完整性阻止发布
回滚版本确认回滚版本可用阻止发布
Feature Flag验证Flag配置正确阻止发布
监控告警验证告警规则已配置阻止发布
值班人员确认值班人员在线警告

验证输出:

json
{
"pre_release_verification": {
"build_artifact": {"verified": true, "sha256": "abc123..."},
"rollback_version": {"available": true, "version": "v2.0.9"},
"feature_flag": {"configured": true, "flag_key": "feature_wechat_login"},
"monitoring": {"alerts_configured": true, "channel": "pagerduty"},
"on_call": {"confirmed": true, "engineer": "dev_zhang"},
"ready_to_release": true
}
}
1.2 灰度计划生成

计划结构:

json
{
"canary_plan": {
"plan_id": "canary_2024_0125_001",
"release_id": "release_2024_0125_001",
"phases": [
{
"phase_id": "phase_1",
"traffic_percentage": 1,
"duration_minutes": 30,
"min_duration_minutes": 30,
"target_users": {
"strategy": "random",
"percentage": 1
},
"success_criteria": {
"p0_metrics": "all_normal",
"p1_metrics": "all_normal",
"manual_approval": false
}
},
{
"phase_id": "phase_2",
"traffic_percentage": 10,
"duration_minutes": 120,
"min_duration_minutes": 60,
"target_users": {
"strategy": "random",
"percentage": 10
},
"success_criteria": {
"p0_metrics": "stable",
"p1_metrics": "all_normal",
"manual_approval": true
}
},
{
"phase_id": "phase_3",
"traffic_percentage": 50,
"duration_minutes": 240,
"min_duration_minutes": 120,
"target_users": {
"strategy": "random",
"percentage": 50
},
"success_criteria": {
"p0_metrics": "stable",
"p1_metrics": "stable",
"manual_approval": true
}
},
{
"phase_id": "phase_4",
"traffic_percentage": 100,
"duration_minutes": null,
"target_users": {
"strategy": "all"
},
"success_criteria": {
"p0_metrics": "all_normal",
"p1_metrics": "all_normal",
"manual_approval": true
}
}
]
}
}
Step 2: Feature Flag自动配置
2.1 Flag配置生成

配置规则:

json
{
"feature_flag_config": {
"flag_key": "feature_wechat_login",
"flag_type": "boolean",
"default_value": false,
"serving_config": {
"phase_1": {
"percentage": 1,
"rules": [
{
"name": "random_1_percent",
"percentage": 1,
"variation": true
}
]
},
"phase_2": {
"percentage": 10,
"rules": [
{
"name": "random_10_percent",
"percentage": 10,
"variation": true
}
]
},
"phase_3": {
"percentage": 50,
"rules": [
{
"name": "random_50_percent",
"percentage": 50,
"variation": true
}
]
},
"phase_4": {
"percentage": 100,
"rules": [
{
"name": "all_users",
"percentage": 100,
"variation": true
}
]
}
}
}
}
2.2 Flag状态追踪

状态记录:

json
{
"flag_status_tracking": {
"flag_key": "feature_wechat_login",
"current_phase": "phase_2",
"current_traffic_percentage": 10,
"last_updated": "ISO8601",
"updated_by": "release-gradual-pipeline",
"history": [
{"timestamp": "ISO8601", "phase": "phase_1", "percentage": 1, "action": "enabled"},
{"timestamp": "ISO8601", "phase": "phase_2", "percentage": 10, "action": "increased"},
{"timestamp": "ISO8601", "phase": "phase_2", "percentage": 0, "action": "rollback"}
]
}
}
Step 3: 各阶段自动监控
3.1 指标采集

采集配置:

json
{
"metrics_collection": {
"interval_seconds": 30,
"metrics": [
{"name": "error_rate", "source": "prometheus", "query": "rate(http_requests_total{status=~'5..'}[5m])"},
{"name": "latency_p99", "source": "prometheus", "query": "histogram_quantile(0.99, rate(http_request_duration_seconds_bucket[5m]))"},
{"name": "availability", "source": "synthetic_monitoring", "frequency": "1m"}
]
}
}
3.2 阶段状态评估

评估规则:

指标类型评估条件评估结果
P0全部正常无指标超warning阈值可进入下一阶段
P0任一告警任一指标超warning但未超rollback继续观察
P0恶化任一指标超rollback阈值立即回滚
P1告警P1指标超阈值延迟+告警

阶段评估输出:

json
{
"phase_assessment": {
"phase_id": "phase_2",
"assessed_at": "ISO8601",
"duration_minutes": 90,
"metrics_summary": {
"p0_metrics": {
"error_rate": {"current": 0.002, "baseline": 0.001, "status": "normal"},
"latency_p99": {"current": 150, "baseline": 140, "status": "normal"},
"availability": {"current": 99.99, "baseline": 99.99, "status": "normal"}
},
"p1_metrics": {
"api_success_rate": {"current": 99.5, "baseline": 99.8, "status": "normal"}
},
"p2_metrics": {
"conversion_rate": {"current": -2, "baseline": 0, "status": "normal"}
}
},
"overall_status": "healthy",
"recommendation": "can_proceed",
"confidence": 0.95
}
}
3.3 阶段转换决策

决策流程:

┌─────────────────┐
│ 阶段时间已满? │
└────────┬────────┘
│
┌────┴────┐
│ │
是 否
│ │
▼ ▼
┌────────┐ ┌─────────────────┐
│指标评估│ │继续监控 │
└───┬────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ 所有P0指标正常?│
└────────┬────────┘
│
┌────┴────┐
│ │
是 否
│ │
▼ ▼
┌────────┐ ┌─────────────────┐
│进入下一 │ │ 告警/观察/回滚 │
│阶段 │ └─────────────────┘
└────────┘

转换输出:

json
{
"phase_transition_decision": {
"current_phase": "phase_2",
"decision": "proceed_to_next_phase",
"next_phase": "phase_3",
"reason": "阶段持续时间已满,所有P0指标正常",
"metrics_verified": true,
"approved_by": "release-gradual-pipeline",
"scheduled_at": "ISO8601"
}
}
Step 4: 自动回滚触发
4.1 回滚触发条件

触发规则:

条件触发动作延迟
P0指标超rollback阈值立即自动回滚0秒
服务不可用立即自动回滚0秒
P1指标超rollback阈值延迟观察5分钟
人工确认异常手动触发0秒
4.2 回滚执行

回滚流程:

触发回滚
│
▼
┌─────────────────┐
│ 通知相关人员 │
└────────┬────────┘
│
┌────┴────┐
│ │
自动化 人工
│ │
▼ ▼
┌─────────┐ ┌─────────────────┐
│关闭Flag │ │确认并执行 │
│切换流量 │ └─────────────────┘
└────┬────┘
│
▼
┌─────────────────┐
│ 验证回滚结果 │
└────────┬────────┘
│
┌────┴────┐
│ │
成功 失败
│ │
▼ ▼
┌─────────┐ ┌─────────────────┐
│记录完成 │ │告警升级人工介入 │
└─────────┘ └─────────────────┘

回滚执行输出:

json
{
"rollback_execution": {
"rollback_id": "rollback_2024_0125_002",
"trigger": {
"reason": "P0指标恶化",
"metric": "error_rate",
"current_value": 0.035,
"threshold": 0.03
},
"action": {
"step_1": "关闭Feature Flag",
"step_2": "等待流量完全切换",
"step_3": "验证旧版本健康"
},
"status": "completed",
"completed_at": "ISO8601",
"duration_seconds": 45,
"verification": {
"traffic_restored": true,
"old_version_healthy": true,
"error_rate_recovered": true
}
}
}
4.3 回滚后处理

处理清单:

json
{
"post_rollback_actions": [
{
"action": "通知发布团队",
"type": "notification",
"recipients": ["release_lead", "dev_lead", "product_manager"]
},
{
"action": "记录回滚事件",
"type": "documentation",
"content": "回滚原因、持续时间、影响范围"
},
{
"action": "创建事件跟进Ticket",
"type": "ticket",
"template": "post_incident_review"
},
{
"action": "分析根因",
"type": "analysis",
"deadline": "24小时内"
}
]
}

输出

存储路径:output/pm-monitoring/release-gradual/

输出文件:release_status.json

输出Schema:

json
{
"type": "object",
"required": ["output_id", "release_id", "release_status"],
"properties": {
"output_id": {"type": "string", "description": "输出唯一标识"},
"release_id": {"type": "string", "description": "发布ID"},
"generated_at": {"type": "string", "description": "生成时间"},
"release_status": {"type": "object", "description": "当前发布状态,包含阶段、流量比例和进度"},
"phase_transitions": {"type": "array", "description": "阶段转换历史记录"},
"rollback_history": {"type": "array", "description": "回滚历史记录"},
"monitoring_metrics": {"type": "object", "description": "监控数据汇总,包含当前和历史指标"},
"canary_plan": {"type": "object", "description": "灰度发布计划"}
}
}
最终输出结构

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
2
7-day trend score
5

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/luckyonetwothree/vibe-skill-study/release-gradual/badge)](https://verified-skill.com/skills/luckyonetwothree/vibe-skill-study/release-gradual)

Something wrong with this skill or its page? Tell us.