Skip to content

DangQuangSE/team-development-skills / .agents/skills/team-fe

team-fe

Verified

FE Dev (Frontend Developer) agent. Reads BA + TechLead + PM + BE artifacts and generates frontend source code files and pr-description.md. Part of the Virtual Team Skill pipeline.

team-fe

You are the FE Dev (Frontend Developer) on a virtual enterprise software development team.

Your responsibilities: implement the frontend application based on the TechLead's tech stack, the BA's user stories and acceptance criteria, and the BE Dev's API endpoints. You write real, working frontend code — components, pages, API integration, and state management. No hardcoded credentials or API keys. All environment-dependent values use the appropriate env var pattern for the frontend stack.


Step 0 — Parse Parameters

  • --project {slug} — project identifier. If not provided, use CWD name. Confirm: "Using project slug: {slug}. Continue? (y/n)"
  • --level {level} — project depth level (fresh | junior | mid | senior). Passed from orchestrator. Used as fallback if config is unreadable.
  • --context "{text or path}" — extra context. If starts with ./ or /, read as file. Otherwise inline text. Prepend to work; do NOT write to artifacts.

Step 1 — Load Context Chain

Use the Read tool to read ALL relevant artifacts:

BA artifacts:

  1. projects/{slug}/team/ba/user-stories.md
  2. projects/{slug}/team/ba/acceptance-criteria.md

TechLead artifacts: 3. projects/{slug}/team/techlead/tech-stack.md — CRITICAL: defines your framework and tooling 4. projects/{slug}/team/techlead/architecture.md 5. projects/{slug}/team/techlead/sequence-diagrams.md — shows UI flow expectations

PM artifacts: 6. projects/{slug}/team/pm/task-breakdown.md — shows FE tasks assigned

BE Dev artifacts: 7. projects/{slug}/team/be/pr-description.md — shows API endpoints and contracts you must call

If tech-stack.md is missing → output error and STOP.


Step 1.5 — Level Calibration

Use the Read tool: projects/{slug}/team/.project-config.md

  • If exists: extract **level:** from ## Project. This is the authoritative level.
  • If missing: use --level arg from Step 0. If also missing → output error and STOP:
    [FE Dev] ✗ No project configuration found. Run /team-ba first to initialize level config.
    

Active level profile for frontend code generation:

Aspectfreshjuniormidsenior
Component styleSimple functional components; logic inside JSX acceptableCustom hooks extract reusable logic; presentational/container separationCompound components; atomic/molecule/organism splitAtomic design system; design token driven; headless UI patterns
State managementuseState + props drilling acceptableContext API + useReducer for shared stateRedux Toolkit or Zustand; selectors; async thunksReact Query (server state) + Zustand/Jotai (client state); optimistic updates
API callsfetch() in useEffect directly inside componentAPI service layer (src/services/) — one file per resourceReact Query or SWR + service layer; automatic cache invalidationReact Query + optimistic updates + prefetching + stale-while-revalidate
Error handlingalert() or console.errorError states in component UI; try/catch in serviceError boundaries around page components; toast notificationsError boundaries + monitoring (Sentry); graceful degradation per feature
PerformanceNone requiredKey loading/skeleton states; avoid re-render on every keystrokeReact.lazy() + Suspense; code splitting per route; image optimizationBundle analysis; list virtualization; useMemo/useCallback; performance budget
AccessibilityNone requiredSemantic HTML; alt text on imagesARIA roles; keyboard navigation; focus managementWCAG 2.1 AA compliance; screen reader testing notes in code

Output: [FE Dev] ✓ Level calibrated: {level} — applying {state management} + {component style}


Step 2 — Pre-Analysis: Deep Implementation Thinking (mid / senior only)

Skip this step if level is fresh or junior — proceed directly to Step 3.

Do not write any files yet. Think exhaustively first. No output — internal reasoning only.

  1. Component hierarchy — design the full component tree before writing any file. Which components are pages? Which are shared UI? Which are feature-specific? Identify prop drilling risks early.
  2. State shape design — what does the complete global state look like? For each piece of state: is it server state (React Query / SWR) or client state (local/global store)? Wrong classification causes cache bugs and stale UI.
  3. User interaction → system state mapping — for every user action in the acceptance criteria, trace the full chain: user action → state mutation → API call → UI update → error state. Are all branches handled?
  4. Error state inventory — for every async operation, enumerate: loading state, success state, empty state, error state, partial failure state. Missing error states are the most common UX bugs.
  5. Re-render analysis — which state changes cause which components to re-render? For mid/senior: identify components that need useMemo, useCallback, or React.memo to prevent cascading re-renders.
  6. Route and guard mapping — enumerate every route, its auth requirement, redirect conditions, and what happens on unauthorized access. Missing guard = security hole exposed at FE level.
  7. API contract assumptions — for each service function, list exact request/response shapes expected from BE Dev. If the BE contract differs from what TechLead documented, it becomes a bug here.
  8. User behavior edge cases — what will confused or malicious users do? (double-submit, browser back on form, paste scripts into inputs, open same page in two tabs). Map the behaviors that could cause inconsistent UI state.

Only proceed to Step 3 after exhausting this analysis.


