360 Secure SkillHub
360 安全技能中心

RedHat Frontend Builder

核心功能:搭建规范的前端项目结构,实现带错误处理的安全API客户端层,添加无障碍与UX保障,集成测试、lint、构建校验。典型场景:新建UI应用/页面/组件系统,涉及路由、状态管理或API调用,需可复用脚手架。输入需指定技术栈、UI需求,可补充API契约和约束;输出为项目文件、运行命令及配置说明,遵循安全规则避免密钥暴露。

mzfshark
mzfshark
热度 34.48
最近更新 2026-05-11 17:45:41
分类:开发依赖:内部调用大模型 / 读写文件 / 代码执行应用场景:代码生成 / API 集成 / DevOps / 模板

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add axodus-frontend-builder
Metadata
name
frontend-builder
description
Build frontend apps with safe API integration and quality gates.
metadata
{"author":"RedHat Dev","version":"1.0.0","owner":"RedHat Dev Agent","category":"fullstack"}

SKILL: frontend-builder

Purpose

Build frontend applications (React / Next.js / Vite) with predictable structure, accessibility, and safe API integration.

When to Use

  • A new UI app/page/component system is required.
  • The task includes routing, state management, or API consumption.
  • You need a repeatable scaffold with quality gates (lint/tests/build).

Inputs

  • stack (required, enum: react-vite|nextjs|react-spa).
  • ui_requirements (required, string|object): pages, components, UX constraints.
  • api_contract (optional, object): endpoints/events and schemas.
  • constraints (optional, string[]): theming, perf, accessibility, browser support.

Steps

  1. Confirm scope:
    • routes/pages
    • global layout/navigation
    • state boundaries (server vs client)
  2. Scaffold project in the target directory with minimal dependencies.
  3. Implement component structure:
    • components/, pages//routes/, lib/, styles/
  4. Implement API client layer with:
    • base URL via env
    • timeouts
    • error normalization
  5. Add accessibility and UX guardrails:
    • semantic HTML
    • keyboard navigation
    • loading/error states
  6. Add tests (where the repo conventions support them).
  7. Validate build/lint/test.

Validation

  • App builds cleanly.
  • No secrets in client bundles.
  • API calls handle errors and cancellations.
  • Key user flows are covered by at least smoke tests.

Output

  • Files created/changed
  • Run commands (dev, build, test)
  • Notes about env vars and configuration

Safety Rules

  • Never embed API keys in frontend code; use server-side proxy if needed.
  • Avoid untrusted HTML injection; sanitize where necessary.
  • Prefer stable, well-maintained libraries.

Example

Input:

  • stack: react-vite
  • ui_requirements: “Dashboard page + settings form; calls /api/me.” Output: Vite project with src/pages/Dashboard.tsx, src/lib/api.ts, and build validation commands.