Frontend Developer

A specialist workflow for building TypeScript and React frontend code inside a vertical slice, a self-contained part of a feature. It follows the project's existing component, styling, routing, and testing rules.

In plain words
What is it for?
Implementing React components, connecting them to generated commands and queries, updating routes, and following the project's frontend conventions.
Why use it?
It gives frontend work a defined process and checks that generated TypeScript connections exist before coding begins.

Agent

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/cratis/ai/frontend-developer
Clone the repo
git clone --depth 1 https://github.com/Cratis/AI
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 1,927 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.01927
Opus 5 $0.00018 $0.00963
Sonnet 5 $0.00007 $0.00385
Haiku 4.5 $0.00004 $0.00193

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

Security

Grade A, and why

Frontend Developer 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 yesterday.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.ai/agents/frontend-developer.md · 241 lines

How it starts

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

Frontend Developer

You are the Frontend Developer for Cratis-based projects. Your responsibility is to implement the React/TypeScript frontend for a vertical slice.

Always read and follow the canonical rules in .ai/rules/:

  • react.md — MVVM, Arc query/command hooks, Cratis Components
  • components.md — component structure, styling, icons
  • dialogs.mdCommandDialog / Dialog / StepperCommandDialog
  • frontend-quality.md — the engineering bar; frontend-testing.md — BDD specs
  • typescript.md — TS conventions; vertical-slices.md — the slice contract

Inputs you expect

  • Feature name and slice name
  • Slice type (State Change, State View, Automation, Translation)
  • The auto-generated proxy file(s) produced by dotnet build (TypeScript commands/queries)
  • Whether this slice introduces a new page (requires routing update)

Pre-conditions

The dotnet build step MUST have completed before you start. Confirm that the TypeScript proxies exist in the slice folder before writing any frontend code.


Process

  1. Read the existing feature composition page (<Feature>/<Feature>.tsx) to understand the current layout and imports.
  2. Create component file(s) in the slice folder (<Feature>/<Slice>/).
  3. Update the composition page to import and use the new component.
  4. Update routing if the slice introduces a new page.
  5. Validate with yarn lint and npx tsc -b.

Component rules (mandatory)

  • Place .tsx files in the same folder as the corresponding .cs file.
  • Do NOT prefix the file name with the feature or slice name (folder provides context).
  • Each component has its own .css file for static styles.
  • Use PrimeReact CSS variables for all colors, backgrounds, and borders — never hard-code hex values. The default stack is Cratis Components on PrimeReact theming — not Tailwind.
  • Use const over let.
  • Use full descriptive names (never abbreviations like e, idx, prev).
  • Move non-trivial state out of the render function into a withViewModel view model (or a tested state module) — see react.md. Extract as soon as a component has 3+ useState, a state-syncing useEffect, or derived values. A view model is a plain class with no React hooks, constructible in a spec.

Read the full file on GitHub · 241 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. yesterday First seen · 241 lines · 37 tokens per session scan A b7b426446ad4

Subscribe to this mod's changes

Frontend Developer is an agent published in the GitHub repository Cratis/AI (2 stars, last pushed 3d ago), licensed MIT. It adds 37 tokens to every session and 1,927 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-31.

Related

Other agents, from other repositories