craft-frontend

craft-frontend is a skill for Claude Code from gul-labs/craftsman-marketplace. It costs 137 tokens per session (2,506 once invoked), scanned A, original, MIT.

A set of guidelines for structuring frontend application code, including components, state, data loading, forms, routing, browser/server boundaries, performance, errors, and bundle size.

In plain words
What is it for?
Use it when building interface components, connecting APIs, managing forms or state, adding routes, handling errors, or reducing client-side code size.
Why use it?
It helps developers fit new interface code into the project’s existing architecture instead of creating duplicate or conflicting patterns.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the craftsman plugin — 12 skills shipped together

Good fit Use it when building interface components, connecting APIs, managing forms or state, adding routes, handling errors, or reducing client-side code size.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gul-labs/craftsman-marketplace/craft-frontend
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.

Any agent
npx skills add gul-labs/craftsman-marketplace --skill craft-frontend
Clone the repo
git clone --depth 1 https://github.com/gul-labs/craftsman-marketplace

Made for: Claude Code.

Or install craftsman, the plugin that ships this one along with the rest of its 12 skills.

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 craft-frontend

README.md
[![agentmods](https://agentmods.dev/badge/skills/gul-labs/craftsman-marketplace/craft-frontend/github.svg)](https://agentmods.dev/skills/gul-labs/craftsman-marketplace/craft-frontend)
Your own site
<a href="https://agentmods.dev/skills/gul-labs/craftsman-marketplace/craft-frontend"><img src="https://agentmods.dev/badge/skills/gul-labs/craftsman-marketplace/craft-frontend/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for craft-frontend

Your own site · 80×15
<a href="https://agentmods.dev/skills/gul-labs/craftsman-marketplace/craft-frontend"><img src="https://agentmods.dev/badge/skills/gul-labs/craftsman-marketplace/craft-frontend.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 137 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,506 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00137 $0.02506
Opus 5 $0.00068 $0.01253
Sonnet 5 $0.00027 $0.00501
Haiku 4.5 $0.00014 $0.00251

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

Security

Grade A, and why

craft-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 12d 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.

plugins/craftsman/skills/craft-frontend/SKILL.md · 170 lines

How it starts

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

Frontend Craft

This skill encodes one engineer's standard for structuring frontend application code, applied the same way across every repo. The method and opinions live here; the project specifics (which framework, which data library, which router) are discovered from the repo — never hardcoded or assumed.

Operating principle — discover before you build

Different repos already have different conventions. Before adding anything, spend two minutes mapping what exists so you extend rather than duplicate:

  • package.json / lockfile → which framework (Next.js, React, Vue, Remix)? Which data layer (@tanstack/react-query, swr, RTK Query)? Which form lib (react-hook-form, Formik)? Which state approach (Zustand, Jotai, Context, URL-as-state)?
  • grep for an existing API client, query key factory, or base hook — wire into it, don't fork it.
  • Find the routing convention (file-based, config, nested layouts) and the client/server split strategy before deciding where new code lives.

State what you found, then propose the smallest set of additions that closes the gap.

The frontend layers (build in this order)

  1. Component architecture — decide the composition shape first: where are the boundaries, what is server-rendered vs client-interactive, what gets co-located vs shared. Composition over configuration: a component that accepts children and slots is more reusable than one with 20 props. See references/architecture.md.

  2. State — start local (useState), lift only when two siblings genuinely share it, reach for a global store only as a last resort. Server state (remote data) belongs in a query cache, not a store. See references/state.md.

  3. Data fetching — use a typed client that matches the repo's existing pattern. Every fetch needs a loading state, an error state, and an empty state, all co-located with the component that owns the data. Avoid waterfall fetches: parallelize or prefetch where the router allows. See references/data-fetching.md.

Read the full file on GitHub · 170 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 170 lines · 137 tokens per session scan A 8e98c35f4456

Subscribe to this mod's changes

craft-frontend is a skill published in the GitHub repository gul-labs/craftsman-marketplace (1 stars, last pushed today), licensed MIT. It adds 137 tokens to every session and 2,506 once invoked, about $0.0007 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.