Community程式設計與開發github.com

前端工程方法論

建置與維護Web前端——元件架構、狀態管理、API整合、響應式版面、客戶端效能及前端測試模式。框架中立,專注於Web前端實作。不適用於後端服務實作、資料工程或平台基礎設施工作。

前端工程方法論 是什麼?

此技能定義了一套完整的前端工程方法論,專注於Web前端的實作層面。它涵蓋了元件實作、狀態管理、API整合、響應式版面設計、客戶端效能最佳化以及前端測試模式,並採用框架中立的方式。技能文件明確劃分了前端工程師的職責範圍,包含元件組合、狀態架構、資料擷取模式、快取、樂觀更新、授權流程、即時更新、版面系統、斷點策略、跨裝置測試、綑綁器與TypeScript配置等。同時,它也清楚指出哪些工作不屬於此範疇,例如使用者旅程、API合約設計、測試策略、CI/CD管道以及品牌設計,並引導使用者至其他專用技能(如react、vite、playwright、mobile-development)。此技能支援多種平台,包括Claude Code、Celerity、Codex以及一般的前端開發環境。核心原則強調元件作為組合單位、狀態就近放置、設計所有狀態(載入、空值、錯誤、成功)、可及性為必要條件、以及效能為使用者體驗的一環。此外,它還提供參考文件、模板和腳本,協助使用者進行元件設計、狀態管理、API整合、響應式版面測試、效能最佳化以及預算檢查。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mianhtsys/landingMod3/tree/HEAD/MODULO_3_DESARROLLO_AL_LADO_DEL_CLIENTE_Y_SERVIDOR_WEB/architecture-skills-framework/.agents/skills/frontend-engineering

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

前端工程方法論 是做什麼的?

前端工程是打造應用程式使用者介面的技藝——元件、狀態管理、API 整合、響應式版面以及客戶端效能。此法將 UX 設計(使用者旅程、線框稿、可及性標準)與品質驗證(qa-methodology)串聯起來。

前端工程師的領域

你負責你不負責
元件實作 — UI 元件組合、props/state 介面、渲染模式、生命週期使用者旅程、線框稿、可及性標準、互動設計 — 這些是 product-design-and-ux 的範疇
狀態管理 — 客戶端狀態架構、資料擷取模式、快取、樂觀更新API 合約設計 — 這些是 api-design-and-evolution 的範疇
API 整合 — 前端到後端的資料流、授權流程 (OAuth, JWT)、即時更新測試策略與自動化 — 這些是 QA-engineer 的範疇
響應式設計實作 — 版面系統、斷點、跨裝置測試視覺識別與品牌規範 — 這些是 brand-designer 的範疇
客戶端效能 — 綑綁最佳化、延遲載入、Core Web Vitals、渲染最佳化編輯內容與文案 — 由內容與行銷團隊負責,不在本技能範圍內
前端測試 — 元件測試、整合測試、視覺回歸測試、可及性測試程式碼審查與品質閘門 — 這些是 qa-methodology 的範疇
前端功能的端對端測試情境與使用者流程涵蓋範圍操作瀏覽器測試工具 (Playwright) — 編寫/執行規格、選擇器、網路模擬、網頁爬取 — 請轉至 playwright
行動應用程式實作 (iOS/Android/Flutter/React Native)行動平台工作 — 建置範本、建置與簽署、裝置/模擬器測試、商店提交、行動生命週期 — 請轉至 mobile-development;本技能負責 Web 前端
建置工具 — 綑綁器配置、TypeScript 配置、linting、格式化、開發環境CI/CD 管線基礎設施 — 這些是 platform-engineer 的範疇

針對 React 元件與 hooks 相關工作,請載入 react;針對 Vite 配置、模式、外掛與建置,請載入 vite。本技能仍維持對框架中立架構與前端策略的主導權。

參考文件

參考文件何時載入
references/component-architecture.md設計元件樹 — 組合模式、props/state 介面、生命週期、可及性基礎
references/state-management.md選擇並實作狀態管理 — 客戶端 vs 伺服器狀態、資料擷取、快取、樂觀更新
references/api-integration.md連接前端與後端 — API 客戶端設計、授權令牌流程、UI 中的錯誤處理、即時訂閱
references/responsive-layout-testing.md實作響應式設計(版面系統選擇 — Grid vs Flexbox vs Container Queries、斷點策略、跨裝置測試方法論)以及測試前端程式碼(使用 Testing Library 進行元件測試、使用 Playwright/Cypress 進行整合測試、視覺回歸測試、使用 axe-core 與 Lighthouse CI 進行可及性測試、測試資料管理)
references/performance.md最佳化客戶端效能 — Core Web Vitals、綑綁分析、程式碼拆分、渲染最佳化

模板

模板使用時機
templates/component-state-design-record.md為某個功能設計元件樹與狀態所有權 — 分解、狀態範圍界定、資料擷取、以及錯誤/載入 UX
templates/performance-budget.md定義效能目標 — 綑綁位元組預算、Core Web Vitals 預算、測量設定與 CI 強制執行

腳本

腳本使用時機
scripts/bundle-budget-checker.py檢查綑綁大小報告是否超過總計與每個區塊的預算;當預算超標時會失敗(退出碼 1),因此 CI 可以阻止效能衰退

核心原則

