project-frontend

Coding conventions for the React and TypeScript part of an application, built with tools such as Vite, React Router, D3, and testing tools. It covers file layout, type safety, API types, pages, components, and browser tests.

In plain words
What is it for?
Use it when editing frontend pages, components, API clients, server-sent event handling, data visualizations, or frontend tests.
Why use it?
It keeps frontend code consistent and catches errors that loose types or inconsistent file patterns can hide. It also helps frontend changes match the application's existing structure.

Skill for Claude CodeCodex

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/netdata/ai-viewer/project-frontend
Any agent
npx skills add netdata/ai-viewer --skill project-frontend
Clone the repo
git clone --depth 1 https://github.com/netdata/ai-viewer

Made for: Claude Code, Codex.

Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,273 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.00040 $0.05273
Opus 5 $0.00020 $0.02636
Sonnet 5 $0.00008 $0.01055
Haiku 4.5 $0.00004 $0.00527

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

Security

Grade A, and why

project-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 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.

.agents/skills/project-frontend/SKILL.md · 184 lines

How it starts

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

Frontend Patterns

Stack Versions

Always the latest stable: React, TypeScript, Vite, TanStack Query, React Router, D3, Vitest, Playwright. Update on a rolling basis; major-version upgrades get a brief SOW.

File Conventions

  • One component per file. File name matches the default export (e.g. SessionRow.tsx exports SessionRow).
  • No default exports outside of pages/* (which React Router prefers default). Components and helpers use named exports.
  • Co-locate Component.tsx + Component.module.css + Component.test.tsx.
  • One folder per page under src/pages/<PageName>/.

TypeScript

  • strict: true.
  • noUncheckedIndexedAccess: true.
  • exactOptionalPropertyTypes: true.
  • No any. Use unknown and narrow.
  • API response types live in src/api/types.ts and mirror the Go types.
  • Prefer interface for plain object shapes in frontend TypeScript. Use type aliases for unions, intersections, mapped/conditional types, and utility-type expressions where an interface cannot express the shape cleanly. Codacy Cloud enforces @typescript-eslint/consistent-type-definitions, so local helper object shapes should follow the same convention even when project-native ESLint does not report it locally.

Hooks Patterns

// data fetching
export function useSession(id: string) {
  return useQuery({
    queryKey: ['session', id],
    queryFn: () => api.getSession(id),
    staleTime: 1000,
  });
}

// URL-synced filters
export function useFilters(): [Filters, (f: Partial<Filters>) => void] {
  const [params, setParams] = useSearchParams();
  const filters = parseFilters(params);
  const update = (patch: Partial<Filters>) => setParams(serializeFilters({ ...filters, ...patch }));
  return [filters, update];
}
  • Custom hooks live next to the page/component that introduces them. Cross-cutting hooks live in src/hooks/.
  • One hook per file.
  • Always return tuples or named-object results, never anonymous arrays beyond two elements.

SSE Handling

Read the full file on GitHub · 184 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 · 184 lines · 40 tokens per session scan A 959269afcdbc

Subscribe to this mod's changes

project-frontend is a skill published in the GitHub repository netdata/ai-viewer (2 stars, last pushed 2d ago), licensed MIT. It adds 40 tokens to every session and 5,273 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 skills, from other repositories

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

ThinkInAIXYZ/deepchat · 64 tokens

frontend-conventions

Coding conventions, architecture patterns, and testing rules for the SkillHub React frontend. Ensures agents follow Feature-Sliced Design and use the generated OpenAPI types.

iflytek/skillhub · 36 tokens

build-audit-logs

Build or review audit trails in TypeScript/JavaScript apps using evlog (pipelines, typed actions, denials, retention, compliance-style reviews). For application code, not for extending the evlog package.

HugoRCD/evlog · 49 tokens

frontend-dev-guidelines

Frontend development guidelines for React/TypeScript applications. Modern patterns including Suspense, lazy loading, useSuspenseQuery, file organization with features directory, MUI v7 styling, TanStack Router, performance optimization, and TypeScript best practices. Use when creating components, pages, features…

diet103/claude-code-infrastructure-showcase · 76 tokens

fast-typescript-check

Keep www-sacred's TypeScript fast to type-check and fast to run. Use when touching the ASCII/canvas animation components (the only real per-frame code here), tightening type-check wall-clock, or auditing a change for runtime or compiler regressions. Scoped to this repo — a React 19 / Next.js 16 component library plus…

internet-development/www-sacred · 84 tokens

typescript-react

Apply, review, and explain React conventions from the TypeScript Style Guide. Use automatically for TypeScript and TSX tasks involving prop-derived state, prop typing, component responsibilities, data flow, compound components, or client and server state.

mkosir/typescript-style-guide · 50 tokens