Find why a deploy failed
The error from the build log, the change that caused it and a suggested fix, sent when a deploy fails.
- On an event: When a deploy fails in Vercel
What it does
The task
Check the Vercel project project for deploys that failed since the last run. Open the build log of each one and find the first error. Open the commit on GitHub and compare it with the commit of the last successful deploy. Find the change that most likely caused the error. Send me the error lines, the commit, the changed files and a suggested fix of at most 5 lines. Do not deploy again and do not roll back.
- It works in Vercel and GitHub, in the workspace you pick, and signs in with passwords from your Cuiar vault.
- A routine checks every 15 minutes and acts on what is new: when a deploy fails in Vercel.
What you give it
| Blank | What to give | Example |
|---|---|---|
| project | The Vercel project name | brightleaf-web |
What you get back
An example run with the example values above. Your run uses your own data.
Deploy failed: brightleaf-web, preview for the branch feat/xlsx-export, 4 Nov 16:05
Error, build log line 212:
Type error: Property 'sheetName' does not exist on type 'ExportOptions'. src/export/xlsx.ts:41:17
Commit: 7c19ab2 "Add XLSX export" by Aisha
Changed since the last good deploy: src/export/xlsx.ts, src/export/types.ts
Cause: types.ts renames sheetName to sheet, but xlsx.ts still uses the old name.
Fix: in src/export/xlsx.ts, line 41, change options.sheetName to options.sheet.
Run it in Cuiar
- 01
Open it
Click Use in Cuiar on this page. The side panel opens with the task in the composer.
- 02
Fill in the blank
Type project. Tab moves to the next blank.
- 03
Run it, then repeat it
Run sends it once. To run it when a deploy fails in Vercel, make a routine on cuiar.com/routines or with the CLI below.
As a routine, from the terminal
cuiar routines create "Find why a deploy failed" --schedule "*/15 * * * *" --time-zone Europe/Berlin \
"Check the Vercel project brightleaf-web for deploys that failed since the last run. Open the build log of each one and find the first error. Open the commit on GitHub and compare it with the commit of the last successful deploy. Find the change that most likely caused the error. Send me the error lines, the commit, the changed files and a suggested fix of at most 5 lines. Do not deploy again and do not roll back."Run it from your AI agent
Claude Code, Codex, Cursor and other MCP clients reach Cuiar at https://mcp.cuiar.com/mcp. Add the server one time, then ask for the task in plain words, or call create_routine yourself.
1. Add Cuiar to Claude Code
claude mcp add --transport http cuiar https://mcp.cuiar.com/mcp2. Ask your agent
Use the Cuiar tool create_routine to run my "Find why a deploy failed" template with project = brightleaf-web.Setup for other agents: AI agents.
The tool call
{
"name": "create_routine",
"arguments": {
"name": "Find why a deploy failed",
"task": "Check the Vercel project brightleaf-web for deploys that failed since the last run. Open the build log of each one and find the first error. Open the commit on GitHub and compare it with the commit of the last successful deploy. Find the change that most likely caused the error. Send me the error lines, the commit, the changed files and a suggested fix of at most 5 lines. Do not deploy again and do not roll back.",
"schedule": "*/15 * * * *",
"time_zone": "Europe/Berlin"
}
}Related templates
All engineering templatesEngineering
Run a smoke test on staging after each deploy
Sign-in, key pages and main actions checked in the browser, with a screenshot of each failure.
On an event: When a new staging deploy finishes- Vercel
- Any website
EngineeringAsks first
Label and sort new GitHub issues
Labels, a priority and a possible duplicate for each new issue, applied after you approve them.
On an event: When a new issue is opened- GitHub
EngineeringAsks first
Write release notes from merged pull requests
Merged PRs since the last release, grouped and written for users, saved as a draft GitHub release.
You start it: When you start it- GitHub
Engineering
Read the changelogs before you upgrade dependencies
Breaking changes, security fixes and upgrade steps for each outdated package, from its release notes.
You start it: When you start it- GitHub
- npm
- PyPI
Engineering
Sort the security alerts in your repositories
Open Dependabot alerts across your repos, grouped by package, with the fix version and any open fix PR.
On a schedule: Every Monday at 9:30- GitHub
Engineering
List pull requests that wait for review
Open PRs across your repos with age, reviewers and CI status, the oldest first.
On a schedule: Every weekday at 10:00- GitHub