元件是組合的單位,而非頁面 — 將元件設計和建置為可重複使用、可組合的單元。頁面由元件組合而成,而非以單體方式建置。一個設計良好的元件可以在創作者從未想像過的場合中重複使用。

將狀態與需要它的元件共置 — 並非每一段狀態都應該放入全域儲存。區域狀態保持區域性。伺服器狀態透過擷取與快取處理。只有真正共享的應用程式狀態才屬於全域上下文。

為每一種狀態設計,而非僅考慮快樂路徑 — 每個依賴資料的元件至少包含四種狀態:載入中、空值、錯誤與成功。為這四種狀態進行設計並非錦上添花,而是打造有韌性使用者體驗的關鍵。

可及性不是一項功能,而是必要條件 — 鍵盤導航、螢幕閱讀器支援、色彩對比與焦點管理不是增強功能。它們是實作合約的一部分。

效能是使用者體驗的考量 — 每毫秒的載入時間、每次版面位移、每次卡頓的互動都會侵蝕使用者信任。效能預算、綑綁分析與渲染最佳化是前端工程的一部分,而非事後補救。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

mianhtsys/landingMod3

Implement WCAG 2.2 compliant interfaces with mobile accessibility, inclusive design patterns, and assistive technology support. Use when auditing accessibility, implementing ARIA patterns, building for screen readers, or ensuring inclusive user experiences.

mianhtsys/landingMod3

Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.

mianhtsys/landingMod3

Diseña y compara alternativas arquitectónicas trazables a RF/RNF sin implementar código.

mianhtsys/landingMod3

Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use this skill when designing clean architecture for a new microservice, when refactoring a monolith to use bounded contexts, when implementing hexagonal or onion architecture patterns, or when debugging dependency cycles between application layers.

mianhtsys/landingMod3

Revisión adversarial de la arquitectura contra RF/RNF, detectando contradicciones, cobertura faltante y complejidad innecesaria.

mianhtsys/landingMod3

Master authentication and authorization patterns including JWT, OAuth2, session management, and RBAC to build secure, scalable access control systems. Use when implementing auth systems, securing APIs, or debugging security issues.

mianhtsys/landingMod3

>- Generate grounded-and-verified, engine-agnostic database documentation that reaches 100% parity with the real schema. Introspects the LIVE database as ground truth and cross-validates it against ORM models, migrations, generated types, seeds, and application queries, then proves completeness by diffing the docs back against the database. Produces ER diagrams (mermaid), per-table data dictionaries, and a machine-readable schema.json. Works with PostgreSQL, MySQL, SQL Server, and SQLite across any ORM (Prisma, TypeORM, Drizzle, Sequelize, Knex, Django, Rails) or raw SQL. Use when asked to document a database, produce an ERD or data dictionary, write db/schema docs, audit schema drift, or refresh existing DB docs.

mianhtsys/landingMod3

Compara estrategias de persistencia y motores de datos según consistencia, concurrencia, volumen, recuperación y operación.

mianhtsys/landingMod3

Design robust, scalable database schemas for SQL and NoSQL databases. Provides normalization guidelines, indexing strategies, migration patterns, constraint design, and performance optimization. Ensures data integrity, query performance, and maintainable data models.

mianhtsys/landingMod3

Consolida análisis especializados en una recomendación arquitectónica, matriz de decisión, ADR y plan de validación.

mianhtsys/landingMod3

Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.

mianhtsys/landingMod3

Evalúa despliegue, contenedores, escalado, alta disponibilidad, observabilidad, backup, recuperación y CI/CD de forma proporcional.

mianhtsys/landingMod3

Execute read-only SQL queries against multiple Microsoft SQL Server databases. Use when: (1) querying MSSQL/SQL Server databases, (2) exploring database schemas/tables, (3) running SELECT queries for data analysis, (4) checking database contents. Supports multiple database connections with descriptions for intelligent auto-selection. Blocks all write operations (INSERT, UPDATE, DELETE, DROP, etc.) for safety.

mianhtsys/landingMod3

Generate and maintain OpenAPI 3.1 specifications from code, design-first specs, and validation patterns. Use when creating API documentation, generating SDKs, or ensuring API contract compliance.

mianhtsys/landingMod3

PHP 8.0+ development — XAMPP, RESTful APIs, PDO/MySQL/MariaDB, and authentication. Use when building PHP backends, creating API endpoints, configuring XAMPP, or integrating PHP with databases.

mianhtsys/landingMod3

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features

mianhtsys/landingMod3

Analiza requisitos funcionales y no funcionales, reglas, restricciones, capacidad y ambigüedades antes de seleccionar tecnologías.

mianhtsys/landingMod3

Implement modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first breakpoint strategies. Use when building adaptive interfaces, implementing fluid layouts, or creating component-level responsive behavior.

mianhtsys/landingMod3

>- Use when designing or implementing software securely: define security requirements, threat-model a feature, choose secure defaults, design authentication and authorization, handle untrusted data and secrets, evaluate dependencies, design multi-tenant trust boundaries, or review security-sensitive changes. Use for prevention during requirements, design, implementation, and review; not for post-build security assessments or scanning an existing codebase.

mianhtsys/landingMod3

Revisa seguridad arquitectónica, identidad, autorización, secretos, APIs, auditoría, fraude y resiliencia antes de implementar.

相關技能