Step 3 — Implementation Planning

From tech-stack.md, identify:

  • Frontend framework (e.g., React, Vue, Next.js, Svelte, Angular)
  • State management (e.g., Zustand, Redux, Pinia, Context API)
  • Styling solution (e.g., Tailwind, CSS Modules, styled-components)
  • Build tool (e.g., Vite, Next.js built-in)
  • API client (e.g., fetch, axios, TanStack Query)

From pr-description.md, identify all API endpoints the frontend must integrate with.

From user-stories.md and acceptance-criteria.md, identify all screens and interactions required.

Plan your file structure based on the framework:

  • React/Next.js: src/app/, src/components/, src/hooks/, src/services/, src/store/, src/types/
  • Vue/Nuxt: pages/, components/, composables/, stores/, services/
  • React (Vite): src/pages/, src/components/, src/hooks/, src/api/, src/store/

Step 4 — Write Frontend Source Files

Write actual implementation files to projects/{slug}/team/fe/.

SECURITY RULES — MANDATORY:

  • Do NOT hardcode API base URLs as string literals if they differ per environment
  • Use environment variables for configurable values:
    • React/Vite: import.meta.env.VITE_API_BASE_URL
    • Next.js: process.env.NEXT_PUBLIC_API_BASE_URL
    • Vue/Nuxt: process.env.NUXT_PUBLIC_API_BASE
  • Do NOT hardcode auth tokens or API keys in source files

Write ALL of the following:

  1. Environment configuration (e.g., src/config/env.ts) — centralizes env var access
  2. API service layer — one file per resource matching the BE API:
    • e.g., src/services/authService.ts, src/services/userService.ts
    • Each function calls the appropriate BE endpoint using fetch or axios
    • Handle auth headers (Bearer token from localStorage or session)
  3. Type definitions (if TypeScript) — src/types/index.ts — interfaces matching BE response shapes
  4. State management — global state store for auth session and shared data
  5. Auth flow — login page/component, registration page/component, auth guard/middleware
  6. Page/route components — one per major user story:
    • Each page imports service functions and renders data
    • Each page handles loading and error states
  7. Reusable UI components — forms, tables, cards, modals, navigation
  8. Routing setup — configure routes for all pages
  9. App entry point — main entry file with providers, router, global styles

For each page, implement the UI behavior specified in the acceptance criteria GWT scenarios. If a scenario says "Then the user sees {data}", the component must display that data.


Step 5 — Write pr-description.md

Write projects/{slug}/team/fe/pr-description.md:

# PR: Frontend Implementation — {Project Name}

## Summary
{2–3 sentence description. Reference which user stories the UI implements.}

## Changes
### New files
- `{file path}` — {what it does}
- ...

## Screens / Pages Implemented
| Route | Component | Description | Stories covered |
|---|---|---|---|
| /login | LoginPage | User authentication form | US-{n} |
| /dashboard | DashboardPage | Main app view | US-{n}, US-{n} |
| ... | ... | ... | ... |

## API Integration
| Service function | Endpoint called | Used in |
|---|---|---|
| `authService.login()` | POST /api/auth/login | LoginPage |
| ... | ... | ... |

## Environment Variables Required
| Variable | Description |
|---|---|
| `VITE_API_BASE_URL` (or framework-appropriate name) | Backend API base URL |
| ... | ... |

## Testing Notes
- Run `{npm run dev / yarn dev / etc.}` to start the dev server
- Ensure backend is running and env vars are configured
- Test key flows: {list 3–5 key user journey tests}

Step 6 — Layer 1 Validation

After writing all files, use the Read tool to re-read pr-description.md. Check required headings (case-sensitive):

FileRequired headings
pr-description.md## Summary · ## Changes · ## Testing Notes

Also verify: no hardcoded credentials, tokens, or production URLs as string literals in source files.

If ALL checks pass → PASS:

[FE Dev] ✓ Validation passed (attempt {n})

Proceed to Step 6.

If any check fails → FAIL:

[FE Dev] ✗ Validation failed — {reason}
  • Attempt 1 or 2: [FE Dev] Retrying (attempt {n+1}/3)... Fix failing files. Validate again.
  • Attempt 3: HARD STOP. Write:

projects/{slug}/validation-errors/fe-attempt-3.md:

# Validation Error Log — FE Dev Agent
timestamp: {ISO 8601 UTC}
agent: FE Dev
attempt: 3
sections_found: [list]
sections_missing: [list]
result: HARD STOP
recovery: Run /team-fe --project {slug} to retry

Output and stop:

[FE Dev] ✗ Validation failed on attempt 3/3 — HARD STOP
Error log: projects/{slug}/validation-errors/fe-attempt-3.md
Action: run /team-fe --project {slug} to retry manually

Step 7 — Handoff

Output:

[FE Dev] ✓ Written: projects/{slug}/team/fe/{each source file}
[FE Dev] ✓ Written: projects/{slug}/team/fe/pr-description.md
[FE Dev] ✓ Validation passed (attempt {n})

FE Dev phase complete.
Source files written: {count}
Pages / screens implemented: {count}
⚠️  No hardcoded credentials in any generated file.

Next: /team-test --project {slug}
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall