@intentsolutionsio/vercel-pack 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +67 -44
- package/package.json +4 -4
- package/skills/vercel-advanced-troubleshooting/SKILL.md +185 -195
- package/skills/vercel-advanced-troubleshooting/references/errors.md +11 -0
- package/skills/vercel-advanced-troubleshooting/references/evidence-collection-framework.md +34 -0
- package/skills/vercel-advanced-troubleshooting/references/examples.md +11 -0
- package/skills/vercel-advanced-troubleshooting/references/systematic-isolation.md +56 -0
- package/skills/vercel-advanced-troubleshooting/references/timing-analysis.md +35 -0
- package/skills/vercel-architecture-variants/SKILL.md +227 -216
- package/skills/vercel-architecture-variants/references/errors.md +11 -0
- package/skills/vercel-architecture-variants/references/examples.md +12 -0
- package/skills/vercel-architecture-variants/references/variant-a-monolith-(simple).md +44 -0
- package/skills/vercel-architecture-variants/references/variant-b-service-layer-(moderate).md +72 -0
- package/skills/vercel-architecture-variants/references/variant-c-microservice-(complex).md +81 -0
- package/skills/vercel-ci-integration/SKILL.md +183 -73
- package/skills/vercel-ci-integration/references/errors.md +10 -0
- package/skills/vercel-ci-integration/references/examples.md +36 -0
- package/skills/vercel-ci-integration/references/implementation.md +54 -0
- package/skills/vercel-common-errors/SKILL.md +164 -60
- package/skills/vercel-common-errors/references/errors.md +53 -0
- package/skills/vercel-common-errors/references/examples.md +23 -0
- package/skills/vercel-cost-tuning/SKILL.md +158 -145
- package/skills/vercel-cost-tuning/references/cost-estimation.md +34 -0
- package/skills/vercel-cost-tuning/references/cost-reduction-strategies.md +40 -0
- package/skills/vercel-cost-tuning/references/errors.md +11 -0
- package/skills/vercel-cost-tuning/references/examples.md +15 -0
- package/skills/vercel-data-handling/SKILL.md +202 -155
- package/skills/vercel-data-handling/references/errors.md +11 -0
- package/skills/vercel-data-handling/references/examples.md +27 -0
- package/skills/vercel-data-handling/references/implementation.md +223 -0
- package/skills/vercel-debug-bundle/SKILL.md +163 -67
- package/skills/vercel-debug-bundle/references/errors.md +12 -0
- package/skills/vercel-debug-bundle/references/examples.md +24 -0
- package/skills/vercel-debug-bundle/references/implementation.md +54 -0
- package/skills/vercel-deploy-integration/SKILL.md +163 -156
- package/skills/vercel-deploy-integration/references/errors.md +11 -0
- package/skills/vercel-deploy-integration/references/examples.md +21 -0
- package/skills/vercel-deploy-integration/references/google-cloud-run.md +36 -0
- package/skills/vercel-deploy-integration/references/vercel-deployment.md +35 -0
- package/skills/vercel-deploy-preview/SKILL.md +164 -39
- package/skills/vercel-edge-functions/SKILL.md +185 -37
- package/skills/vercel-enterprise-rbac/SKILL.md +185 -170
- package/skills/vercel-enterprise-rbac/references/errors.md +11 -0
- package/skills/vercel-enterprise-rbac/references/examples.md +12 -0
- package/skills/vercel-enterprise-rbac/references/role-implementation.md +33 -0
- package/skills/vercel-enterprise-rbac/references/sso-integration.md +35 -0
- package/skills/vercel-hello-world/SKILL.md +141 -55
- package/skills/vercel-incident-runbook/SKILL.md +186 -138
- package/skills/vercel-incident-runbook/references/errors.md +11 -0
- package/skills/vercel-incident-runbook/references/examples.md +10 -0
- package/skills/vercel-incident-runbook/references/immediate-actions-by-error-type.md +41 -0
- package/skills/vercel-install-auth/SKILL.md +130 -53
- package/skills/vercel-known-pitfalls/SKILL.md +235 -233
- package/skills/vercel-known-pitfalls/references/errors.md +11 -0
- package/skills/vercel-known-pitfalls/references/examples.md +12 -0
- package/skills/vercel-load-scale/SKILL.md +197 -204
- package/skills/vercel-load-scale/references/capacity-planning.md +47 -0
- package/skills/vercel-load-scale/references/errors.md +11 -0
- package/skills/vercel-load-scale/references/examples.md +26 -0
- package/skills/vercel-load-scale/references/load-testing-with-k6.md +59 -0
- package/skills/vercel-load-scale/references/scaling-patterns.md +65 -0
- package/skills/vercel-local-dev-loop/SKILL.md +159 -71
- package/skills/vercel-local-dev-loop/references/errors.md +11 -0
- package/skills/vercel-local-dev-loop/references/examples.md +21 -0
- package/skills/vercel-local-dev-loop/references/implementation.md +60 -0
- package/skills/vercel-migration-deep-dive/SKILL.md +202 -187
- package/skills/vercel-migration-deep-dive/references/errors.md +11 -0
- package/skills/vercel-migration-deep-dive/references/examples.md +12 -0
- package/skills/vercel-migration-deep-dive/references/implementation-plan.md +80 -0
- package/skills/vercel-migration-deep-dive/references/pre-migration-assessment.md +39 -0
- package/skills/vercel-multi-env-setup/SKILL.md +167 -164
- package/skills/vercel-multi-env-setup/references/configuration-structure.md +59 -0
- package/skills/vercel-multi-env-setup/references/errors.md +11 -0
- package/skills/vercel-multi-env-setup/references/examples.md +11 -0
- package/skills/vercel-observability/SKILL.md +205 -195
- package/skills/vercel-observability/references/alert-configuration.md +40 -0
- package/skills/vercel-observability/references/errors.md +11 -0
- package/skills/vercel-observability/references/examples.md +13 -0
- package/skills/vercel-observability/references/metrics-collection.md +65 -0
- package/skills/vercel-performance-tuning/SKILL.md +212 -156
- package/skills/vercel-performance-tuning/references/caching-strategy.md +49 -0
- package/skills/vercel-performance-tuning/references/errors.md +11 -0
- package/skills/vercel-performance-tuning/references/examples.md +13 -0
- package/skills/vercel-policy-guardrails/SKILL.md +276 -193
- package/skills/vercel-policy-guardrails/references/errors.md +11 -0
- package/skills/vercel-policy-guardrails/references/eslint-rules.md +46 -0
- package/skills/vercel-policy-guardrails/references/examples.md +10 -0
- package/skills/vercel-prod-checklist/SKILL.md +219 -94
- package/skills/vercel-prod-checklist/references/errors.md +11 -0
- package/skills/vercel-prod-checklist/references/examples.md +25 -0
- package/skills/vercel-prod-checklist/references/implementation.md +60 -0
- package/skills/vercel-rate-limits/SKILL.md +187 -100
- package/skills/vercel-rate-limits/references/errors.md +11 -0
- package/skills/vercel-rate-limits/references/examples.md +46 -0
- package/skills/vercel-rate-limits/references/implementation.md +66 -0
- package/skills/vercel-reference-architecture/SKILL.md +226 -180
- package/skills/vercel-reference-architecture/references/errors.md +11 -0
- package/skills/vercel-reference-architecture/references/examples.md +13 -0
- package/skills/vercel-reference-architecture/references/key-components.md +65 -0
- package/skills/vercel-reference-architecture/references/project-structure.md +40 -0
- package/skills/vercel-reliability-patterns/SKILL.md +272 -211
- package/skills/vercel-reliability-patterns/references/circuit-breaker.md +36 -0
- package/skills/vercel-reliability-patterns/references/dead-letter-queue.md +48 -0
- package/skills/vercel-reliability-patterns/references/errors.md +11 -0
- package/skills/vercel-reliability-patterns/references/examples.md +11 -0
- package/skills/vercel-reliability-patterns/references/idempotency-keys.md +36 -0
- package/skills/vercel-sdk-patterns/SKILL.md +264 -92
- package/skills/vercel-sdk-patterns/references/errors.md +11 -0
- package/skills/vercel-sdk-patterns/references/examples.md +45 -0
- package/skills/vercel-sdk-patterns/references/implementation.md +67 -0
- package/skills/vercel-security-basics/SKILL.md +186 -96
- package/skills/vercel-security-basics/references/errors.md +10 -0
- package/skills/vercel-security-basics/references/examples.md +70 -0
- package/skills/vercel-security-basics/references/implementation.md +39 -0
- package/skills/vercel-upgrade-migration/SKILL.md +167 -67
- package/skills/vercel-upgrade-migration/references/errors.md +10 -0
- package/skills/vercel-upgrade-migration/references/examples.md +51 -0
- package/skills/vercel-upgrade-migration/references/implementation.md +29 -0
- package/skills/vercel-webhooks-events/SKILL.md +208 -132
- package/skills/vercel-webhooks-events/references/errors.md +11 -0
- package/skills/vercel-webhooks-events/references/event-handler-pattern.md +37 -0
- package/skills/vercel-webhooks-events/references/examples.md +16 -0
- package/skills/vercel-webhooks-events/references/signature-verification.md +33 -0
|
@@ -1,96 +1,182 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vercel-hello-world
|
|
3
|
-
description:
|
|
4
|
-
|
|
5
|
-
Use when starting a new Vercel
|
|
6
|
-
|
|
3
|
+
description: 'Create a minimal working Vercel deployment with a serverless API route.
|
|
4
|
+
|
|
5
|
+
Use when starting a new Vercel project, testing your setup,
|
|
6
|
+
|
|
7
|
+
or learning basic Vercel deployment and API route patterns.
|
|
8
|
+
|
|
7
9
|
Trigger with phrases like "vercel hello world", "vercel example",
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
|
|
11
|
+
"vercel quick start", "simple vercel project", "first vercel deploy".
|
|
12
|
+
|
|
13
|
+
'
|
|
14
|
+
allowed-tools: Read, Write, Edit, Bash(vercel:*), Bash(npm:*), Bash(npx:*), Bash(curl:*)
|
|
10
15
|
version: 1.0.0
|
|
11
16
|
license: MIT
|
|
12
17
|
author: Jeremy Longshore <jeremy@intentsolutions.io>
|
|
18
|
+
tags:
|
|
19
|
+
- saas
|
|
20
|
+
- vercel
|
|
21
|
+
- api
|
|
22
|
+
- quickstart
|
|
23
|
+
- deployment
|
|
24
|
+
compatibility: Designed for Claude Code, also compatible with Codex and OpenClaw
|
|
13
25
|
---
|
|
14
|
-
|
|
15
26
|
# Vercel Hello World
|
|
16
27
|
|
|
17
28
|
## Overview
|
|
18
|
-
|
|
29
|
+
|
|
30
|
+
Deploy a minimal project to Vercel with a static page and a serverless API route. Confirms your CLI auth, project structure, and deployment pipeline work end to end.
|
|
19
31
|
|
|
20
32
|
## Prerequisites
|
|
33
|
+
|
|
21
34
|
- Completed `vercel-install-auth` setup
|
|
22
|
-
-
|
|
23
|
-
-
|
|
35
|
+
- Vercel CLI installed and authenticated
|
|
36
|
+
- Node.js 18+
|
|
24
37
|
|
|
25
38
|
## Instructions
|
|
26
39
|
|
|
27
|
-
### Step 1: Create
|
|
28
|
-
Create a new file for your hello world example.
|
|
40
|
+
### Step 1: Create Project Structure
|
|
29
41
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
42
|
+
```bash
|
|
43
|
+
mkdir my-vercel-app && cd my-vercel-app
|
|
44
|
+
npm init -y
|
|
45
|
+
```
|
|
33
46
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
47
|
+
Create the static landing page:
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<!-- public/index.html -->
|
|
51
|
+
<!DOCTYPE html>
|
|
52
|
+
<html>
|
|
53
|
+
<head><title>Hello Vercel</title></head>
|
|
54
|
+
<body>
|
|
55
|
+
<h1>Hello from Vercel</h1>
|
|
56
|
+
<p id="result">Loading...</p>
|
|
57
|
+
<script>
|
|
58
|
+
fetch('/api/hello')
|
|
59
|
+
.then(r => r.json())
|
|
60
|
+
.then(d => document.getElementById('result').textContent = d.message);
|
|
61
|
+
</script>
|
|
62
|
+
</body>
|
|
63
|
+
</html>
|
|
37
64
|
```
|
|
38
65
|
|
|
39
|
-
### Step
|
|
66
|
+
### Step 2: Create Serverless API Route
|
|
67
|
+
|
|
40
68
|
```typescript
|
|
41
|
-
|
|
42
|
-
|
|
69
|
+
// api/hello.ts
|
|
70
|
+
import type { VercelRequest, VercelResponse } from '@vercel/node';
|
|
71
|
+
|
|
72
|
+
export default function handler(req: VercelRequest, res: VercelResponse) {
|
|
73
|
+
res.status(200).json({
|
|
74
|
+
message: 'Hello from Vercel Serverless Function!',
|
|
75
|
+
timestamp: new Date().toISOString(),
|
|
76
|
+
region: process.env.VERCEL_REGION || 'local',
|
|
77
|
+
});
|
|
43
78
|
}
|
|
44
|
-
|
|
45
|
-
main().catch(console.error);
|
|
46
79
|
```
|
|
47
80
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
-
|
|
81
|
+
Install the types:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npm install --save-dev @vercel/node typescript
|
|
52
85
|
```
|
|
53
|
-
|
|
86
|
+
|
|
87
|
+
### Step 3: Add vercel.json Configuration
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"rewrites": [
|
|
92
|
+
{ "source": "/api/(.*)", "destination": "/api/$1" }
|
|
93
|
+
],
|
|
94
|
+
"headers": [
|
|
95
|
+
{
|
|
96
|
+
"source": "/api/(.*)",
|
|
97
|
+
"headers": [
|
|
98
|
+
{ "key": "Cache-Control", "value": "s-maxage=0, stale-while-revalidate" }
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
54
103
|
```
|
|
55
104
|
|
|
56
|
-
|
|
57
|
-
| Error | Cause | Solution |
|
|
58
|
-
|-------|-------|----------|
|
|
59
|
-
| Import Error | SDK not installed | Verify with `npm list` or `pip show` |
|
|
60
|
-
| Auth Error | Invalid credentials | Check environment variable is set |
|
|
61
|
-
| Timeout | Network issues | Increase timeout or check connectivity |
|
|
62
|
-
| Rate Limit | Too many requests | Wait and retry with exponential backoff |
|
|
105
|
+
### Step 4: Deploy Preview
|
|
63
106
|
|
|
64
|
-
|
|
107
|
+
```bash
|
|
108
|
+
# Deploy to a preview URL (not production)
|
|
109
|
+
vercel
|
|
65
110
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
111
|
+
# Output:
|
|
112
|
+
# Vercel CLI 39.x.x
|
|
113
|
+
# 🔗 Linked to your-team/my-vercel-app
|
|
114
|
+
# 🔍 Inspect: https://vercel.com/your-team/my-vercel-app/xxx
|
|
115
|
+
# ✅ Preview: https://my-vercel-app-xxx.vercel.app
|
|
116
|
+
```
|
|
69
117
|
|
|
70
|
-
|
|
71
|
-
apiKey: process.env.VERCEL_API_KEY,
|
|
72
|
-
});
|
|
118
|
+
### Step 5: Test the Deployment
|
|
73
119
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
120
|
+
```bash
|
|
121
|
+
# Test static page
|
|
122
|
+
curl -s https://my-vercel-app-xxx.vercel.app/ | head -5
|
|
77
123
|
|
|
78
|
-
|
|
124
|
+
# Test API route
|
|
125
|
+
curl -s https://my-vercel-app-xxx.vercel.app/api/hello | jq .
|
|
126
|
+
# {
|
|
127
|
+
# "message": "Hello from Vercel Serverless Function!",
|
|
128
|
+
# "timestamp": "2026-03-22T12:00:00.000Z",
|
|
129
|
+
# "region": "iad1"
|
|
130
|
+
# }
|
|
79
131
|
```
|
|
80
132
|
|
|
81
|
-
###
|
|
82
|
-
```python
|
|
83
|
-
from None import VercelClient
|
|
133
|
+
### Step 6: Promote to Production
|
|
84
134
|
|
|
85
|
-
|
|
135
|
+
```bash
|
|
136
|
+
# Deploy directly to production
|
|
137
|
+
vercel --prod
|
|
86
138
|
|
|
87
|
-
|
|
139
|
+
# Or promote the preview deployment
|
|
140
|
+
vercel promote https://my-vercel-app-xxx.vercel.app
|
|
88
141
|
```
|
|
89
142
|
|
|
143
|
+
## Vercel System Environment Variables
|
|
144
|
+
|
|
145
|
+
These are available in every function at runtime:
|
|
146
|
+
|
|
147
|
+
| Variable | Value |
|
|
148
|
+
|----------|-------|
|
|
149
|
+
| `VERCEL` | `"1"` — always set on Vercel |
|
|
150
|
+
| `VERCEL_ENV` | `"production"`, `"preview"`, or `"development"` |
|
|
151
|
+
| `VERCEL_URL` | Deployment URL (no protocol) |
|
|
152
|
+
| `VERCEL_REGION` | Function region (e.g., `iad1`) |
|
|
153
|
+
| `VERCEL_GIT_COMMIT_SHA` | Git commit hash |
|
|
154
|
+
| `VERCEL_GIT_COMMIT_MESSAGE` | Git commit message |
|
|
155
|
+
|
|
156
|
+
## Output
|
|
157
|
+
|
|
158
|
+
- Static page served from Vercel CDN
|
|
159
|
+
- Serverless API route returning JSON at `/api/hello`
|
|
160
|
+
- Preview URL for testing before production
|
|
161
|
+
- Production deployment live on your domain
|
|
162
|
+
|
|
163
|
+
## Error Handling
|
|
164
|
+
|
|
165
|
+
| Error | Cause | Solution |
|
|
166
|
+
|-------|-------|----------|
|
|
167
|
+
| `404 NOT_FOUND` on `/api/hello` | File not in `api/` directory | Move file to project root `api/` folder |
|
|
168
|
+
| `FUNCTION_INVOCATION_FAILED` | Runtime error in handler | Check function logs: `vercel logs <url>` |
|
|
169
|
+
| `BUILD_FAILED` | TypeScript compilation error | Run `npx tsc --noEmit` locally first |
|
|
170
|
+
| `NO_RESPONSE_FROM_FUNCTION` | Handler didn't call `res.send/json` | Ensure all code paths return a response |
|
|
171
|
+
| `FUNCTION_PAYLOAD_TOO_LARGE` | Response body > 4.5 MB | Paginate or stream the response |
|
|
172
|
+
|
|
90
173
|
## Resources
|
|
91
|
-
|
|
92
|
-
- [Vercel
|
|
93
|
-
- [Vercel
|
|
174
|
+
|
|
175
|
+
- [Vercel Serverless Functions](https://vercel.com/docs/functions)
|
|
176
|
+
- [Vercel Project Configuration](https://vercel.com/docs/project-configuration)
|
|
177
|
+
- [Vercel CLI Deploy](https://vercel.com/docs/cli/deploy)
|
|
178
|
+
- [@vercel/node Runtime](https://vercel.com/docs/functions/runtimes/node-js)
|
|
94
179
|
|
|
95
180
|
## Next Steps
|
|
96
|
-
|
|
181
|
+
|
|
182
|
+
Proceed to `vercel-local-dev-loop` for development workflow setup.
|
|
@@ -1,203 +1,251 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vercel-incident-runbook
|
|
3
|
-
description:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
description: 'Vercel incident response procedures with triage, instant rollback, and
|
|
4
|
+
postmortem.
|
|
5
|
+
|
|
6
|
+
Use when responding to Vercel-related outages, investigating production errors,
|
|
7
|
+
|
|
8
|
+
or running post-incident reviews for deployment failures.
|
|
9
|
+
|
|
7
10
|
Trigger with phrases like "vercel incident", "vercel outage",
|
|
11
|
+
|
|
8
12
|
"vercel down", "vercel on-call", "vercel emergency", "vercel broken".
|
|
9
|
-
|
|
13
|
+
|
|
14
|
+
'
|
|
15
|
+
allowed-tools: Read, Grep, Bash(vercel:*), Bash(curl:*)
|
|
10
16
|
version: 1.0.0
|
|
11
17
|
license: MIT
|
|
12
18
|
author: Jeremy Longshore <jeremy@intentsolutions.io>
|
|
19
|
+
tags:
|
|
20
|
+
- saas
|
|
21
|
+
- vercel
|
|
22
|
+
- incident-response
|
|
23
|
+
- runbook
|
|
24
|
+
compatibility: Designed for Claude Code, also compatible with Codex and OpenClaw
|
|
13
25
|
---
|
|
14
|
-
|
|
15
26
|
# Vercel Incident Runbook
|
|
16
27
|
|
|
17
28
|
## Overview
|
|
18
|
-
|
|
29
|
+
|
|
30
|
+
Step-by-step incident response for Vercel deployment failures, function errors, and platform outages. Covers rapid triage, instant rollback, communication templates, and postmortem procedures.
|
|
19
31
|
|
|
20
32
|
## Prerequisites
|
|
21
|
-
- Access to Vercel dashboard and status page
|
|
22
|
-
- kubectl access to production cluster
|
|
23
|
-
- Prometheus/Grafana access
|
|
24
|
-
- Communication channels (Slack, PagerDuty)
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
- Access to Vercel dashboard and CLI
|
|
35
|
+
- Access to Vercel status page (vercel-status.com)
|
|
36
|
+
- Communication channels (Slack, PagerDuty) configured
|
|
37
|
+
- Log drain or runtime log access
|
|
27
38
|
|
|
28
|
-
|
|
29
|
-
|-------|------------|---------------|----------|
|
|
30
|
-
| P1 | Complete outage | < 15 min | Vercel API unreachable |
|
|
31
|
-
| P2 | Degraded service | < 1 hour | High latency, partial failures |
|
|
32
|
-
| P3 | Minor impact | < 4 hours | Webhook delays, non-critical errors |
|
|
33
|
-
| P4 | No user impact | Next business day | Monitoring gaps |
|
|
39
|
+
## Instructions
|
|
34
40
|
|
|
35
|
-
|
|
41
|
+
### Step 1: Rapid Triage (First 5 Minutes)
|
|
36
42
|
|
|
37
43
|
```bash
|
|
38
|
-
# 1. Check Vercel
|
|
39
|
-
curl -s https://www.vercel-status.com
|
|
44
|
+
# 1. Check if it's a Vercel platform issue
|
|
45
|
+
curl -s "https://www.vercel-status.com/api/v2/summary.json" \
|
|
46
|
+
| jq '.status.description, [.components[] | select(.status != "operational") | {name, status}]'
|
|
40
47
|
|
|
41
|
-
# 2. Check
|
|
42
|
-
|
|
48
|
+
# 2. Check current production deployment status
|
|
49
|
+
vercel ls --prod
|
|
50
|
+
vercel inspect $(vercel ls --prod --json | jq -r '.[0].url')
|
|
43
51
|
|
|
44
|
-
# 3. Check
|
|
45
|
-
curl -s
|
|
52
|
+
# 3. Check recent deployments — did a deploy just happen?
|
|
53
|
+
curl -s -H "Authorization: Bearer $VERCEL_TOKEN" \
|
|
54
|
+
"https://api.vercel.com/v6/deployments?target=production&limit=5&projectId=prj_xxx" \
|
|
55
|
+
| jq '.deployments[] | {uid, state, createdAt: (.createdAt/1000 | todate), url}'
|
|
46
56
|
|
|
47
|
-
# 4.
|
|
48
|
-
|
|
57
|
+
# 4. Check function logs for errors
|
|
58
|
+
vercel logs $(vercel ls --prod --json | jq -r '.[0].url') --level=error --limit=20
|
|
49
59
|
```
|
|
50
60
|
|
|
51
|
-
|
|
61
|
+
### Step 2: Decision Tree
|
|
52
62
|
|
|
53
63
|
```
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
│
|
|
57
|
-
│
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
Is vercel-status.com showing an incident?
|
|
65
|
+
├── YES → Vercel platform issue
|
|
66
|
+
│ ├── Subscribe to updates on status page
|
|
67
|
+
│ ├── Post internal status: "Vercel platform incident — monitoring"
|
|
68
|
+
│ └── No action needed from us — wait for Vercel resolution
|
|
69
|
+
│
|
|
70
|
+
└── NO → Issue is in our deployment
|
|
71
|
+
├── Did a deployment happen in the last 30 minutes?
|
|
72
|
+
│ ├── YES → Likely deployment regression
|
|
73
|
+
│ │ └── ROLLBACK immediately (Step 3)
|
|
74
|
+
│ └── NO → Application-level issue
|
|
75
|
+
│ ├── Check function logs for new errors
|
|
76
|
+
│ ├── Check external dependency status (DB, APIs)
|
|
77
|
+
│ └── Investigate and hotfix (Step 4)
|
|
78
|
+
│
|
|
79
|
+
└── Is the issue region-specific?
|
|
80
|
+
├── YES → Check function regions, possible edge issue
|
|
81
|
+
└── NO → Global issue, check code and env vars
|
|
61
82
|
```
|
|
62
83
|
|
|
63
|
-
|
|
84
|
+
### Step 3: Instant Rollback (< 30 Seconds)
|
|
64
85
|
|
|
65
|
-
### 401/403 - Authentication
|
|
66
86
|
```bash
|
|
67
|
-
#
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
#
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
87
|
+
# Option A: Rollback to previous production deployment (fastest)
|
|
88
|
+
vercel rollback
|
|
89
|
+
# This instantly swaps production traffic — no rebuild needed
|
|
90
|
+
|
|
91
|
+
# Option B: Rollback to a specific known-good deployment
|
|
92
|
+
vercel rollback dpl_xxxxxxxxxxxx
|
|
93
|
+
|
|
94
|
+
# Option C: Via API (for automation/PagerDuty integration)
|
|
95
|
+
curl -X POST "https://api.vercel.com/v9/projects/my-app/promote" \
|
|
96
|
+
-H "Authorization: Bearer $VERCEL_TOKEN" \
|
|
97
|
+
-H "Content-Type: application/json" \
|
|
98
|
+
-d '{"deploymentId": "dpl_known_good_id"}'
|
|
99
|
+
|
|
100
|
+
# Verify rollback succeeded
|
|
101
|
+
vercel ls --prod
|
|
102
|
+
curl -s https://yourdomain.com/api/health | jq .
|
|
76
103
|
```
|
|
77
104
|
|
|
78
|
-
###
|
|
79
|
-
```bash
|
|
80
|
-
# Check rate limit headers
|
|
81
|
-
curl -v https://api.vercel.com 2>&1 | grep -i rate
|
|
82
|
-
|
|
83
|
-
# Enable request queuing
|
|
84
|
-
kubectl set env deployment/vercel-integration RATE_LIMIT_MODE=queue
|
|
105
|
+
### Step 4: Investigate Root Cause
|
|
85
106
|
|
|
86
|
-
# Long-term: Contact Vercel for limit increase
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### 500/503 - Vercel Errors
|
|
90
107
|
```bash
|
|
91
|
-
#
|
|
92
|
-
|
|
108
|
+
# Collect evidence while it's fresh
|
|
109
|
+
mkdir incident-$(date +%Y%m%d)
|
|
110
|
+
cd incident-$(date +%Y%m%d)
|
|
93
111
|
|
|
94
|
-
#
|
|
95
|
-
|
|
112
|
+
# Function logs around the incident time
|
|
113
|
+
vercel logs https://yourdomain.com --limit=200 > function-logs.txt
|
|
96
114
|
|
|
97
|
-
#
|
|
98
|
-
|
|
115
|
+
# Deployment diff — what changed?
|
|
116
|
+
curl -s -H "Authorization: Bearer $VERCEL_TOKEN" \
|
|
117
|
+
"https://api.vercel.com/v13/deployments/dpl_broken" \
|
|
118
|
+
| jq '.meta' > broken-deployment-meta.json
|
|
99
119
|
|
|
100
|
-
|
|
120
|
+
# Compare env vars between working and broken deployments
|
|
121
|
+
vercel env ls > env-vars.txt
|
|
101
122
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
Status: INVESTIGATING
|
|
106
|
-
Impact: [Describe user impact]
|
|
107
|
-
Current action: [What you're doing]
|
|
108
|
-
Next update: [Time]
|
|
109
|
-
Incident commander: @[name]
|
|
123
|
+
# Check git diff between last good and broken commit
|
|
124
|
+
git log --oneline -10
|
|
125
|
+
git diff dpl_good_commit..dpl_broken_commit -- api/ src/
|
|
110
126
|
```
|
|
111
127
|
|
|
112
|
-
###
|
|
128
|
+
### Step 5: Enable Maintenance Page (If Needed)
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
// vercel.json — temporary maintenance mode via rewrite
|
|
132
|
+
{
|
|
133
|
+
"rewrites": [
|
|
134
|
+
{
|
|
135
|
+
"source": "/((?!_next|api/health).*)",
|
|
136
|
+
"destination": "/maintenance.html"
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
113
140
|
```
|
|
114
|
-
Vercel Integration Issue
|
|
115
|
-
|
|
116
|
-
We're experiencing issues with our Vercel integration.
|
|
117
|
-
Some users may experience [specific impact].
|
|
118
141
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
142
|
+
```html
|
|
143
|
+
<!-- public/maintenance.html -->
|
|
144
|
+
<!DOCTYPE html>
|
|
145
|
+
<html>
|
|
146
|
+
<head><title>Maintenance</title></head>
|
|
147
|
+
<body>
|
|
148
|
+
<h1>We'll be right back</h1>
|
|
149
|
+
<p>We're performing scheduled maintenance. Please check back shortly.</p>
|
|
150
|
+
</body>
|
|
151
|
+
</html>
|
|
122
152
|
```
|
|
123
153
|
|
|
124
|
-
|
|
154
|
+
### Step 6: Communication Templates
|
|
125
155
|
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
# Generate debug bundle
|
|
129
|
-
./scripts/vercel-debug-bundle.sh
|
|
156
|
+
**Internal — Slack (Incident Start)**
|
|
130
157
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
158
|
+
```
|
|
159
|
+
:rotating_light: INCIDENT: [Project Name] production issue detected
|
|
160
|
+
Status: Investigating
|
|
161
|
+
Impact: [Description of user impact]
|
|
162
|
+
Start time: [UTC timestamp]
|
|
163
|
+
On-call: @[engineer]
|
|
164
|
+
Thread: replies here
|
|
136
165
|
```
|
|
137
166
|
|
|
138
|
-
|
|
139
|
-
```markdown
|
|
140
|
-
## Incident: Vercel [Error Type]
|
|
141
|
-
**Date:** YYYY-MM-DD
|
|
142
|
-
**Duration:** X hours Y minutes
|
|
143
|
-
**Severity:** P[1-4]
|
|
144
|
-
|
|
145
|
-
### Summary
|
|
146
|
-
[1-2 sentence description]
|
|
147
|
-
|
|
148
|
-
### Timeline
|
|
149
|
-
- HH:MM - [Event]
|
|
150
|
-
- HH:MM - [Event]
|
|
167
|
+
**Internal — Slack (Mitigation)**
|
|
151
168
|
|
|
152
|
-
|
|
153
|
-
[
|
|
169
|
+
```
|
|
170
|
+
:white_check_mark: MITIGATED: [Project Name]
|
|
171
|
+
Action: Rolled back to deployment dpl_xxx
|
|
172
|
+
Impact duration: [X minutes]
|
|
173
|
+
Root cause: [Brief description]
|
|
174
|
+
Postmortem: [link] scheduled for [date]
|
|
175
|
+
```
|
|
154
176
|
|
|
155
|
-
|
|
156
|
-
- Users affected: N
|
|
157
|
-
- Revenue impact: $X
|
|
177
|
+
**External — Status Page**
|
|
158
178
|
|
|
159
|
-
|
|
160
|
-
|
|
179
|
+
```
|
|
180
|
+
Title: Degraded performance on [service]
|
|
181
|
+
Body: We are investigating reports of [issue]. Some users may experience
|
|
182
|
+
[impact]. Our team is actively working on a resolution.
|
|
183
|
+
Update: The issue has been resolved. [Brief root cause].
|
|
161
184
|
```
|
|
162
185
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
### Step 1: Quick Triage
|
|
166
|
-
Run the triage commands to identify the issue source.
|
|
186
|
+
### Step 7: Postmortem Template
|
|
167
187
|
|
|
168
|
-
|
|
169
|
-
|
|
188
|
+
```markdown
|
|
189
|
+
# Incident Postmortem: [Title]
|
|
190
|
+
|
|
191
|
+
## Summary
|
|
192
|
+
- Duration: [start] to [end] ([X minutes])
|
|
193
|
+
- Impact: [users/requests affected]
|
|
194
|
+
- Severity: [P1/P2/P3]
|
|
195
|
+
|
|
196
|
+
## Timeline (UTC)
|
|
197
|
+
- HH:MM — [event]
|
|
198
|
+
- HH:MM — Alert fired
|
|
199
|
+
- HH:MM — On-call acknowledged
|
|
200
|
+
- HH:MM — Root cause identified
|
|
201
|
+
- HH:MM — Rollback executed
|
|
202
|
+
- HH:MM — Service restored
|
|
203
|
+
|
|
204
|
+
## Root Cause
|
|
205
|
+
[What broke and why]
|
|
206
|
+
|
|
207
|
+
## Resolution
|
|
208
|
+
[What was done to fix it]
|
|
209
|
+
|
|
210
|
+
## Action Items
|
|
211
|
+
- [ ] [Preventive action] — Owner: @xxx — Due: [date]
|
|
212
|
+
- [ ] [Detection improvement] — Owner: @xxx — Due: [date]
|
|
213
|
+
- [ ] [Process improvement] — Owner: @xxx — Due: [date]
|
|
214
|
+
```
|
|
170
215
|
|
|
171
|
-
|
|
172
|
-
Apply the appropriate remediation for the error type.
|
|
216
|
+
## Incident Severity Levels
|
|
173
217
|
|
|
174
|
-
|
|
175
|
-
|
|
218
|
+
| Severity | Definition | Response Time | Rollback? |
|
|
219
|
+
|----------|-----------|---------------|-----------|
|
|
220
|
+
| P1 | Production down, all users affected | < 5 min | Immediate |
|
|
221
|
+
| P2 | Degraded, some users affected | < 15 min | If not fixable in 30 min |
|
|
222
|
+
| P3 | Minor issue, workaround exists | < 1 hour | No |
|
|
223
|
+
| P4 | Cosmetic or non-urgent | Next business day | No |
|
|
176
224
|
|
|
177
225
|
## Output
|
|
178
|
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
226
|
+
|
|
227
|
+
- Incident categorized and triaged within 5 minutes
|
|
228
|
+
- Instant rollback executed if deployment regression detected
|
|
229
|
+
- Communication sent to internal and external stakeholders
|
|
230
|
+
- Postmortem scheduled with action items
|
|
182
231
|
|
|
183
232
|
## Error Handling
|
|
184
|
-
| Issue | Cause | Solution |
|
|
185
|
-
|-------|-------|----------|
|
|
186
|
-
| Can't reach status page | Network issue | Use mobile or VPN |
|
|
187
|
-
| kubectl fails | Auth expired | Re-authenticate |
|
|
188
|
-
| Metrics unavailable | Prometheus down | Check backup metrics |
|
|
189
|
-
| Secret rotation fails | Permission denied | Escalate to admin |
|
|
190
233
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
234
|
+
| Scenario | Action |
|
|
235
|
+
|----------|--------|
|
|
236
|
+
| Vercel status page shows incident | Monitor, communicate, no deployment changes |
|
|
237
|
+
| `vercel rollback` fails | Use API promotion: POST to `/v9/projects/.../promote` |
|
|
238
|
+
| Rollback deployment also broken | Deploy from a known-good git tag |
|
|
239
|
+
| Cannot access Vercel dashboard | Use CLI with saved VERCEL_TOKEN |
|
|
240
|
+
| Log retention expired | Check external log drain provider |
|
|
197
241
|
|
|
198
242
|
## Resources
|
|
243
|
+
|
|
199
244
|
- [Vercel Status Page](https://www.vercel-status.com)
|
|
200
|
-
- [
|
|
245
|
+
- [Instant Rollback](https://vercel.com/docs/instant-rollback)
|
|
246
|
+
- [Vercel Support](https://vercel.com/support)
|
|
247
|
+
- [Vercel Logs CLI](https://vercel.com/docs/cli/logs)
|
|
201
248
|
|
|
202
249
|
## Next Steps
|
|
203
|
-
|
|
250
|
+
|
|
251
|
+
For data handling and compliance, see `vercel-data-handling`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Error Handling Reference
|
|
2
|
+
|
|
3
|
+
| Issue | Cause | Solution |
|
|
4
|
+
|-------|-------|----------|
|
|
5
|
+
| Can't reach status page | Network issue | Use mobile or VPN |
|
|
6
|
+
| kubectl fails | Auth expired | Re-authenticate |
|
|
7
|
+
| Metrics unavailable | Prometheus down | Check backup metrics |
|
|
8
|
+
| Secret rotation fails | Permission denied | Escalate to admin |
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
*[Tons of Skills](https://tonsofskills.com) by [Intent Solutions](https://intentsolutions.io) | [jeremylongshore.com](https://jeremylongshore.com)*
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
## Examples
|
|
2
|
+
|
|
3
|
+
### One-Line Health Check
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
curl -sf https://api.yourapp.com/health | jq '.services.vercel.status' || echo "UNHEALTHY"
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
*[Tons of Skills](https://tonsofskills.com) by [Intent Solutions](https://intentsolutions.io) | [jeremylongshore.com](https://jeremylongshore.com)*
|