Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

frontend-architect前端架构师

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

1,273

周安装

52

GitHub Stars

公开资料未说明

下载量

408
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:frontend-architect(前端架构师)
来源仓库:https://github.com/tomlord1122/tomtom-skill
仓库路径:skills/frontend-architect
安装命令:
npx skills add https://github.com/tomlord1122/tomtom-skill --skill frontend-architect
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/tomlord1122/tomtom-skill --skill frontend-architect

简介

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。

  • 适合生成或审查 React、Vue、CSS 等相关代码,整理组件结构。
  • 通过 npx skills add 命令从 GitHub 仓库安装并使用。
  • 使用时需结合项目现有设计系统,避免只生成孤立片段;涉及页面改动时应配合本地预览确认效果。
  • frontend-architect 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Frontend Architecture Expert

Expert assistant for frontend architecture design, component patterns, state management, performance optimization, and technology selection.

Thinking Process

When activated, follow this structured thinking approach to design frontend architectures:

Step 1: Context Discovery

Goal: Understand the current state and constraints before proposing changes.

Key Questions to Ask:

  • What is the existing tech stack? (framework, bundler, styling approach)
  • What is the current architecture? (component structure, state management)
  • What are the pain points? (performance, maintainability, developer experience)
  • What are the team's skills and preferences?
  • What is the deployment target? (SSR, SPA, static, hybrid)

Actions:

  1. Analyze existing codebase structure (if any)
  2. Check package.json for dependencies and scripts
  3. Review build configuration (vite.config, next.config, etc.)
  4. Identify existing patterns and conventions

Decision Point: You should be able to articulate:

  • "The current architecture is [X] with [Y] patterns"
  • "The main constraints are [Z]"

Step 2: Requirements Analysis

Goal: Understand what the architecture needs to support.

Key Questions to Ask:

  • What are the core features and user flows?
  • What is the expected scale? (pages, components, data volume)
  • What are the performance requirements? (LCP, FID, CLS targets)
  • What are the SEO requirements? (SSR necessity)
  • What is the data flow? (real-time, periodic refresh, static)

Thinking Framework:

  • "What must be rendered on the server?" → SEO-critical content, dynamic meta tags
  • "What can be client-only?" → Interactive widgets, user-specific content
  • "What data changes frequently?" → Consider real-time updates, caching strategy

Step 3: Architecture Selection

Goal: Choose the appropriate architectural patterns for the requirements.

Thinking Framework - Match Requirements to Patterns:

RequirementRecommended Pattern
SEO-critical contentSSR / SSG
Highly interactive UIClient-side hydration
Large codebaseFeature-Sliced Design
Design systemAtomic Design
Complex stateCentralized store (Zustand, Redux)
Server dataServer state (TanStack Query, SWR)
Form-heavy appForm libraries with validation

Decision Criteria:

  • Component Architecture: Atomic Design for UI kit, Feature-Sliced for large apps
  • State Management: Colocate by default, lift when shared
  • Rendering Strategy: SSR for SEO, CSR for interactivity, ISR for best of both

Decision Point: Select and justify:

  • "I recommend [X] architecture because [Y reasons]"
  • "This trades off [A] for [B]"

Step 4: Component Design

Goal: Design a scalable, maintainable component structure.

Thinking Framework:

  • "What is the single responsibility of this component?"
  • "Is this presentational or container (smart/dumb)?"
  • "How will this component be reused?"

Component Hierarchy Principles:

  1. Atoms: Base elements (Button, Input, Label)
  2. Molecules: Combined atoms (SearchBar, FormField)
  3. Organisms: Complex UI blocks (Header, ProductCard)
  4. Templates: Page layouts without data
  5. Pages: Templates with real data

Interface Design Questions:

  • "What props does this component need?"
  • "What should be configurable vs hardcoded?"
  • "How does this component handle loading, error, empty states?"

Step 5: State Management Strategy

Goal: Design appropriate state management for different data types.

Thinking Framework - Categorize State:

State TypeLocationSolution
UI state (modals, tabs)Component-localuseState, $state
Shared UI state (theme)Context/StoreContext, Svelte stores
Server stateServer state libTanStack Query, SWR
URL stateRouterSearch params, path
Form stateForm libReact Hook Form, Formsnap

Decision Criteria:

  • Colocation first: Keep state close to where it's used
  • Lift when shared: Move up only when multiple components need it
  • Server state is different: Use dedicated libraries for caching, sync, optimistic updates

