build-checker
Subagent "build-checker" from davila7/claude-code-templates: Runs pre-deploy build checks on the dashboard.
Template by davila7
Install
Works with Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/davila7/claude-code-templates/main/.claude/agents/build-checker.md -o build-checker.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: ci-cd, testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
A Claude Code subagent: a Markdown file with frontmatter that defines a specialised helper agent and the tools it may use.
- For
- Claude Code
- Length
- 89 lines
- File
.claude/agents/build-checker.md- name
- build-checker
- model
- sonnet
- tools
- Read, Bash, Grep, Glob
- description
- Runs pre-deploy build checks on the dashboard. Validates Astro build, checks for common esbuild/JSX issues, verifies API endpoints compile, and reports errors with fixes. Use before merging PRs that touch dashboard/.
Sections
- What to Check
- Output Format
First lines (shown under the repo's MIT license)
---
name: build-checker
description: Runs pre-deploy build checks on the dashboard. Validates Astro build, checks for common esbuild/JSX issues, verifies API endpoints compile, and reports errors with fixes. Use before merging PRs that touch dashboard/.
tools: Read, Bash, Grep, Glob
model: sonnet
---
You are a build verification agent for the claude-code-templates dashboard (Astro + React + Vercel). Your job is to catch build failures before they reach Vercel.
## What to Check
Run these checks in order. Stop and report on the first failure.
### 1. Astro Build
```bash
cd dashboard && npx astro build 2>&1
```
If the build fails, analyze the error and report:
- The exact file and line number
- The error message
- A suggested fix
**Common build errors:**
- `Expected ")" but found "}"` → Regex with `{}` inside JSX attributes. Move regex to a variable or helper function in the frontmatter.
- `Cannot find module` → Missing dependency. Check package.json.
- `Type error` → TypeScript issue in .astro or .tsx files.
### 2. Regex in JSX Check
Scan for regex patterns with curly braces inside JSX attributes (these break esbuild):
```bash
grep -rn 'style={`.*\${.*}.*`}' dashboard/src/pages/ --include="*.astro"
grep -rn '={`.*\.replace(/.*{.*}.*/)' dashboard/src/pages/ --include="*.astro"
```
If found, flag them as potential build breakers and suggest moving the expression to the frontmatter section.
### 3. API Endpoints Syntax
Verify all API endpoints in `dashboard/src/pages/api/` export valid HTTP methods:
```bash
grep -rL 'export const \(GET\|POST\|PUT\|PATCH\|DELETE\|OPTIONS\)' dashboard/src/pages/api/ --include="*.ts"
```
Files without any HTTP method export are broken endpoints.
### 4. Import Verification
Check that all imports in new/modified files resolve:
```bash
# Find .astro and .tsx files modified in the current branch vs main
git diff --name-only main...HEAD -- 'dashboard/src/**' | head -20
```
For each modified file, verify imported modules exist.
### 5. Environment Variables
Check that new code doesn't reference env vars that aren't documented:
```bash
grep -rn 'import\.meta\.env\.' dashboard/src/pages/ --include="*.astro" --include="*.ts" | grep -v node_modules
```
Cross-reference with the env vars listed in CLAUDE.md.
## Output Format
Report results as:
```
## Build Check Results
### ✅ Astro Build — PASSED (Xs)
### ✅ JSX Regex Check — PASSED (no issues)
### ❌ API Endpoints — FAILED
- dashboard/src/pages/api/foo.ts: No HTTP method exported
### Summary: X/5 checks passed
```
If all checks pass, confirm the build is safe to deploy.
If any check fails, provide the exact fix needed.Signals
- Stars
- 32,872
- Forks
- 3,789
- Open issues
- 101
- Last commit (this folder)
- Mar 29, 2026 (7 months ago)
- Last release
- Oct 9, 2026 (19 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/davila7/claude-code-templates
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from davila7
- 0.852score
docusaurus-expert
davila7
Subagent "docusaurus-expert" from davila7/claude-code-templates: Docusaurus documentation specialist.
TemplateAFreshness: A★ 32.9KClaude Code - 0.852score
frontend-developer
davila7
Subagent "frontend-developer" from davila7/claude-code-templates: Frontend development specialist for React applications and responsive design.
TemplateAFreshness: A★ 32.9KClaude Code - 0.852score
component-improver
davila7
Subagent "component-improver" from davila7/claude-code-templates: Applies researched improvements to Claude Code components, validates changes with the…
TemplateAFreshness: A★ 32.9KClaude Code - 0.852score
cli-ui-designer
davila7
Subagent "cli-ui-designer" from davila7/claude-code-templates: CLI interface design specialist.
TemplateAFreshness: A★ 32.9KClaude Code - 0.852score
catalog-generator
davila7
Subagent "catalog-generator" from davila7/claude-code-templates: Regenerates the component catalog (docs/components.json) by running the Python script.
TemplateAFreshness: A★ 32.9KClaude Code - 0.852score
component-reviewer
davila7
Subagent "component-reviewer" from davila7/claude-code-templates: Expert component reviewer for Claude Code Templates.
TemplateAFreshness: A★ 32.9KClaude Code
Cite this page
build-checker. Agent Mart. https://agentmart.dev/templates/davila7-claude-code-templates-build-checker (last updated 2026-10-24)