Skip to content
Back to skills

Build Frontend

ASecurity

Builds the Fake Survey Generator React frontend with Vite and TypeScript. Use this skill when frontend code changes need to be compiled and validated for TypeScript errors. This skill orchestrates the npm build command and reports build errors.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
developmenttypescriptreactnodegitfrontend

Works with

  • cli
  • mcp

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill build-frontend --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Build Frontend?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Build Frontend
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-build-frontend/badge)](https://www.skillsdirectory.com/skills/david-li0406-build-frontend)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: build-frontend
description: Builds the Fake Survey Generator React frontend with Vite and TypeScript. Use this skill when frontend code changes need to be compiled and validated for TypeScript errors. This skill orchestrates the npm build command and reports build errors.
---

# Build Frontend Skill

Use this skill to validate that all frontend TypeScript and React components compile successfully without errors.

## What This Skill Does

1. Runs `npm run build` in `src/client/frontend/`
2. Validates TypeScript compilation via `tsc` type checking
3. Bundles React application with Vite
4. Captures and parses build errors
5. Reports errors with file and line number references
6. Exits with failure status if any build errors are found

## When to Use

- After implementing or modifying React components
- After updating frontend TypeScript types or interfaces
- To validate that TypeScript compilation succeeds
- Before running E2E validation against the UI
- To ensure Vite bundling produces valid output

## How the Agent Should Use This Skill

1. **Prepare**: Ensure you are in the repository root directory
2. **Invoke**: Run the frontend build helper script from the repository root:
   ```
   dotnet .github/skills/build-frontend/build-frontend.cs
   ```
3. **Parse Output**: Monitor stdout for success message and stderr for errors
4. **Handle Errors**: If exit code is non-zero, the build failed. Review the error messages to identify:
   - TypeScript compilation errors (e.g., type mismatches, missing properties)
   - Import/export issues
   - React component rendering errors
   - Vite bundling failures
5. **Report**: If any errors occur, halt further validation and report the build error details to the user

## Success Criteria

- Exit code: 0
- Stdout contains: `[BUILD] Frontend build completed successfully`

## Failure Indicators

- Exit code: 1
- Stderr contains TypeScript or build errors
- Error messages may reference file paths, line numbers, and error codes (e.g., `TS7006`)

## Notes

- The build script automatically finds the repository root by searching for `FakeSurveyGenerator.slnx` or `FakeSurveyGenerator.sln`
- Frontend directory is located at `src/client/frontend/`
- Build process includes TypeScript type checking (`npm run build` runs both `tsc` check and Vite bundling)
- The script automatically runs `npm ci` if `node_modules` directory is missing, ensuring dependencies are installed before building
- On Windows, the script uses `cmd.exe /c npm` to reliably invoke npm, avoiding PATH resolution issues

## Next Steps After Success

Once frontend build succeeds, typically invoke:
- **Validate Aspire Runtime Skill** - to start the application and UI server
- **Validate E2E Skill** - to run interactive UI tests with Playwright MCP

Files in this skill

  • SKILL.md2.7 KB
  • build-frontend.cs4.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…