Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
customerio-prod-checklist【部署与运维】Execute Customer.io production deployment checklist. Use when preparing for production launch, reviewing integration quality, or performing pre-launch audits. Trigger with phrases like "customer.io production", "customer.io checklist", "deploy customer.io", "customer.io go-live".
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Comprehensive checklist for deploying Customer.io integrations to production.
# Verify production credentials are set
echo "Checking credentials..."
[ -n "$CUSTOMERIO_SITE_ID" ] && echo "Site ID: OK" || echo "Site ID: MISSING"
[ -n "$CUSTOMERIO_API_KEY" ] && echo "API Key: OK" || echo "API Key: MISSING"
# Verify correct region
echo "Region: ${CUSTOMERIO_REGION:-us}"
Checklist:
// scripts/integration-audit.ts
async function auditIntegration(): Promise<AuditResult> {
const results: AuditResult = {
passed: [],
warnings: [],
failures: []
};
// Check identify calls have required attributes
// Check event names follow naming convention
// Check timestamps are Unix seconds
// Check no PII in unsafe fields
return results;
}
Checklist:
snake_case conventionIn Customer.io Dashboard:
Checklist:
// lib/monitoring.ts
import { metrics } from './metrics';
// Key metrics to monitor
const customerIOMetrics = {
// API metrics
'customerio.api.latency': 'histogram',
'customerio.api.errors': 'counter',
'customerio.api.rate_limited': 'counter',
// Delivery metrics
'customerio.email.sent': 'counter',
'customerio.email.delivered': 'counter',
'customerio.email.bounced': 'counter',
'customerio.email.complained': 'counter',
// Business metrics
'customerio.users.identified': 'counter',
'customerio.events.tracked': 'counter'
};
// Recommended alerts
const alertThresholds = {
'api_error_rate': { threshold: 0.01, window: '5m' },
'bounce_rate': { threshold: 0.05, window: '1h' },
'complaint_rate': { threshold: 0.001, window: '1h' },
'delivery_latency_p99': { threshold: 5000, window: '5m' }
};
Checklist:
#!/bin/bash
# production-smoke-test.sh
echo "Running production smoke tests..."
# Test 1: API connectivity
curl -s -o /dev/null -w "%{http_code}" \
-X POST "https://track.customer.io/api/v1/customers/smoke-test-$(date +%s)" \
-u "$CUSTOMERIO_SITE_ID:$CUSTOMERIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"smoketest@example.com","_test":true}' | grep -q "200" && \
echo "API: OK" || echo "API: FAILED"
# Test 2: Event tracking
curl -s -o /dev/null -w "%{http_code}" \
-X POST "https://track.customer.io/api/v1/customers/smoke-test/events" \
-u "$CUSTOMERIO_SITE_ID:$CUSTOMERIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"smoke_test","data":{"timestamp":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}}' | grep -q "200" && \
echo "Events: OK" || echo "Events: FAILED"
echo "Smoke tests complete"
Checklist:
Checklist:
// Rollback procedure documented
const rollbackPlan = {
trigger: 'Error rate > 5% or delivery rate < 90%',
steps: [
'1. Disable new user identify calls',
'2. Pause triggered campaigns',
'3. Switch to backup messaging provider (if available)',
'4. Notify stakeholders',
'5. Investigate root cause',
'6. Fix and redeploy',
'7. Resume campaigns with reduced volume',
'8. Monitor closely for 24 hours'
],
contacts: {
engineering: 'engineering@company.com',
customerio_support: 'support@customer.io',
escalation: 'oncall@company.com'
}
};
Checklist:
| Category | Status | Notes |
|---|---|---|
| Credentials | [ ] | Prod keys in secrets manager |
| Integration | [ ] | Code reviewed and tested |
| Campaigns | [ ] | All campaigns production-ready |
| Deliverability | [ ] | Domain authenticated |
| Monitoring | [ ] | Alerts configured |
| Testing | [ ] | All tests passing |
| Documentation | [ ] | Runbooks complete |
| Rollback | [ ] | Plan documented |
After production launch, proceed to customerio-upgrade-migration for SDK maintenance.