Get the FREE Ultimate OpenClaw Setup Guide →

skyfom-frontend-developer

npx machina-cli add skill SkyfomLabs/skyfom-claude-orchestration/skyfom-frontend-developer --openclaw
Files (1)
SKILL.md
4.6 KB

Skyfom Frontend Developer

Senior frontend developer for React/Svelte applications.

Role

  • Implement web UI components and features
  • Follow Feature-Sliced Design (FSD) architecture
  • Use Shadcn/Radix UI with Tailwind CSS
  • Manage state with Zustand
  • Handle data fetching with TanStack Query/GraphQL

Tech Stack

CategoryTechnology
RuntimeBun
BundlerVite
FrameworksReact 18+, Svelte 5+
LanguageTypeScript (strict)
UIShadcn/ui, Radix UI, Tailwind CSS
StateZustand
DataTanStack Query, GraphQL (urql)
ValidationZod
TestingVitest, Playwright

Workflow

See workflows/main-workflow.md for detailed steps.

Quick Workflow

  1. Claim task: bd update <task-id> --status in_progress
  2. Create branch: feature/<task-id>-<desc>
  3. Implement following FSD structure
  4. Add component tests (Vitest)
  5. Add E2E tests (Playwright)
  6. Create PR
  7. Update Beads

FSD Structure

src/
├── app/          # App layer (providers, routes, styles)
├── pages/        # Page components
├── widgets/      # Complex UI blocks
├── features/     # User interactions (ui, model, api, lib)
├── entities/     # Business entities
└── shared/       # Shared code (ui, lib, api, config)

Import rules:

  • ✅ Lower layers import from shared
  • ✅ Features use entities
  • ❌ Entities cannot import features
  • ❌ No cross-slice imports at same layer

Component Pattern

// features/auth/ui/LoginForm.tsx
import { z } from 'zod';
import { useForm } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import { Button } from '@/shared/ui/button';

const schema = z.object({
  email: z.string().email(),
  password: z.string().min(8),
});

export const LoginForm = () => {
  const { register, handleSubmit, formState: { errors } } =
    useForm({ resolver: zodResolver(schema) });

  return (
    <form onSubmit={handleSubmit(onSubmit)} className="space-y-4">
      {/* Form fields */}
    </form>
  );
};

State Management

// features/auth/model/store.ts
import { create } from 'zustand';
import { persist } from 'zustand/middleware';

export const useAuthStore = create<AuthState>()(
  persist(
    (set) => ({
      user: null,
      token: null,
      login: async (creds) => {
        const { user, token } = await authApi.login(creds);
        set({ user, token });
      },
      logout: () => set({ user: null, token: null }),
    }),
    { name: 'auth-storage' }
  )
);

Beads Commands

bd update <task-id> --status in_progress
git checkout -b feature/<task-id>-<desc>
# ... implement ...
git commit -m "feat(web): implement X (bd-<task-id>)"
git push origin feature/<task-id>-<desc>
bd close <task-id> --reason "PR #<number> created"

Testing

// Vitest unit test
import { describe, it, expect } from 'vitest';
import { render, screen } from '@testing-library/react';

describe('LoginForm', () => {
  it('renders email input', () => {
    render(<LoginForm />);
    expect(screen.getByLabelText(/email/i)).toBeInTheDocument();
  });
});
// Playwright E2E
import { test, expect } from '@playwright/test';

test('user can login', async ({ page }) => {
  await page.goto('/login');
  await page.fill('[data-testid="email"]', 'test@example.com');
  await page.fill('[data-testid="password"]', 'password123');
  await page.click('[data-testid="submit"]');
  await expect(page).toHaveURL('/dashboard');
});

Integration

  • Triggered by: PM assigns frontend task
  • Works with: Backend for APIs, Designer for UI specs
  • Reports to: PM with PR link
  • Code review: Triggers skyfom-code-reviewer

Quick Reference

# Setup
bun create vite my-app --template react-ts
bun install
bunx shadcn@latest init

# Add components
bunx shadcn@latest add button card dialog

# Dev
bun run dev

# Test
bun test
bun run test:e2e

# Build
bun run build

Success Metrics

  • Component tests >80% coverage
  • E2E tests for critical flows
  • Zero accessibility violations
  • Bundle size <500KB
  • FSD structure followed
  • PR approved by code reviewer

Source

git clone https://github.com/SkyfomLabs/skyfom-claude-orchestration/blob/main/skills/skyfom-frontend-developer/SKILL.mdView on GitHub

Overview

Skyfom Frontend Developer specializes in TypeScript and JavaScript, delivering web UIs with Bun runtime and Vite tooling. Proficient in React and Svelte, Shadcn/Radix UI with Tailwind, and architecture patterns like Feature-Sliced Design (FSD). Expert in GraphQL, Zustand, Zod, and TanStack Query to power robust frontend apps.

How This Skill Works

The role uses Bun for runtime, Vite for bundling, and supports React 18+ or Svelte 5+ applications. UI is built with Shadcn/ui and Radix UI alongside Tailwind, organized around the Feature-Sliced Design structure (src/app, src/pages, src/widgets, src/features, src/entities, src/shared). State is managed with Zustand, while data is fetched via GraphQL (urql) and TanStack Query, with input validated by Zod. Testing is integrated with Vitest and Playwright for unit and end-to-end coverage.

When to Use It

  • Building complex UI components in React or Svelte apps
  • Applying Feature-Sliced Design (FSD) to frontend projects
  • Managing global or page-level state with Zustand
  • Fetching and caching data via GraphQL with TanStack Query
  • Styling UI with Shadcn/Radix components and Tailwind in Bun/Vite

Quick Start

  1. Step 1: Create a Bun + Vite project and set up React 18+ or Svelte 5+
  2. Step 2: Organize code per FSD (app/, pages/, widgets/, features/, entities/, shared/)
  3. Step 3: Implement a feature with Zustand for state, GraphQL with TanStack Query, and Zod validation

Best Practices

  • Structure your code per FSD: app/, pages/, widgets/, features/, entities/, shared/
  • Enforce import rules: lower layers import from shared; features use entities; avoid cross-layer imports
  • Use Zustand for predictable state with appropriate middleware and persistence
  • Leverage GraphQL with TanStack Query (and urql) for typed, cached data fetching
  • Write tests: Vitest for unit tests and Playwright for E2E tests; follow the provided component pattern

Example Use Cases

  • Create a login feature with form validation via Zod, state with Zustand, and Vitest tests
  • Build a multi-widget admin dashboard using FSD structure and TanStack Query for data
  • Migrate a frontend project to Bun runtime with Vite for faster builds
  • Implement UI with Shadcn/Radix components and Tailwind in React/Svelte
  • Consume GraphQL data with TanStack Query and urql in a type-safe way

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers