factory-frontend

factory-frontend is a skill for Claude Code, Codex from nonlinear-xyz/factory-kit. It costs 68 tokens per session (3,830 once invoked), scanned A, original, MIT.

A collection of frontend conventions for lists, forms, tables, drawers, and record editing. It standardizes common React patterns, formatting helpers, headings, colors, data-fetching keys, and the choice between Mantine and shadcn component libraries.

In plain words
What is it for?
Use it when building CRUD interfaces such as admin lists, tables with actions, create/edit drawers, and record detail screens. CRUD means creating, reading, updating, and deleting records.
Why use it?
It reduces repeated design decisions and helps related screens behave consistently. Its drawer state pattern makes it clear whether a panel is closed, creating a record, or editing a specific record.

Skill for Claude CodeCodex

Part of the factory-kit plugin — 37 skills, 8 commands, 12 agents, 1 MCP server shipped together

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 skills/nonlinear-xyz/factory-kit/factory-frontend
Any agent
npx skills add nonlinear-xyz/factory-kit --skill factory-frontend
Clone the repo
git clone --depth 1 https://github.com/nonlinear-xyz/factory-kit

Made for: Claude Code, Codex.

Or install factory-kit, the plugin that ships this one along with the rest of its 37 skills, 8 commands, 12 agents, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for factory-frontend

README.md
[![agentmods](https://agentmods.dev/badge/skills/nonlinear-xyz/factory-kit/factory-frontend.svg)](https://agentmods.dev/skills/nonlinear-xyz/factory-kit/factory-frontend)
Your own site
<a href="https://agentmods.dev/skills/nonlinear-xyz/factory-kit/factory-frontend"><img src="https://agentmods.dev/badge/skills/nonlinear-xyz/factory-kit/factory-frontend.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,830 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.1 $0.00068 $0.03830
Opus 5 $0.00034 $0.01915
Sonnet 5 $0.00014 $0.00766
Haiku 4.5 $0.00007 $0.00383

Measured 5d ago against content hash b0635e417f68, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

factory-frontend 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 5d 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.

skills/factory-frontend/SKILL.md · 252 lines

How it starts

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

Factory frontend

Each section leads with Principle (one sentence, stack-agnostic), then Why (constraint → option → tradeoff), then Recipe (the Mantine or shadcn shape we use), and Failure mode when there's one to name. Sections that are pure style with no deeper truth are marked Recipe only.

CRUD shape — DataTable + drawer with mode union

Principle. Model the drawer's state as a discriminated union; the drawer only edits the row it was opened from.

Why. A drawer is a small modal state machine: closed / creating / editing-row-X. Boolean isOpen + nullable editingId lets impossible states represent themselves (open + no id, closed + id). The discriminated union makes those states unrepresentable. The "edits only the row it was opened from" rule keeps each drawer single-shape; relations open their own drawers, so the state inside any one drawer never has to reason about more than one entity.

Recipe.

type FooDrawerMode =
  | { kind: 'closed' }
  | { kind: 'create' }
  | { kind: 'edit'; foo: Foo };

const [drawerMode, setDrawerMode] = useState<FooDrawerMode>({ kind: 'closed' });

// Imperative form sync when mode changes
useEffect(() => {
  if (drawerMode.kind === 'edit') {
    form.setValues(toFormValues(drawerMode.foo));
    form.resetDirty();
  } else if (drawerMode.kind === 'create') {
    form.reset();
  }
}, [drawerMode.kind, drawerMode.kind === 'edit' ? drawerMode.foo.id : null]);

DataTable columns — declarative factory

Principle. Columns are produced by a factory function that takes callbacks; the page wires the actions, not the column definitions.

Why. Inlining handlers in column definitions binds the columns to the page's state, which breaks reuse and complicates testing. A factory function that takes onEdit / onDelete / onDuplicate as parameters keeps the columns declarative and lets a different page wire different callbacks without forking the columns. Cost: one more layer of indirection. Benefit: columns are reusable, testable, and the wiring is grep-able.

Read the full file on GitHub · 252 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. 5d ago First seen · 252 lines · 68 tokens per session scan A b0635e417f68

Subscribe to this mod's changes

factory-frontend is a skill published in the GitHub repository nonlinear-xyz/factory-kit (9 stars, last pushed 1mo ago), licensed MIT. It adds 68 tokens to every session and 3,830 once invoked, about $0.0003 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 skills, from other repositories

educational-presentation

Crea presentazioni interattive per lezioni scolastiche ITIS usando React via CDN, dark theme, simulatori interattivi, e quiz. Due approcci consolidati: CDN-based (zero build, HTML puri) e Build-based (Vite+TS+Tailwind). Deploy su GitHub Pages. Progetto di riferimento: presentazione-vpn (Mar 2026).

thomascasali/claude-kb-workflow · 86 tokens

design-to-code

Lanhu to Code workflow for Claude Code. Convert Lanhu design URLs into Vue/React frontend code with component reuse, design token mapping, TODO-safe business logic, and optional code review.

ursazoo/lanhu-to-code · 42 tokens

component-doc-gen

Scan frontend src directories and generate docs/components.md so Claude Code can reuse existing Vue/React components during design-to-code generation.

ursazoo/lanhu-to-code · 29 tokens

vercel-react-view-transitions

Guide for implementing smooth, native-feeling animations using React's View Transition API ( component, addTransitionType, and CSS view transition pseudo-elements). Use this skill whenever the user wants to add page transitions, animate route changes, create shared element animations, animate enter/exit of components…

zhukunpenglinyutong/desktop-cc-gui · 127 tokens

frontend-patterns

Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.

hashgraph-online/awesome-codex-plugins · 24 tokens

ss-studio

Turn a product brief and optional references into three distinct creative directions, a human-selected StyleSeed interaction plan, generated image/video asset jobs, a working UI prototype, and a verified prototype-first showcase reel. Use for client concepts, app interaction exploration, trendy but coherent UI…

bitjaru/styleseed · 75 tokens