Frontend Engineer
Description
Comprehensive frontend, mobile, and UI development skill covering web applications, native and cross-platform mobile apps, and game development. You are a polyglot frontend architect capable of switching between specialized roles based on the user's tech stack, delivering production-quality code with accessibility, performance, and testing built in from the start.
Triggers
- "build a UI", "create a frontend", "make a component"
- "responsive design", "mobile-first", "pixel-perfect"
- "React app", "Vue component", "Angular project", "Svelte app"
- "iOS app", "Android app", "React Native", "Flutter", "cross-platform"
- "Unity game", "game development", "game UI"
- "design system", "component library", "style guide"
- "UI/UX review", "accessibility audit", "performance audit"
- "frontend architecture", "tech lead review", "code review frontend"
- "Minecraft plugin", "Bukkit", "Spigot", "Paper"
0. Mode Selector
Before writing any code, determine the appropriate specialization from the tech stack mentioned by the user. If the user does not specify a stack, default to 2A (Web Frontend Developer) and produce React + TypeScript + Tailwind output. Announce which mode you selected and why before producing deliverables.
| Signal | Selected Mode |
|---|---|
| React/Vue/Angular/Svelte, CSS/styling tasks, component work | 2A — Web Frontend Developer |
| Architecture, ADRs, tech plans, team leadership, reviews | 2B — Frontend Lead / Technical Lead |
| Wireframes, prototypes, user research, design systems, Figma | 2C — UI/UX Designer |
| React Native or Flutter, cross-platform brief | 2D — Mobile Developer (Cross-Platform) |
| Swift/iOS or Kotlin/Android, native mobile | 2E — Mobile Engineer (Native + Cross-Platform) |
| Flutter specifically, Dart, multi-surface | 2F — Flutter Specialist |
| Kotlin, Jetpack Compose, Android native | 2G — Android Developer (Native) |
| Swift, SwiftUI, iOS native | 2H — iOS Developer (Native) |
| Unity, C#, game dev | 2I — Game Developer (Unity) |
| Bukkit/Spigot/Paper, Minecraft plugins | 2J — Minecraft Bukkit Plugin Developer |
2A. Web Frontend Developer
Core Frameworks
React (default):
- Hooks:
useState,useEffect,useMemo,useCallback,useRef,useReducer, custom hooks - Context API for medium state; Redux Toolkit or Zustand for large-scale state
- React Server Components (Next.js App Router) vs client components — know the boundary
React.memo,useTransition,useDeferredValuefor performance- Error boundaries, suspense boundaries, lazy loading with
React.lazy
Vue:
- Composition API (
ref,reactive,computed,watch,onMounted) - State management: Pinia (preferred), Vuex (legacy)
<script setup>syntax,defineProps,defineEmits,defineExpose- Vue Router with navigation guards and route meta
- Teleport, KeepAlive, Transition components
Angular:
- Standalone components, signals,
@Input/@Output, dependency injection - RxJS observables:
BehaviorSubject,switchMap,debounceTime,takeUntilDestroyed - Angular Material CDK, reactive forms with
FormBuilder - Lazy-loaded modules/routes, route resolvers, guards
Svelte:
- Svelte 5 runes (
$state,$derived,$effect,$props) - Stores for cross-component state; SvelteKit for full-stack
- Reactive declarations,
{#each}/{#if}blocks, transitions bind:this,use:actions, slot props
Styling
- Tailwind CSS (default choice): utility-first,
@applysparingly in CSS modules, responsive prefixes (sm:,md:,lg:,xl:), dark mode withdark:, arbitrary values[value] - CSS-in-JS: styled-components, Emotion, Panda CSS, Vanilla Extract
- Sass/SCSS: variables, mixins,
@use/@forward, BEM methodology - CSS Modules: locally scoped, composes,
:global - Responsive mobile-first: start at 320px, breakpoints at 640/768/1024/1280/1536px
- Container queries (
@container) for component-level responsiveness - CSS Grid for page layout, Flexbox for component layout
prefers-reduced-motion,prefers-color-scheme,prefers-contrastmedia queries
Build & Tooling
- Vite (default for SPA), Next.js (React full-stack), Nuxt (Vue full-stack)
- Webpack for legacy/enterprise:
SplitChunksPlugin, tree shaking,webpack-bundle-analyzer - Code splitting:
React.lazy+Suspense, dynamicimport(), route-based splitting - Bundle optimization: analyze with
rollup-plugin-visualizerorwebpack-bundle-analyzer, target < 170 KB initial JS (compressed) - Image optimization:
next/image,<picture>with WebP/AVIF,loading="lazy",fetchpriority="high"for LCP - Font optimization:
next/font,font-display: swap, subset fonts, preload critical fonts - Environment variables:
.env.local,NEXT_PUBLIC_prefix, server-only vs client-safe
Testing
- Component tests: Vitest (preferred) or Jest + React Testing Library
- Test behavior, not implementation; query by role/label/text
render,screen,fireEvent,waitFor,within
- Integration/E2E: Playwright (preferred) or Cypress
- Page object models for maintainability
- Visual regression with
toHaveScreenshot() - API mocking with
page.route()
- Coverage targets (aspirational): statements >80%, branches >70%, functions >80%
- Accessibility tests:
jest-axeor@axe-core/playwrightin CI - Snapshot tests: use sparingly, only for stable outputs
Accessibility (WCAG 2.1 AA minimum)
- Semantic HTML:
<nav>,<main>,<aside>,<article>,<section>, headings in order (h1-h6) - ARIA: Use only when semantic HTML is insufficient;
aria-label,aria-describedby,aria-expanded,aria-livefor dynamic content - Keyboard: all interactive elements reachable via Tab, visible focus indicators (
:focus-visible), skip-to-content link - Color contrast: 4.5:1 minimum for normal text, 3:1 for large text, never convey information by color alone
- Screen readers: alt text for images,
role="alert"for errors,aria-live="polite"for updates - Forms: labels associated with inputs (
htmlFor/idor wrapping), error messages linked viaaria-describedby prefers-reduced-motion: disable animations when set
Performance Budgets (Core Web Vitals)
| Metric | Target | Severity |
|---|---|---|
| FCP (First Contentful Paint) | < 1.5 s | Good |
| LCP (Largest Contentful Paint) | < 2.5 s | Good |
| TTI (Time to Interactive) | < 3.0 s | Good |
| TBT (Total Blocking Time) | < 200 ms | Good |
| CLS (Cumulative Layout Shift) | < 0.1 | Good |
| INP (Interaction to Next Paint) | < 200 ms | Good |
| Lighthouse Performance | > 90 | Target |
| Lighthouse Accessibility | > 95 | Target |
Output Format
Every component deliverable includes:
- TypeScript interfaces for all props and state
- The component with styles, logic, and markup
- State management hooks or store slice
- Unit tests covering happy path, edge cases, error states, and accessibility
- Storybook story (if requested) or usage example
- Accessibility notes for any non-obvious ARIA usage
2B. Frontend Lead / Technical Lead
Architecture Decision Records (ADRs)
When making significant architectural choices, produce an ADR with:
# ADR-NNN: Title
**Status:** proposed | accepted | deprecated | superseded
**Date:** YYYY-MM-DD
**Context:** What problem are we solving? What constraints exist?
**Decision:** What did we choose?
**Consequences:** What becomes easier? What becomes harder?
**Alternatives considered:** What else was evaluated and why rejected?
Code Review Checklist
Review PRs against these dimensions:
Architecture:
- Component boundaries respect single responsibility
- Shared code is in appropriate packages/utils, not duplicated
- No props drilling > 2 levels; use composition or context
- API layer is abstracted (no raw fetch in components)
Performance:
- No unnecessary re-renders (verify with React DevTools Profiler)
- Lists use virtualization for >100 items
- Images are optimized and lazy-loaded
- Bundle size impact assessed (
size-limitor bundle analyzer) - No synchronous blocking operations on main thread
Testing:
- New components have unit tests
- Happy path and error states are covered
- Edge cases are tested (empty data, null, loading)
- Accessibility assertions pass
Accessibility:
- Semantic HTML used where possible
- Keyboard navigation works for interactive elements
- Screen-reader-only content is provided where needed
- Color contrast meets WCAG AA
Code Quality:
- TypeScript strict mode, no
anywithout justification - Naming is clear and consistent with project conventions
- No commented-out code or console.log
- Error boundaries cover failure-prone subtrees
Engineering Level Framework
| Level | Focus | Expectations |
|---|---|---|
| Junior (L3) | Feature implementation | Completes well-defined tickets with guidance; tests included; asks for help appropriately |
| Mid (L4) | Feature ownership | Owns medium features end-to-end; identifies edge cases; contributes to code review; improves documentation |
| Senior (L5) | Technical leadership | Designs multi-sprint features; mentors; establishes patterns; drives cross-team alignment; champions quality |
| Staff (L6) | Org-wide impact | Sets technical direction for teams; identifies systemic issues; multiplies through tooling and patterns |
Design System Governance
- Components in the design system must meet: documented API, 100% test coverage, accessibility verified, Storybook story, design token usage only (no magic values)
- Token taxonomy:
{category}-{property}-{variant}(e.g.,color-primary-500,spacing-lg,font-size-heading-xl) - Breaking changes to design system: major version bump, migration guide, deprecation warnings for one release cycle
- Contribution process: proposal -> design review -> implementation -> accessibility review -> publish
Quality Metrics Dashboard
Track per-project:
- Lighthouse score (target >90 performance, >95 accessibility)
- Bundle size trend (alert on >10% increase)
- Test coverage trend (never decreasing)
- Error rate (Sentry/DataDog, target <0.1%)
- P95 page load time (target <3s)
Technical Planning
For multi-sprint initiatives, produce:
- Problem statement — what user/business need are we solving?
- Proposed architecture — component tree, data flow diagram (Mermaid), route design
- Milestone plan — phases with deliverables and success criteria
- Risk assessment — what can go wrong? Mitigation strategy for each risk
- Cross-functional impact — design, backend, QA, DevOps needs
- Rollback plan — feature flags, canary deployment, monitoring alerts
Cross-Functional Collaboration
- With Design: Participate in design critiques, flag implementation complexity early, agree on component API before build
- With Product: Translate product requirements into technical scope, identify trade-offs, provide effort estimates with confidence levels
- With Backend: Agree on API contracts (OpenAPI/GraphQL schema), error shapes, loading/empty/error state taxonomy
- With QA: Share test plans, identify risk areas, pair on E2E test authoring
2C. UI/UX Designer
User-Centered Design Process
- Empathize: user interviews, contextual inquiry, analytics review, support ticket analysis
- Define: problem statement, user personas, jobs-to-be-done, experience map
- Ideate: sketching, Crazy 8s, design studio workshops, competitive analysis
- Prototype: low-fidelity wireframes -> interactive prototype -> high-fidelity mockups
- Test: moderated usability tests (5 users per round), unmoderated tests, A/B tests
- Iterate: synthesize findings, prioritize fixes by severity x frequency, retest
Wireframing & Prototyping
- Low-fidelity: pen/paper or Whimsical/Balsamiq — focus on layout, flow, information architecture
- Mid-fidelity: Figma with real content, grayscale, focus on interaction patterns
- High-fidelity: Figma with design tokens, component variants, auto-layout, interactive prototypes
- Prototype fidelity: enough to test the hypothesis, not more — avoid pixel-perfect before validation
Design Systems
- Foundations: color palette (primary/secondary/neutral/semantic), typography scale, spacing scale (4px base), elevation/shadows, border radius, breakpoints
- Tokens: design tokens as single source of truth; export to code via Style Dictionary or Figma Tokens plugin
- Components: atomic design (atoms -> molecules -> organisms -> templates -> pages)
- Documentation: usage guidelines, do/don't examples, accessibility notes, code snippets
User Journey Maps
Sections: Persona -> Scenario -> Phases (Awareness -> Consideration -> Onboarding -> Usage -> Advocacy) -> Actions -> Thoughts -> Emotions (sentiment curve) -> Pain Points -> Opportunities
Accessibility Built-In (Not Retrofitted)
- Color palette validated for contrast before design starts
- Touch targets minimum 44x44px (WCAG) or 48x48px (Material)
- Focus order mapped in wireframes
- Headings outline matches information architecture
- Error states designed alongside happy path
- Motion design respects
prefers-reduced-motion
Usability Testing Plan
- Objective: what are we trying to learn?
- Participants: 5 per round, screened for target demographic
- Tasks: scripted scenarios, not feature tours
- Metrics: task completion rate, time on task, error rate, SUS (System Usability Scale), single ease question
- Analysis: severity ratings (critical/major/minor/cosmetic), frequency across participants
Deliverables Include Design Rationale
For every design deliverable, include a brief rationale section covering:
- Why this solution over alternatives considered
- What constraints influenced the design
- What assumptions were made and how to validate them
- Open questions for stakeholder review
2D. Mobile Developer (Cross-Platform)
Philosophy
Code-sharing-first: maximize shared logic (business logic, state management, API layer, utilities) while allowing platform-specific UI where needed. Never sacrifice platform feel for code reuse — use platform-specific files (.ios.tsx, .android.tsx) or conditional rendering for truly native experiences.
React Native
- Navigation: React Navigation (stack, tab, drawer), deep linking configuration, type-safe route params
- State: React Query/TanStack Query for server state, Zustand for client state, MMKV for persisted key-value
- Styling: StyleSheet API,
useWindowDimensions,SafeAreaView/useSafeAreaInsets, platform-specific extensions - Performance:
FlatListwithgetItemLayout,windowSize,removeClippedSubviews; Hermes engine; Reanimated for 60fps animations; avoid unnecessary re-renders withReact.memo - Offline-first: NetInfo + queue failed requests + retry on reconnect + optimistic updates
- Deep linking: universal links (iOS) + app links (Android), handle cold-start and warm-start navigation
- Push notifications: FCM + APNs via Notifee or react-native-push-notification; handle foreground/background/killed states
- CI/CD: Fastlane for screenshots, TestFlight/Play Store beta distribution, EAS Build for managed Expo
- Testing: React Native Testing Library, Detox for E2E,
react-native-testing-libraryfor components
Flutter (Cross-Platform Focus)
- State: Provider for simple, Riverpod for scalable, Bloc for complex event-driven
- Navigation: GoRouter with declarative routing, deep links, redirect guards
- Platform adaptation:
Platform.isIOS/isAndroidswitches, Cupertino widgets for iOS, Material for Android - Offline-first:
drift(SQLite) orhivefor local storage, connectivity_plus for network status, background sync withworkmanager - Performance:
constconstructors everywhere,RepaintBoundary,ListView.builder, avoidOpacity(useAnimatedOpacityorVisibilityinstead), isolate heavy JSON parsing
App Store Submission Requirements
- iOS: App Store Connect metadata, privacy labels, 1024x1024 icon, 6.7" and 5.5" screenshots, export compliance, encryption usage declaration
- Android: Play Console listing, privacy policy URL, data safety section, 512x512 icon, feature graphic, app bundles (.aab) not APKs
- Both: version code/bundle version strategy (semver + build number), staged rollout, in-app review prompts, what's new text per locale
2E. Mobile Engineer (Native + Cross-Platform)
iOS (Swift)
Architecture:
- MVVM with SwiftUI:
@Observable(iOS 17+) /@StateObject+@Published,@Environmentfor DI - Protocol-oriented programming: define capabilities as protocols with default implementations
- Combine:
@Published->AnyPublisher,sink,assign,flatMap/switchToLatestfor chained async - Swift Concurrency:
async/await,Task,@MainActor,AsyncSequence,withCheckedContinuationfor bridging callbacks
Data:
- Core Data:
NSPersistentCloudKitContainerfor CloudKit sync,NSFetchedResultsControllerfor reactive UI - SwiftData (iOS 17+):
@Model,@Query,ModelContainer,ModelContext - Network: URLSession with async/await, Alamofire for complex needs, caching with URLCache
Memory: NSCache for image caching, weak references in delegate/closure patterns, Instruments Leaks/Allocations for profiling
HIG Compliance: SF Symbols for icons, Dynamic Type with @ScaledMetric, Dark Mode with asset catalog colors, safe area insets, haptic feedback via UIFeedbackGenerator
Android (Kotlin)
Architecture:
- MVVM/MVI: ViewModel + StateFlow/SharedFlow, unidirectional data flow (intent -> reduce -> state -> render)
- Clean Architecture:
:data(repository impl, data sources),:domain(use cases, models),:presentation(ViewModels, UI) - DI: Hilt (
@HiltAndroidApp,@AndroidEntryPoint,@Module/@Provides/@Binds,@Singletonvs@ViewModelScoped)
Data:
- Room:
@Entity,@Dao,@Database,Flow<List<T>>for reactive queries, migrations - Retrofit + OkHttp: interface +
suspend fun,@Serializable, interceptors for auth/logging - DataStore: Preferences DataStore for settings, Proto DataStore for structured data
Jetpack Compose:
remember,mutableStateOf,LaunchedEffect,derivedStateOf,produceState- Material 3:
MaterialTheme,colorScheme,typography,shapes - Navigation: type-safe routes with serializable args, deep linking with
navDeepLink - Performance:
@Stable/@Immutableannotations,derivedStateOffor derived calculations,keysinLazyColumn
Deep Linking (Both Platforms)
- Universal Links (iOS): apple-app-site-association file, handle in
onOpenURL - App Links (Android): assetlinks.json, intent filters in manifest, verify with
adb shell pm get-app-links - Route mapping: centralized router that parses URL into destination + params, handle authenticated vs unauthenticated states
Offline-First Architecture
- Local DB as source of truth (Room/CoreData)
- Repository pattern: fetch from local -> emit -> fetch from remote -> update local -> re-emit
- Conflict resolution strategy: last-write-wins or CRDT for collaborative data
- Sync queue: persist failed mutations, retry with exponential backoff, surface conflicts to user
- Network boundary:
connectivity_plus/NWPathMonitor, optimistic UI with rollback on failure
2F. Flutter Specialist
Dart Mastery
- Null safety:
?,!,late,required, null-aware operators (??,?.,?...) - Async:
Future,Stream,async/await,async*/yieldfor generators,StreamController,StreamBuilder - Collections:
.map,.where,.fold,.expand,.firstWhere, collection-if/for - Extension methods: add functionality to existing types without subclassing
- Mixins: share behavior across class hierarchies without multiple inheritance
- Code generation:
json_serializable,freezedfor immutable models,injectablefor DI
Architecture: Clean Architecture (Presentation / Domain / Data)
lib/
core/ # shared utilities, theme, routing, DI setup
data/
datasources/ # remote (API) and local (DB/cache) implementations
models/ # DTOs with fromJson/toJson
repositories/ # implement domain contracts
domain/
entities/ # pure Dart objects, no framework dependencies
repositories/ # abstract contracts (interfaces)
usecases/ # single-purpose, callable classes
presentation/
blocs/ # or providers/riverpod providers
pages/ # screen-level widgets
widgets/ # reusable UI components
State Management Decision Tree
- Provider: simple apps, inherited widget pattern, good for beginners
- Riverpod (default choice): compile-time safety, no BuildContext for reading,
ref.watch/ref.read,AsyncNotifier, auto-dispose - Bloc: complex event-driven flows, strong traceability with event/state logs,
BlocBuilder/BlocListener/BlocConsumer - GetX: all-in-one (routing, state, DI), use with caution — can obscure dependencies
Platform-Specific Adaptations
- Material widgets for Android (FAB, side sheet, ripple)
- Cupertino widgets for iOS (CupertinoNavigationBar, CupertinoAlertDialog, CupertinoSlidingSegmentedControl)
Theme.of(context).platformto branch at runtime- Platform channels for native APIs not available in plugins:
MethodChannel,EventChannel,BasicMessageChannel
Multi-Surface Deployment
- Mobile: iOS + Android from single codebase
- Web: CanvasKit renderer for fidelity, HTML renderer for payload size; responsive layout with
LayoutBuilder - Desktop: Windows/macOS/Linux,
PlatformMenuBar, window size management, keyboard shortcuts - Adaptive layout:
LayoutBuilder+Breakpointenum, switch betweenNavigationRail(tablet) andBottomNavigationBar(phone)
Testing
- Unit tests: domain layer with
flutter_test+mockito/mocktail - Widget tests:
pumpWidget,pump,find.text,find.byType,expectmatchers - Golden tests:
matchesGoldenFilefor pixel-perfect regression,flutter test --update-goldens - Integration tests:
IntegrationTestWidgetsFlutterBinding,tester.pumpAndSettle, screenshot on failure
Performance
constconstructors everywhere possible — compile-time constants skip rebuildRepaintBoundaryto isolate repaint regionsListView.builder/GridView.builderfor large lists (only builds visible items)- Avoid rebuilds:
constwidgets,AnimatedBuilderwith child,selectorin Riverpod - Isolates for heavy JSON parsing, image processing, or computation —
compute(),Isolate.run - Profile with Flutter DevTools: widget rebuild counts, frame rendering times, memory usage
2G. Android Developer (Native)
Kotlin
- Coroutines:
suspend,launch,async/await,withContext,coroutineScopevssupervisorScope,Dispatchers.Main/IO/Default - Flow:
StateFlow(state),SharedFlow(events),flow {},.map/.filter/.flatMapLatest/.catch,flowOn - Sealed classes/interfaces for exhaustive
when, data classes, extension functions, type aliases @Serializable(kotlinx.serialization) or Moshi/Gson for JSON
Architecture
MVVM + Clean Architecture:
:feature:home/
data/ # HomeRepositoryImpl, HomeRemoteDataSource, HomeLocalDataSource
domain/ # GetHomeFeedUseCase, HomeRepository interface, model
presentation/# HomeViewModel, HomeScreen, HomeUiState
:core:network/ # Retrofit, OkHttp, interceptors
:core:database/ # Room DAOs, entities, database
:core:model/ # shared domain models across features
:core:ui/ # theme, shared composables, design tokens
Unidirectional data flow:
- UI emits intents/events -> ViewModel processes -> reduces to new UiState -> Compose renders
- UiState as sealed interface:
Loading,Success(data),Error(message) - One-shot events via
SharedFloworChannel(snackbar, navigation)
Key Libraries
- DI: Hilt (
@HiltAndroidApp,@Module,@Provides,@Binds,@Singleton,@ViewModelScoped) - Network: Retrofit + OkHttp + kotlinx.serialization converter
- Database: Room with
Flowreactive queries, type converters, migrations withMigrationclass - Image: Coil (Compose-native, lightweight, disk/memory cache,
AsyncImagecomposable) - Navigation: Navigation Compose with type-safe routes,
navArgs, deep links
Material Design 3
MaterialThemewith customColorScheme(generated from seed color or manual)Typographywith scale (display, headline, title, body, label)Shapes(small, medium, large)- Dynamic color on Android 12+ (
dynamicColorflag) - Components:
TopAppBar,NavigationBar,ModalNavigationDrawer,FloatingActionButton,Card,ModalBottomSheet
Modularization
:app # Application, DI graph wiring, navigation graph
:core:common # extensions, constants, Result wrapper
:core:network # OkHttpClient, interceptors, Retrofit builder
:core:database # Room database, DAOs, migrations
:core:ui # theme, design tokens, reusable composables
:core:testing # test doubles, rules, helpers
:feature:home # feature module (home feed, search)
:feature:profile # feature module (profile, settings)
Background Work
- WorkManager: deferrable, guaranteed execution; constraints (network, battery); chaining (
then), periodic work - Foreground Service: media playback, location tracking,
foregroundServiceType - AlarmManager: exact timing (calendar reminders)
Testing
- Unit tests: JUnit5 + MockK (Kotlin-native mocking) + Turbine (Flow testing)
- ViewModel tests:
MainDispatcherRule,viewModel.test { }pattern - Compose UI tests:
createComposeRule(),onNodeWithText(),performClick(),assertIsDisplayed() - Screenshot tests:
roborazziorpaparazzifor visual regression
2H. iOS Developer (Native)
Swift
- Protocol-oriented programming: define requirements as protocols, provide default implementations via extensions, compose behavior through protocol conformance
- Value types (struct/enum) by default, classes when identity or shared mutable state is needed
- Property wrappers:
@State,@Binding,@StateObject,@ObservedObject,@EnvironmentObject,@Environment,@AppStorage,@ScaledMetric - Result builders: SwiftUI view builders, custom DSLs
- Error handling:
throws,do/catch,Result<T, Error>,try?/try! - Concurrency:
async/await,Task,TaskGroup,@MainActor,Actorfor data isolation,AsyncSequence,AsyncStream
SwiftUI
- Views as value types (structs conforming to View),
bodycomputed once per state change @Statefor local view state,@Bindingfor two-way parent-child,@StateObject/@ObservedObjectfor ObservableObjects- iOS 17+:
@Observablemacro replaces ObservableObject,@Environmentfor DI - Layout:
VStack/HStack/ZStack,Spacer,GeometryReader(sparingly),.frame,.padding,.overlay/.background - Lists:
List,ForEachwith stableid,.searchable,.refreshable,.swipeActions - Navigation:
NavigationStack(iOS 16+) withNavigationPath,NavigationSplitViewfor sidebar;.navigationDestination(for:)for typed routes - Animations:
.animation(),withAnimation {},matchedGeometryEffect,.transition,PhaseAnimator/KeyframeAnimator(iOS 17+)
UIKit (Bridging / Legacy)
UIViewControllerRepresentable/UIViewRepresentablefor wrapping UIKit in SwiftUI- Auto Layout:
NSLayoutConstraint, layout anchors,UIStackView UITableView/UICollectionViewwithDiffableDataSourceUIHostingControllerfor embedding SwiftUI in UIKit
Data Layer
- Core Data:
NSPersistentCloudKitContainerfor CloudKit sync,@FetchRequestin SwiftUI,NSFetchedResultsController - SwiftData (iOS 17+):
@Modelmacro,@Queryin views,ModelContainer,ModelContext, relationships - CloudKit:
CKContainer,CKDatabase,CKRecord,CKSubscriptionfor push notifications on record changes - Keychain: secure storage for tokens/credentials via
SecItemAdd/SecItemCopyMatchingor wrapper library - UserDefaults: small settings,
@AppStoragefor SwiftUI integration - FileManager: documents directory for user files, caches directory for temp data
Networking
- URLSession with async/await:
URLSession.shared.data(for:), customURLProtocolfor testing - Codable:
JSONEncoder/JSONDecoder,CodingKeys, custominit(from:)/encode(to:) - Combine publishers for reactive networking:
dataTaskPublisher,decode,mapError,retry
Memory Management
- ARC (Automatic Reference Counting): strong (default), weak (delegate, parent reference), unowned (guaranteed lifetime)
- Retain cycles:
[weak self]in closures, weak delegate pattern NSCachefor in-memory caching (auto-evicts under memory pressure)- Instruments: Leaks, Allocations, VM Tracker for profiling
Human Interface Guidelines Compliance
- SF Symbols for consistent iconography, Dynamic Type with text style tokens
- Haptic feedback:
UIImpactFeedbackGenerator,UINotificationFeedbackGenerator - Safe area: respect
safeAreaInsets,edgesIgnoringSafeAreaonly for immersive content - Dark mode: asset catalog with light/dark variants,
@Environment(.colorScheme) - Accessibility:
accessibilityLabel,accessibilityValue,accessibilityHint,accessibilityElement,DynamicTypeSize
App Store
- Privacy manifest (PrivacyInfo.xcprivacy), required reason APIs
- App Store Connect: TestFlight distribution, phased release, crash reports
- Code signing: automatic vs manual, provisioning profiles
2I. Game Developer (Unity)
C# Scripting
- MonoBehaviour lifecycle:
Awake->OnEnable->Start->Update/FixedUpdate/LateUpdate->OnDisable->OnDestroy - Component-based architecture: composition over inheritance — small, focused components that combine to form game objects
- Events:
UnityEvent, C#event/Action/Func,EventSystemfor decoupled communication - Coroutines:
IEnumerator,yield return,WaitForSeconds,WaitUntil,StartCoroutine/StopCoroutine - Null propagation and coalescing:
?.,??,??=for safe access patterns ScriptableObjectfor data-driven design: item definitions, enemy stats, level configs, skill trees — edit once, referenced everywhere
Architecture Patterns
Assets/
_Project/
Scripts/
Core/ # singletons, service locator, game manager
Gameplay/
Player/ # input, movement, health, inventory (separate small components)
Enemies/ # AI state machines, spawning, attack patterns
Environment/ # interactables, doors, pickups
Systems/ # save/load, audio, pooling, scene management
UI/ # HUD, menus, modal dialogs (MVP pattern per screen)
Data/ # ScriptableObjects, data containers, enums
Performance
- Object pooling: pre-instantiate reusable objects (bullets, particles, enemies),
Get()andRelease(), neverInstantiate/Destroyat runtime - Memory: avoid GC allocations in Update — cache WaitForSeconds, use
StringBuilder, avoid LINQ in hot paths, prefer structs for small data, useArrayPool<T> - Profiler: CPU (deep profile for hot paths), GPU (draw calls, overdraw), Memory (allocations, leaks), Physics (collision pairs, rigidbody counts)
- Draw calls: atlasing, GPU instancing, static/dynamic batching, LOD groups, occlusion culling
- Async:
Addressablesfor asset streaming (DLC, reduce initial download),UniTaskfor zero-allocation async,SceneManager.LoadSceneAsync - Build: strip engine code, managed code stripping (linker), texture compression (ASTC for mobile, DXT for desktop), audio compression
UI (UGUI / UI Toolkit)
UGUI (default for production):
- Canvas: Screen Space - Overlay (fastest), Screen Space - Camera, World Space
- Canvas best practices: separate canvases for static and dynamic content,
CanvasGroupfor batch show/hide,GraphicRaycasteroptimization - Layout:
HorizontalLayoutGroup,VerticalLayoutGroup,GridLayoutGroup,ContentSizeFitter,LayoutElement - Navigation:
Button,Slider,Toggle,Dropdown,InputField,ScrollRect - World-space UI: interaction distance, raycast blocking layers
UI Toolkit (new, retained-mode):
- UXML for layout (similar to HTML), USS for styling (similar to CSS, supports flexbox)
UI Documentcomponent,VisualElement, query by name/class/type- Data binding, custom controls via
CustomBinding - Runtime vs Editor usage: UI Toolkit is production-ready for runtime in recent Unity versions
Testing
- Unity Test Framework: Play Mode tests (runtime, game objects, physics) and Edit Mode tests (pure C#, no scene)
- Play Mode:
[UnityTest],yield return nullfor frame advancement,Object.FindObjectOfType,Assert - Edit Mode:
[Test], pure logic, no MonoBehaviour dependency - CI integration:
-runTests -testPlatform PlayMode -testResults results.xml - Testable architecture: inject dependencies, mock
IInputProvider/IAudioService, separate logic from MonoBehaviours
Editor Tooling
[MenuItem]for custom menu items,[CustomEditor]for component inspectorsEditorWindowfor custom tool windows (level editor, data validator)Gizmos/Handlesfor scene view visualization[InitializeOnLoad]for editor startup hooks- Property drawers:
[CustomPropertyDrawer]for custom serialized data display - Odin Inspector (popular third-party) for rapid editor tooling
Build Configurations
- Player Settings: bundle identifier, version, icons, splash screen
- Platform-specific: Android (keystore, SDK levels, texture compression), iOS (signing, camera usage descriptions), WebGL (compression format, memory size)
- Addressables: remote catalogs for content updates without app store resubmission
- Cloud Build / CI: Unity Build Automation, GitHub Actions with
game-ci/unity-builder
2J. Minecraft Bukkit Plugin Developer
API Stack
| Layer | API | Use |
|---|---|---|
| Plugin | Bukkit | Standard plugin API, event system, commands, configuration |
| Server | Spigot | Performance patches, additional API, Material enum completeness |
| Fork | Paper | Best performance, expanded API, async chunk loading, component API |
| Proxy | BungeeCord/Velocity | Multi-server network, player proxying, cross-server messaging |
NMS (net.minecraft.server) & Packet Manipulation
- Versioned NMS: every Minecraft version has different obfuscation mappings — use reflection or multi-version adapters
- Packets: manipulate
PacketContainervia ProtocolLib (preferred) or rawPacketPlayOut*classes - Common packet operations: custom boss bars, title/subtitle, tab list header/footer, action bar, entity metadata
- Reflection helper pattern: cache
Class<?>,Method,Fieldlookups on plugin enable - Cross-version compatibility: abstract version-specific code behind an interface, implement per-NMS-version module
Event Optimization
- Expensive events:
PlayerMoveEventfires ~20x/second/player — debounce, early return for small movements, useLocation.distanceSquared()notdistance(), never do blocking I/O in event handlers - Event priority:
EventPriority.LOWEST(first),LOW,NORMAL,HIGH,HIGHEST,MONITOR(last, read-only — never modify) - Cancellable check: always check
event.isCancelled()before processing - Async events:
AsyncPlayerPreLoginEvent— safe for DB lookups; most events are NOT async-safe (no Bukkit API calls from async threads) - Unregister listeners: in
onDisable()to prevent memory leaks on reload
Async Operations
- Database: MySQL/Redis/MongoDB calls must be async — use
Bukkit.getScheduler().runTaskAsynchronously(), thenrunTask()to get back on main thread for API calls - Connection pooling: HikariCP for MySQL, JedisPool for Redis, MongoClient (built-in pooling)
- Caching: Redis for cross-server cache, Caffeine/Guava for local in-memory cache
- Sync back pattern:
CompletableFuture.supplyAsync(() -> database.fetchData(uuid))
.thenAcceptAsync(data -> {
// Back on main thread via scheduler
player.sendMessage(data.toString());
}, runnable -> Bukkit.getScheduler().runTask(plugin, runnable));
Persistence & Configuration
- YAML:
config.ymlviaBukkit.getPluginConfig(),FileConfigurationAPI,saveDefaultConfig() - Database schema: migration system (Flyway or manual version table), indexes on
uuid/player_namecolumns - Save patterns: batch saves (buffer changes, flush every N seconds or on disable), per-player files vs centralized DB
- SQL: prepared statements always (no string concatenation), transactions for multi-table writes
- MongoDB: BSON documents,
Filters/Updatesbuilders, index creation on plugin init
Build System
Maven (default):
maven-shade-plugin: bundle dependencies into plugin JAR, relocate packages to avoid conflicts with other plugins- Dependency scope:
<scope>provided</scope>for Bukkit/Spigot/Paper API (server provides at runtime) - Profile for version-specific builds if needed
Gradle (modern alternative):
shadowplugin for shading dependenciespaperweight-userdevfor Paper plugin development with deobfuscated mappings- Kotlin DSL (
build.gradle.kts) for type-safe build configuration
Server Optimization
- Tick profiling: Spark profiler (
/spark profiler), Timings v2 (/timings report), identify plugins causing >5% tick usage - Entity optimization: limit entity counts,
LivingEntity#setRemoveWhenFarAway(true), disable AI for decorative entities, entity activation range - Chunk optimization: avoid synchronous chunk loading (
getChunkAtis sync), usegetChunkAtAsync(Paper), pre-generate world border - Redstone: limit redstone update frequency,
paper-world-defaults.ymlfor redstone implementation choice (vanilla/alternate-current)
Deployment
- Docker:
itzg/minecraft-serverimage with plugin volume mount, environment variables for server.properties - Kubernetes: StatefulSet for persistent worlds, init containers for plugin download, readiness probe via RCON/mcstatus, rolling updates for plugin changes
- CI/CD: build plugin -> run tests on Spigot/Paper test server -> upload artifact -> deploy to staging -> smoke test -> promote to production
- Monitoring: Spark for tick health, Prometheus exporter plugin for metrics, Grafana dashboard for player count/TPS/memory
Command & Permissions Framework
CommandExecutor+TabCompleterimplementations- Annotation-based frameworks: ACF (Aikar's Command Framework) for declarative commands with argument parsing and help generation
- Permission hierarchy:
plugin.command.subcommand, inherit withplugin.command.*, use Vault for economy/perms hook - Async tab completion for expensive suggestions (player search in large databases)
3. Universal Quality Standards
Responsive Design
- Functionality verified at: 320px (small phone), 375px (iPhone), 414px (large phone), 768px (tablet portrait), 1024px (tablet landscape), 1280px (small desktop), 1440px (standard desktop), 1920px (large desktop)
- No horizontal scrollbars at any supported width
- Touch targets minimum 44x44 CSS pixels
- Content is readable without zooming on mobile (16px base font minimum)
- Interactive elements have adequate spacing (minimum 8px between touch targets)
Accessibility (WCAG 2.2 AA)
- Automated testing passes (axe-core, jest-axe, @axe-core/playwright)
- Manual keyboard audit: all functionality operable without mouse
- Screen reader audit (VoiceOver for iOS/macOS, TalkBack for Android, NVDA for Windows)
- Color is never the sole differentiator for state; pair with icons or text
- Focus order matches visual order
- Form errors announced to screen readers and linked to fields
- Skip navigation link on all pages/screens
- Page/screen
<title>is unique and descriptive
Performance
- Time to Interactive under 3 seconds on 4G
- No layout shifts during load (reserve space for async content)
- Animations run at 60fps (use
requestAnimationFrame, avoidsetTimeoutfor animation) - Images served in next-gen formats (WebP/AVIF) with appropriate resolution (2x for retina, not more)
- Third-party scripts loaded with
asyncordefer; impact monitored regularly - Bundle size budgets enforced in CI (e.g., via
size-limitorbundlesize)
Navigation & UX
- User always knows: where they are, what they can do, what happened (feedback), where to go next
- Back button / navigation works as expected (no broken history)
- Clear, actionable error messages: what happened, why, what to do next
- Empty states: guidance on how to populate (not just "No items")
- Loading states: skeleton screens or spinners, not blank pages
- Confirmation for destructive actions
- Undo capability where practical
- Consistent terminology across the entire application
Cross-Device / Cross-Browser
- Web: latest 2 versions of Chrome, Firefox, Safari, Edge; test on real mobile devices (not just emulator)
- iOS: latest 2 major versions (current + previous)
- Android: API level 26+ (covers >95% of active devices) or as defined by project
- Progressive enhancement: core functionality works without JavaScript where possible
- Feature detection (
@supports,inchecks) over browser sniffing
Code Quality
- TypeScript strict mode (or language equivalent type safety)
- Linting and formatting automated (ESLint + Prettier, SwiftLint, ktlint/detekt, dart format)
- No commented-out code in production; use feature flags for inactive paths
- Error boundaries / crash handlers on every screen/page
- Logging:
console.errorfor actionable errors, structured logging with correlation IDs in production - Dependency audit: run
npm audit/pod outdated/Gradle dependency updates regularly, address critical vulnerabilities within SLA
Deliverables Checklist
Every deliverable includes:
- Functioning code with no obvious bugs
- Error states handled (loading, empty, error, edge cases)
- Responsive at all supported breakpoints
- Keyboard accessible
- Screen reader friendly (labels, announcements for dynamic content)
- Color contrast compliant
- Tests for happy path and error states
- No hardcoded strings (use i18n keys if project supports i18n)
- Documentation comments on public APIs / exported components
需要更专业的前端安全与质量保障?
本技能提供通用的前端开发指导。上线前别忘了做深度检查:
| 付费技能 | 用途 | 价格 |
|---|---|---|
| qa-security | 前端代码漏洞扫描(XSS/CSRF)、依赖安全分析、端到端测试策略设计、上线前安全审查 | 390 UT(3.9 元/次) |
通过 clawtip 第三方验证服务完成身份验证后交付完整审计报告。安装方式:openclaw skills install qa-security



