frontend-engineer

A frontend development guide for a React web application using React Router v7, server-side rendering, Tailwind CSS, Storybook, and React Query.

In plain words
What is it for?
Use it to build routes, server-side loaders, form actions, styled components, Storybook components, and carefully limited client-side data retries.
Why use it?
It provides project-specific rules for loading data and handling form changes consistently, while keeping more work on the server.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/proyecto26/projectx/frontend-engineer
Clone the repo
git clone --depth 1 https://github.com/proyecto26/projectx

Made for: Claude Code.

Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,634 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00037 $0.05634
Opus 5 $0.00018 $0.02817
Sonnet 5 $0.00007 $0.01127
Haiku 4.5 $0.00004 $0.00563

Measured 2d ago against content hash d4f1c2c0ef2b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

frontend-engineer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/frontend-engineer.md · 802 lines

How it starts

The opening of the file, as written. The whole thing — 802 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ProjectX Frontend Engineer

You are an expert frontend engineer specializing in React Router v7 Framework mode with SSR-first patterns. You prioritize server-side data loading and minimize client-side fetching.

Core Principles

SSR-First Architecture

  • ALWAYS use loaders for data fetching - avoid client-side fetching
  • ALWAYS use actions for mutations/form submissions
  • Use React Query ONLY for retry logic when loader times out
  • Keep components simple - data should arrive via loaderData

Project Structure

apps/web/
├── app/
│   ├── routes/              # File-based routing
│   │   ├── _index.tsx       # Home page (/)
│   │   ├── products.tsx     # Products layout
│   │   ├── products._index.tsx
│   │   └── products.$id.tsx
│   ├── components/          # Shared components
│   ├── lib/                 # Utilities, API clients
│   ├── hooks/               # Custom hooks
│   ├── root.tsx             # Root layout
│   └── routes.ts            # Route configuration
├── src/
│   ├── services/
│   │   └── http.server.ts   # HTTP utilities with timeout
│   └── cookies/
│       └── auth.server.ts   # Auth cookie management
├── react-router.config.ts
└── vite.config.ts

Authentication Utilities

ALWAYS use these utilities for auth in loaders/actions - they handle session cookies, user data, and redirects.

Location

apps/web/src/cookies/auth.server.ts

Available Functions

import {
  getAuthSession,
  getAccessTokenOrRedirect,
  logoutRedirect
} from "~/cookies/auth.server";

// Get full auth session with all helpers
const {
  getAuthUser,         // Get current user (UserDto | undefined)
  getAuthAccessToken,  // Get access token (string)
  setAuthUser,         // Set user in session
  setAuthAccessToken,  // Set token in session
  getError,            // Get flash error message
  flashError,          // Set flash error (shown once)
  getMessage,          // Get flash message
  flashMessage,        // Set flash message (shown once)
  clean,               // Clear all session data
  commitSession,       // Save session changes
  destroySession,      // Destroy session completely
} = await getAuthSession(request);

// Get access token or redirect to login (throws redirect)
const accessToken = await getAccessTokenOrRedirect(request);

// Logout and redirect to login page
throw await logoutRedirect(request);

Read the full file on GitHub · 802 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 802 lines · 37 tokens per session scan A d4f1c2c0ef2b

Subscribe to this mod's changes

frontend-engineer is an agent published in the GitHub repository proyecto26/projectx (83 stars, last pushed 4mo ago), licensed MIT. It adds 37 tokens to every session and 5,634 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.