- name
SKILL.md
Tệp skill vẫn nằm trong kho mã của nhà phát hành.
Dán lệnh đã sao chép vào terminal. Lệnh sẽ cài đặt tệp SKILL.md này vào agent đó.
npx skills add shinpr/ai-coding-project-boilerplate --skill frontend-technical-spec -a cursor -yDán lệnh đã sao chép vào terminal. Lệnh sẽ cài đặt tệp SKILL.md này vào agent đó.
npx skills add shinpr/ai-coding-project-boilerplate --skill frontend-technical-spec -a claude-code -yDán lệnh đã sao chép vào terminal. Lệnh sẽ cài đặt tệp SKILL.md này vào agent đó.
npx skills add shinpr/ai-coding-project-boilerplate --skill frontend-technical-spec -a codex -yDán lệnh đã sao chép vào terminal. Lệnh sẽ cài đặt tệp SKILL.md này vào agent đó.
npx skills add shinpr/ai-coding-project-boilerplate --skill frontend-technical-spec -a grok -yGửi tin nhắn đã sao chép trong cuộc trò chuyện Grok Bot. Bot sẽ lấy tệp SKILL.md này từ GitHub và thêm vào bộ skill mà mọi Bot của bạn dùng chung.
Install this skill: https://github.com/shinpr/ai-coding-project-boilerplate/tree/HEAD/.claude/skills-en/frontend-technical-specTừ nhà phát hành
Inspect package.json, the lockfile, TypeScript/build configuration, CI definitions, and representative components before applying a tool- or framework-specific rule. Treat React, Vite, Next.js, a state library, form library, or script as available only when repository evidence names it. Label surrounding-pattern conclusions as inferred. When a missing decision changes rendering architecture, compatibility, security, or verification, stop and name the exact evidence or user decision required.
These rules apply when repository configuration confirms a TypeScript-based React application. Select architecture by mapping current requirements and constraints to component responsibilities, state ownership, server/client boundaries, and observable verification points.
// Build tool environment variables (public values only; client-exposed vars need the VITE_ prefix)
const config = {
apiUrl: import.meta.env.VITE_API_URL || 'http://localhost:3000',
appName: import.meta.env.VITE_APP_NAME || 'My App'
}
// Does not work in frontend
const apiUrl = process.env.API_URL
.env files outside version control and provide non-secret example files for required variable namesCorrect Approach for Secrets:
// Security risk: API key exposed in browser
const apiKey = import.meta.env.VITE_API_KEY
const response = await fetch(`https://api.example.com/data?key=${apiKey}`)
// Correct: Backend manages secrets, frontend accesses via proxy
const response = await fetch('/api/data') // Backend handles API key authentication
React Component Architecture:
Select a component/state pattern using these rules:
State Management Patterns:
useState for component-specific stateMaintain consistent data flow throughout the React application:
Single Source of Truth: Each piece of state has one authoritative source
Unidirectional Flow: Data flows top-down via props
API Response -> State -> Props -> Render -> UI
User Input -> Event Handler -> State Update -> Re-render
Immutable Updates: Use immutable patterns for state updates
// Immutable state update
setUsers(prev => [...prev, newUser])
// Invalid mutable state update
users.push(newUser)
setUsers(users)
unknown) -> Type Guard -> State (Type Guaranteed)// Type-safe data flow
async function fetchUser(id: string): Promise<User> {
const response = await fetch(`/api/users/${id}`)
const data: unknown = await response.json()
if (!isUser(data)) {
throw new Error('Invalid user data')
}
return data // Type guaranteed as User
}
Select the package manager from the packageManager field, lockfile, or CI command in that order. Execute only scripts present in the selected manifest.
test - Run testsQuality checks are mandatory upon implementation completion:
Phase 1-3: Basic Checks
check - Biome (lint + format)build - TypeScript buildTransition evidence: every configured lint/format/type/build check exits successfully. A missing required script is reported with the manifest/configuration path, and the remaining checks still run; whether the missing check leaves required proof unavailable is decided by the quality-fixer result.
Phase 4-5: Tests and Final Confirmation
test - Test executioncheck:all - Overall integrated checkCompletion evidence: configured tests pass, the production build succeeds, and the integrated check remains clean after test fixes. Record an environment-dependent test as blocked with its exact prerequisite.
Defines React environment, component architecture, state/data flow, build verification, and frontend non-functional criteria from repository evidence. Use when configuring or designing a React fronten
---name: frontend-technical-specdescription: Defines React environment, component architecture, state/data flow, build verification, and frontend…---# .claude/skills-en/frontend-technical-spec/SKILL.mdTổng quan
Defines React environment, component architecture, state/data flow, build verification, and frontend non-functional criteria from repository evidence. Use when configuring or designing a React frontend, its build, or its runtime boundaries.
Câu hỏi thường gặp
Tải .claude/skills-en/frontend-technical-spec/SKILL.md từ nhà phát hành, hoặc sao chép đường dẫn và mở kho mã. PlugMCP chỉ liệt kê skill và không lưu trữ tệp này.
Nhà phát hành duy trì nó tại https://github.com/shinpr/ai-coding-project-boilerplate.
Claude, Cursor, Codex và Grok Build có thể đọc tệp SKILL.md mà bạn thêm từ kho mã của nhà phát hành. Grok Bot cài đặt skill khi bạn gửi liên kết thư mục GitHub của skill trong cuộc trò chuyện.