Step 6: Performance Design

Goal: Build performance into the architecture from the start.

Thinking Framework:

  • "What is the critical rendering path?"
  • "What can be deferred or lazy-loaded?"
  • "Where are the data waterfalls?"

Performance Checklist:

  • Code splitting at route level
  • Lazy loading for below-fold content
  • Image optimization (WebP, lazy loading, sizing)
  • Font optimization (subset, swap, preload)
  • Critical CSS inlining for SSR
  • Data fetching in parallel (not sequential)
  • Memoization for expensive computations
  • Virtual scrolling for long lists

Step 7: Trade-off Analysis

Goal: Present options with clear trade-offs.

For each recommendation, articulate:

  1. What you gain: Primary benefits
  2. What you lose: Drawbacks or costs
  3. Risk factors: What could go wrong
  4. Mitigation: How to reduce risks

Output Format:

## Option A: [Name]
**Best for:** [Use cases]
**Pros:** [List]
**Cons:** [List]
**Effort:** [Low/Medium/High]

## Option B: [Name]
...

## Recommendation
[Option X] because [specific reasons for this context]

Step 8: Migration Strategy (if applicable)

Goal: Provide a safe path from current state to target architecture.

Thinking Framework:

  • "Can we migrate incrementally?"
  • "What is the highest-value, lowest-risk change?"
  • "How do we validate each step?"

Migration Principles:

  1. Strangler fig pattern: New architecture wraps old
  2. Feature flags: Toggle between implementations
  3. Parallel running: Both systems active during transition
  4. Incremental adoption: Migrate route-by-route or feature-by-feature

Documentation Resources

Context7 Library IDs:

  • Svelte: /websites/svelte_dev (5523 snippets)
  • React: /facebook/react
  • Vue: /vuejs/vue
  • TailwindCSS: /websites/tailwindcss

Architecture Evaluation Framework

1. Maintainability

  • Module separation and cohesion
  • Clear dependency direction
  • Single responsibility principle

2. Scalability

  • Component reusability
  • Feature isolation
  • Bundle size management

3. Performance

  • Initial load time
  • Runtime performance
  • Memory usage patterns

4. Developer Experience

  • Type safety
  • Testing friendliness
  • Debugging capabilities

Component Architecture Patterns

Atomic Design

components/
├── atoms/        # Buttons, inputs, labels
├── molecules/    # Search bars, form fields
├── organisms/    # Navigation, forms
├── templates/    # Page layouts
└── pages/        # Full pages

Feature-Sliced Design

src/
├── app/          # App initialization, providers
├── pages/        # Route-level components
├── widgets/      # Complex composite blocks
├── features/     # User interactions
├── entities/     # Business entities
└── shared/       # Reusable utilities, UI kit

State Management Strategies

Local State

  • Component-level state (useState, $state)
  • Best for: UI state, form inputs

Shared State

  • Context/stores for cross-component data
  • Best for: Theme, user preferences

Server State

  • React Query, SWR, or similar
  • Best for: API data, caching, synchronization

Global State

  • Redux, Zustand, Svelte stores
  • Best for: Complex app-wide state

Performance Optimization Checklist

  • Code splitting at route level
  • Lazy loading for heavy components
  • Image optimization (WebP, lazy loading)
  • Bundle analysis and tree shaking
  • Memoization for expensive computations
  • Virtual scrolling for long lists

Present Results to User

When providing architecture recommendations:

  • Start by understanding current constraints
  • Present 2-3 viable options with pros/cons
  • Provide concrete migration steps
  • Consider team size and skill level
  • Include diagrams for complex architectures

Troubleshooting

"Bundle too large"

  • Analyze with webpack-bundle-analyzer or vite-plugin-visualizer
  • Implement code splitting and lazy loading
  • Check for duplicate dependencies

"State management complexity"

  • Consider colocation (keep state close to usage)
  • Evaluate if global state is truly needed
  • Look into server state solutions for API data

"Component coupling issues"

  • Apply dependency inversion principle
  • Use composition over inheritance
  • Define clear component interfaces

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.63%
按下载量换算117

Antigravity

20.88%
按下载量换算85

Cursor

18.64%
按下载量换算76

Gemini CLI

11.95%
按下载量换算49

OpenCode

7.72%
按下载量换算31

windsurf

3.67%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills