/agent-skills:shipping-and-launchfrom agent-skills
Provides a production release checklist covering code quality, security, performance, accessibility, infrastructure, and documentation. Includes feature flag strategy, staged rollout plan, and rollback guidance for safe deployments.
Ships in agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
带着信心发布。目标不只是部署,而是安全地部署:监控到位、回滚计划就绪,并且清楚知道成功是什么样子。每次上线都应该是可回滚、可观测、增量推进的。
console.log 调试语句npm audit、pip-audit、cargo audit 等)没有 critical 或 high 漏洞通过 feature flags 发布,将部署和发布解耦:
// Feature flag check
const flags = await getFeatureFlags(userId);
if (flags.taskSharing) {
// New feature: task sharing
return <TaskSharingPanel task={task} />;
}
// Default: existing behavior
return null;
Feature flag 生命周期:
1. DEPLOY with flag OFF → Code is in production but inactive
2. ENABLE for team/beta → Internal testing in production environment
3. GRADUAL ROLLOUT → 5% → 25% → 50% → 100% of users
4. MONITOR at each stage → Watch error rates, performance, user feedback
5. CLEAN UP → Remove flag and dead code path after full rollout
规则:
1. DEPLOY to staging
└── Full test suite in staging environment
└── Manual smoke test of critical flows
2. DEPLOY to production (feature flag OFF)
└── Verify deployment succeeded (health check)
└── Check error monitoring (no new errors)
3. ENABLE for team (flag ON for internal users)
└── Team uses the feature in production
└── 24-hour monitoring window
4. CANARY rollout (flag ON for 5% of users)
└── Monitor error rates, latency, user behavior
└── Compare metrics: canary vs. baseline
└── 24-48 hour monitoring window
└── Advance only if all thresholds pass (see table below)
5. GRADUAL increase (25% -> 50% -> 100%)
└── Same monitoring at each step
└── Ability to roll back to previous percentage at any point
6. FULL rollout (flag ON for all users)
└── Monitor for 1 week
└── Clean up feature flag
用这些阈值判断每个阶段应该继续推进、暂停调查,还是回滚:
| 指标 | 继续推进(green) | 暂停并调查(yellow) | 回滚(red) |
|---|---|---|---|
| Error rate | 基线 10% 以内 | 高于基线 10-100% | >2x baseline |
| P95 latency | 基线 20% 以内 | 高于基线 20-50% | >50% above baseline |
| Client JS errors | 没有新错误类型 | 新错误出现在 <0.1% 的 sessions 中 | 新错误出现在 >0.1% 的 sessions 中 |
| Business metrics | 中性或正向 | 下降 <5%(可能是噪声) | 下降 >5% |
如果出现以下情况,立即回滚:
Application metrics:
├── Error rate (total and by endpoint)
├── Response time (p50, p95, p99)
├── Request volume
├── Active users
└── Key business metrics (conversion, engagement)
Infrastructure metrics:
├── CPU and memory utilization
├── Database connection pool usage
├── Disk space
├── Network latency
└── Queue depth (if applicable)
Client metrics:
├── Core Web Vitals (LCP, INP, CLS)
├── JavaScript errors
├── API error rates from client perspective
└── Page load time
// Set up error boundary with reporting
class ErrorBoundary extends React.Component {
state = { hasError: false };
static getDerivedStateFromError() {
return { hasError: true };
}
componentDidCatch(error: Error, info: React.ErrorInfo) {
// Report to error tracking service
reportError(error, {
componentStack: info.componentStack,
userId: getCurrentUser()?.id,
page: window.location.pathname,
});
}
render() {
if (this.state.hasError) {
return <ErrorFallback onRetry={() => this.setState({ hasError: false })} />;
}
return this.props.children;
}
}
// Server-side error reporting
app.use((err: Error, req: Request, res: Response, next: NextFunction) => {
reportError(err, {
method: req.method,
url: req.url,
userId: req.user?.id,
});
// Don't expose internals to users
res.status(500).json({
error: { code: 'INTERNAL_ERROR', message: 'Something went wrong' },
});
});
上线后的第一个小时内:
1. Check health endpoint returns 200
2. Check error monitoring dashboard (no new error types)
3. Check latency dashboard (no regression)
4. Test the critical user flow manually
5. Verify logs are flowing and readable
6. Confirm rollback mechanism works (dry run if possible)
服务的 error budget(SLO 允许失败的请求或时间占比)决定现在发布是否安全。把它当作客观门禁,而不是谈判筹码:
Budget remaining > 20% → Ship normally; monitor closely
Budget remaining 0–20% → Slow rollouts only; no high-risk changes
Budget exhausted → Freeze feature work; focus entirely on reliability
Budget resets → Resume normal pace; bake in the fix that recovered it
Canary 期间的高 burn rate(消耗预算的速度快于基线节奏)是上面发布决策阈值表中的暂停信号:按 error rate 升高同等处理。
每次部署发生之前都需要回滚计划:
## Rollback Plan for [Feature/Release]
### Trigger Conditions
- Error rate > 2x baseline
- P95 latency > [X]ms
- User reports of [specific issue]
### Rollback Steps
1. Disable feature flag (if applicable)
OR
1. Deploy previous version: `git revert <commit> && git push`
2. Verify rollback: health check, error monitoring
3. Communicate: notify team of rollback
### Database Considerations
- Migration [X] has a rollback: <verified command or runbook link>
- Data inserted by new feature: [preserved / cleaned up]
### Time to Rollback
- Feature flag: < 1 minute
- Redeploy previous version: < 5 minutes
- Database rollback: < 15 minutes
../../references/definition-of-done.md../../references/security-checklist.md../../references/performance-checklist.md../../references/accessibility-checklist.mdobservability-and-instrumentation| 合理化借口 | 现实 |
|---|---|
| “它在 staging 能用,production 也会能用” | Production 有不同的数据、流量模式和边界情况。部署后要监控。 |
| “这个不需要 feature flags” | 每个功能都受益于 kill switch。即使“简单”变更也可能破坏东西。 |
| “监控是额外负担” | 没有监控意味着你会从用户投诉而不是 dashboard 中发现问题。 |
| “以后再加监控” | 上线前就添加。看不见的东西无法调试。 |
| “回滚就是承认失败” | 回滚是负责任的工程实践。发布坏功能才是失败。 |
| “Error rate 看起来正常,继续发” | 要看 burn rate,不要只看当前 error rate。消耗预算快于基线就是暂停信号,即使各项单独阈值都是 green。 |
部署前:
部署后:
对每个已发布的服务:
What SKILL.md sets; muted values are Claude Code's defaults
25 skills in this plugin
/api-and-interface-design指导稳定的 API 和接口设计。设计 API、模块边界或任何公共接口时使用。创建 REST 或 GraphQL endpoint、定义模块之间的类型契约,或建立前后端边界时使用。/browser-testing-with-devtools在真实浏览器中测试。构建或调试任何在浏览器中运行的内容时使用。当你需要通过 Chrome DevTools MCP 检查 DOM、捕获 console 错误、分析网络请求、分析性能,或用真实运行时数据验证视觉输出时使用。需要已配置 chrome-devtools MCP server。/ci-cd-and-automation自动化 CI/CD pipeline 设置。用于设置或修改构建和部署 pipeline 时;用于需要自动化质量门禁、在 CI 中配置 test runners,或建立部署策略时。/code-review-and-quality执行多维度代码审查。用于合并任何变更之前;用于审查自己、其他 agent 或人类编写的代码;用于在代码进入主分支前从多个维度评估代码质量。用于被要求 review 一个 diff 或 pull request 时,即使 diff 被内联粘贴。npx claudepluginhub vinvcn/addyosmani-agent-skills-zh --plugin agent-skillsOther plugins' skills for the same job